Jason Monk | fc10364 | 2018-08-28 14:30:02 -0400 | [diff] [blame] | 1 | This directory contains configuration files for lint, which is run |
| 2 | in as an upload hook for repo upload. |
| 3 | |
| 4 | lint.xml contains checks that are turned on or off, or whitelisted / |
| 5 | blacklisted for particular directories, if they are different from |
| 6 | the default. |
| 7 | |
| 8 | baseline.xml contains the list of existing "grandfathered" lint |
| 9 | errors in the codebase. It is generated using ./tools/lint/update_baseline.sh |
| 10 | |
| 11 | When you hit a lint error that should not be triggered, there are 3 |
| 12 | possible resolutions: |
| 13 | 1. Use tools:ignore or @SuppressLint annotation. This is preferred |
| 14 | for cases where the lint violation is intended, so that reviewers |
| 15 | can review whether the suppression is appropriate. |
| 16 | 2. Use tools/lint.xml to ignore a lint check which we don't care |
| 17 | about for any file, or checks that are not actionable by the |
| 18 | CL author (e.g. translation issues) |
| 19 | 3. If there are lint errors that should be fixed, but cannot be done |
| 20 | immediately for some reason, the issue should be added to |
| 21 | baseline.xml. |
| 22 | |
| 23 | |
| 24 | References |
| 25 | - https://developer.android.com/studio/write/lint.html |
| 26 | - http://tools.android.com/tips/lint-checks |