Behavior changes in Lint 7.0.0 beta

Skip to first unread message

Drew Hannay

Jun 28, 2021, 4:53:40 PM6/28/21
to lint-dev
I'm testing our custom lint checks with 7.0.0-beta04 and seeing a number of unit test failures due to some behavior changes which are probably expected but I wanted to confirm so they can be called out in the release notes. I forked the sample lint check repo and added test cases that demonstrate each of these changes. Each of the tests linked pass on AGP 4.2.1 and fail with AGP 7.0.0-beta04

1) Lint output in a test case that uses multiple projects now contains "../" before the project paths where it did not before.

Screen Shot 2021-06-28 at 1.46.15 PM.png

2) Lint output now seems to sometimes use the "~" character when it used to use the "^" character (unclear on exactly the parameters of when this happens).

Screen Shot 2021-06-28 at 1.48.50 PM.png

3) AGP 4.2.1 printed "class.kt" as the class name when analyzing Kotlin enums, AGP 7.0 correctly prints the file name. This one is very obviously a bug fix, but wanted to call it out here so that the fix can be included in release notes :)

Screen Shot 2021-06-28 at 1.51.15 PM 1.png

Hopefully this is useful to someone, but if not, well, it took me almost no  time to put together thanks to the nice sample lint check repo on GitHub :)

Tor Norbye

Jul 14, 2021, 8:01:16 PM7/14/21
to lint-dev
Thanks. Yes, (1) is a deliberate change (related to the partial analysis changes), and (3) was definitely a bug fix. For (2) I'm honestly not sure; I don't remember that change; I'd need to debug through to see what's happening. 

-- Tor

Reply all
Reply to author
0 new messages