Unknown Issue IDs shouldn't break the build

97 views
Skip to first unread message

Brandon Trautmann

unread,
Jun 5, 2020, 2:03:39 PM6/5/20
to lint-dev
In our project we have many modules, and we prefer to share the lint.xml that configures suppressions across these modules. However, we inherit certain rules through third party artifacts (via the lintPublish configuration). If we try to suppress a rule in the lint.xml from these artifacts, the internal modules which do NOT depend on the 3P artifacts fail when lint is unable to find the suppressed issue ID when analyzing that module. This breaks the build but it's my opinion that it shouldn't. Since that module cannot find that issue ID, it means the lint rule is not applied to that module and therefore has no impact on it. My only thought as to why this would be useful is to notify developers they are suppressing a rule that isn't applied to a module (to keep suppressions clean), but I think in this case it does much more harm than good.

Before opening an issue on the tracker I figured I'd bring this here to see if there's a workaround or differing opinions!

Jake Wharton

unread,
Jun 5, 2020, 2:47:10 PM6/5/20
to lint-dev
Yep. Same exact problem here. I wind up adding third-party dependencies where they're not needed to work around this problem.

Brandon Trautmann

unread,
Jun 16, 2020, 2:51:49 PM6/16/20
to lint-dev
I've opened a ticket on the issue tracker, feel free to star: https://issuetracker.google.com/issues/158295165

Tor Norbye

unread,
Jul 16, 2020, 12:16:23 AM7/16/20
to lint-dev
This should be fixed now (in 4.2 canary 4, so already available). 

Instead of being an error, it's now a warning (to help you catch cases where you have a typo -- that was the original rationale for having lint flag it, it was requested by Jake :-)), and it has a separate issue id, so you can suppress it if you do not want to hear about unknown issue id's. It also looks for likely nearby id's and suggests those.

-- Tor
Reply all
Reply to author
Forward
0 new messages