Jason Monk fc10364bde Add scripts to run lint on sysui
The run_lint script takes 2 params, the first is top of tree, the
second is a git change SHA. Only if the change contains changes to
sysui does the lint get run (this allows it to not affect other
uploads as a preupload hook).

Test: ./tools/lint/run_lint.sh $ANDROID_BUILD_TOP <SHA>
Change-Id: Id23b879610b3d33c5bf9e47812f0a85f6aeffdde
2018-08-28 14:35:15 -04:00

27 lines
1.1 KiB
Plaintext

This directory contains configuration files for lint, which is run
in as an upload hook for repo upload.
lint.xml contains checks that are turned on or off, or whitelisted /
blacklisted for particular directories, if they are different from
the default.
baseline.xml contains the list of existing "grandfathered" lint
errors in the codebase. It is generated using ./tools/lint/update_baseline.sh
When you hit a lint error that should not be triggered, there are 3
possible resolutions:
1. Use tools:ignore or @SuppressLint annotation. This is preferred
for cases where the lint violation is intended, so that reviewers
can review whether the suppression is appropriate.
2. Use tools/lint.xml to ignore a lint check which we don't care
about for any file, or checks that are not actionable by the
CL author (e.g. translation issues)
3. If there are lint errors that should be fixed, but cannot be done
immediately for some reason, the issue should be added to
baseline.xml.
References
- https://developer.android.com/studio/write/lint.html
- http://tools.android.com/tips/lint-checks