Commit graph

9 commits

Author SHA1 Message Date
Cole Faust
69861aa57f Give lint the correct api levels database for the current module
Before this change, lint was always working off of the public
api database. Now, it will have the system, module-lib, or
system-server databases if the current module is compiling
against those SDKs.

This means that a lot more methods are going to start being
checked for NewApi issues.

Bug: 193460475
Test: Errorprone presubmit
Change-Id: I3eb2c617cd61554cd2a3f9d15fd40b3ec91f961d
2023-02-28 21:18:17 -08:00
Cole Faust
1021ccda6b Disable strict_updatability_linting
strict_updatability_linting currently only makes it so
that NewApi can't be added to the lint baseline.
However, since we're updating NewApi to work on a lot
more apis than before, we need to baseline many issues
across the android tree. Temporarily disable
strict_updatability_linting so that we can add these
baselines.

Bug: 193460475
Test: Presubmits
Change-Id: I8d92df95a46e9b903f0cc0e3be56f17722c50430
2023-02-28 11:31:15 -08:00
Pedro Loureiro
33ff1d96fc Fix copy-paste error
Introduced in aosp/1756510

Change-Id: Ib4d0c8fa3c8741bf3e80b8daa53a3d2ce36ce565
Test: presubmit
2022-09-30 17:04:15 +00:00
Pedro Loureiro
ffb643fc18 make system server modules use filtered lint database
Bug: 188851704
Test: m
Change-Id: Ie8f63286aeeb4cdbec5b9320c2ba41c8e37c7345
Merged-In: Ie8f63286aeeb4cdbec5b9320c2ba41c8e37c7345
2021-07-05 16:57:34 +00:00
Pedro Loureiro
18233a2b47 Use trimmed lint database for mainline modules
Lint's NewApi checks currently produce a lot of false positive findings.
The filtered lint database removes information of classes defined by
mainline modules which are the cases that might become a false positive.

This commit updates soong to use this database instead of the normal one
when linting mainline modules.

Test: m lint-check
Fixes: 186478867
Change-Id: Ica646081b9189303c393b36b2f02914d69eee291
2021-06-25 10:44:59 +00:00
Jaewoong Jung
476b9d6d17 Strict updatability linting against dependencies.
Propagate strict_updatability_linting to transitive dependencies using a
top-down mutator.

Test: lint_test.go
Bug: 182349282
Change-Id: Ifc9e58f1a597e3c7725ee49b4027afb6f42f45cb
2021-05-10 15:30:00 -07:00
Jaewoong Jung
48de883834 Add lint.strict_updatability_linting
The flag prevents developers from skipping updatability lint checks with
baseline files

Test: lint_test.go & manual
Bug: 182349282
Change-Id: Ia74a2b83c7ef686124128bdf16f7b85a919d9e8d
2021-04-21 16:56:49 -07:00
Jaewoong Jung
11623b6052 Move Java lint tests to lint_test.go
Test: lint_test.go
Bug: 182349282
Change-Id: I30a46c8f704e66cd04541c78d3f22a140d3284ef
2021-04-21 16:56:43 -07:00
Jaewoong Jung
79e6f6bfcc Forbid bypassing updatability lint checks.
Test: lint_test.go
Bug: 182349282
Change-Id: Iac7c01493b449c2ddd6df6c68f8a74dfe72dfd7a
2021-04-21 16:56:19 -07:00