Commit graph

16 commits

Author SHA1 Message Date
Colin Cross
9fa43ad2e3 Downgrade newly failing lint checks
Downgrade new lint checks that are failing to warnings.

Bug: 294098365
Test: treehugger
Change-Id: If236199b22c31d95acbffaefee569c806ef0018d
2023-08-03 00:57:41 +00:00
mattgilbride
9d6cf7e598 Disable new lint checks from Android Studio
PermissionImpliesUnsupportedChromeOsHardware
is ChromeOS specific and does not apply to the
Android tree, thus disabled.

UnsafeImplicitIntentLaunch surfaces false
positives and crashes in a specific corner case.
Disable until the related detector can surface
errors only when it is certain the intent will
get launched.

InvalidId gives false positives due to the package
name that is used in several places in platform.

Bug: 264608708
Test: TH
Change-Id: I441ba27a6fa97ed674145a051944dce4280692cd
2023-03-09 14:11:47 +00:00
mattgilbride
69f04a150c Configure ObsoleteLintCustomCheck lint as fatal
Lint raises an issue ObsoleteLintCustomCheck if it detects
incompatibilities between a custom lint check jar and the lint api
itself.

This is a warning by default, but in AOSP it should be fatal.
Any custom checks are expected to run. If they don't, there is risk
of introducing bugs.

ObsoleteLintCustomCheck will now cause build breakage so that it will
be investigated immediately.

Bug: N/A
Test: TH
Change-Id: I3a46c93d5b53ee0e1add7c287af791bd1b41f1c1
2023-01-05 17:44:24 +00:00
Cole Faust
3bce294a30 Demote BinderGetCallingInMainThread from an error to a warning
Lint was updated, and adds this new error-level check that we
have preexisting occurances of.

Bug: 247885568
Bug: 249337906
Bug: 249335143
Test: m lint-check on internal master
Change-Id: I88c337dd1e12b2722a97e878b5277201df0c163d
2022-09-27 15:20:01 -07:00
Cole Faust
c586109016 Downgrade UnspecifiedImmutableFlag errors to warnings
There are preexisting occurances of it in the source tree.

Bug: 247885568
Test: Presubmits
Change-Id: Ieac1e297414e6abb91460af5da30461d20e7a6ab
2022-09-26 16:22:37 -07:00
Cole Faust
2aa68684ba Revert^2 "Promote ExtraText lint warning to an error""
This reverts commit 0b29c62498.

Reason for revert: Issue that caused breakage has been fixed on stage-aosp-master. I'll test this cl on go/abtd for the stage-aosp-master branch before submitting.

Change-Id: I90f1941f67ebf9c40402713fa7762a99e368c17f
2022-08-11 17:21:45 +00:00
Mike McTernan
0b29c62498 Revert "Promote ExtraText lint warning to an error"
This reverts commit 7868b9e942.

Reason for revert: DroidMonitor: Potential culprit for Bug b/242013483 - verifying through ABTD before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.

Bug: 242013483
Change-Id: Ib73f862f34ca2c8ede7e4b4b9403d1eed00d0426
2022-08-11 10:21:38 +00:00
Cole Faust
7868b9e942 Promote ExtraText lint warning to an error
It was previously demoted due to preexisting occurances
of it in the tree, but those have all been removed now.

Bug: 236431222
Test: m lint-check
Change-Id: Ic3501c43a09b10bc8a2944b0caa6ebbec663a008
2022-08-09 09:51:44 -07:00
Cole Faust
3f6462693e Downgrade/disable lint checks
Lint is being updated, and some of the
new checks have many failures or false
positives in the current android tree.

Bug: 215567981
Bug: 238784089
Test: Presubmits
Change-Id: I33a47d3c0404ca37f0334421a02bb80f745ae792
2022-07-12 15:19:08 -07:00
Spandan Das
397e910835 Disable newapi check in defaults
- Making newapi disabled by default will ensure that this lint check
  does not run on the platform. This prevents noisy lint warnings like b/228956345#1
- This lint check will continue to be enforced on the transitive deps of
  apexes, since lint.strict_updatability_linting will be true for those
  Soong modules

Test: TH
Test: m
out/soong/.intermediates/frameworks/base/services/core/services.core.unboosted/android_common/lint/lint-report.xml
// file no longer contains "Call requires API level ..." warning
Bug: 228956345

Change-Id: I8ef3137394011fb679a1129f80f6351fb05a4eff
2022-04-25 18:17:11 +00:00
Tor Norbye
73dca5c905 Revert "225341614: Enforce ExtraText in platform builds"
This reverts commit 4c471458ec.

Reason for revert: There were failures in some build targets that
must not have run during presubmit checks (for example,
aosp-master/errorprone@8332220)

Change-Id: I220fd70df663ba49d876fb3ebf841fa9f3f06b97
2022-03-21 18:56:14 +00:00
Tor Norbye
4c471458ec 225341614: Enforce ExtraText in platform builds
Bug: 225341614
Test: N/A
Change-Id: Ic2ed5006643f3646315f16fe77552398f38c0265
2022-03-21 08:12:25 -07:00
Tor Norbye
b015aecbfe Disable lint checks which do not apply in the platform
Lint is primarily targeted at Android app developers, and some of the
checks reflect that. Some of these checks do not apply to the platform
code, where they can produce false positives.

This CL adds a number of these to an exclude list passed in to lint.
Also reenables a check previously disabled because of a bug which has
since been fixed, HardcodedDebugMode, and downgrades from error to
warning a few more lint checks which have existing violations in the
codebase when lint is upgraded to the latest version.

Test: Existing
Bug: None
Change-Id: Icbfbcfd51516c43c342e0d3cdb6973278110fd35
2021-07-24 14:48:19 +00:00
Colin Cross
a36c2b830f Downgrade new errors from lint 7.1.0-dev to warnings
Test: m lint-check
Change-Id: I442bc160e578b0230204cb083f1a245febb0f785
2021-06-29 10:43:57 -07:00
Pedro Loureiro
70acc3dc0c Update soong for new lint version
Test: m nothing
Change-Id: Iaa9d37ef73f1fef5f2dbb8a840e774bb86c65bf7
2021-04-06 17:49:19 +00:00
Colin Cross
014489c1e6 Add support for running Android lint on java and android modules.
Add a rule that runs Android lint on each java and android module
and produces reports in xml, html and text formats.

Bug: 153485543
Test: m out/soong/.intermediates/packages/apps/Settings/Settings-core/android_common/lint-report.html
Change-Id: I5a530975b73ba767fef45b257d4f9ec901a19fcb
2020-06-16 15:44:16 -07:00