Lines Matching refs:lint
6 1. [Global Checks](#android-global-lint-checker)
7 2. [Framework Checks](#android-framework-lint-checker)
13 `prebuilts/cmdline-tools` subproject, and included by soong with all invocations of lint.
15 ## How to add new global lint checks
17 `global/checks/src/main/java/com/google/android/lint`.
21 `global/checks/test/java/com/google/android/lint`.
24 5. Run `prebuilts/cmdline-tools/update-android-global-lint-checker.sh
27 6. Done! Your lint check should be applied in lint report builds across the
35 ## How to add new framework lint checks
38 `framework/checks/src/main/java/com/google/android/lint`.
41 `framework/checks/test/java/com/google/android/lint`.
42 4. Done! Your lint checks should be applied in lint report builds for modules that include
45 ## How to run lint against your module
47 1. Add the following `lint` attribute to the module definition, e.g. `services.autofill`:
52 lint: {
59 …ermediates/frameworks/base/services/autofill/services.autofill/android_common/lint/lint-report.html
61 (Lint report can be found in the same path, i.e. `out/../lint-report.html`)
63 3. Now lint issues should appear on gerrit!
68 build the lint report.
69 - If you want to build lint reports for more than 1 module and they include a common module in their
70 `defaults` field, e.g. `platform_service_defaults`, you can add the `lint` property to that common
72 - If you want to run a single lint type, use the `ANDROID_LINT_CHECK`
73 environment variable with the id of the lint. For example:
74 `ANDROID_LINT_CHECK=UnusedTokenOfOriginalCallingIdentity m out/[...]/lint-report.html`
76 # How to apply automatic fixes suggested by lint
83 there is a lint-baseline.xml file in the root folder of the java library, soong will
84 automatically use it. You can override the file using lint properties too.
88 lint: {
89 baseline_filename: "my-baseline.xml", // default: lint-baseline.xml;
94 When using soong to create a lint report (as described above), it also creates a reference
95 baseline file. This contains all lint errors and warnings that were found. So the next time
96 you run lint, if you use this baseline file, there should be 0 findings.
101 …rmediates/frameworks/base/services/autofill/services.autofill/android_common/lint/lint-baseline.xml
106 warnings, we need to pass another flag to lint: `--nowarn`. One option is to add the flag to your
107 Android.bp file and then run lint again:
110 lint: {
118 - [Android Lint Docs](https://googlesamples.github.io/android-custom-lint-rules/)
119 - [Lint Check Unit Testing](https://googlesamples.github.io/android-custom-lint-rules/api-guide/uni…
120 …://source.corp.google.com/studio-main/tools/base/lint/libs/lint-api/src/main/java/com/android/tool…