Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | - | - | ||||
checks/ | 15-Dec-2024 | - | 2,069 | 1,624 | ||
Android.bp | D | 15-Dec-2024 | 1.8 KiB | 63 | 59 | |
OWNERS | D | 15-Dec-2024 | 86 | 4 | 3 | |
README.md | D | 15-Dec-2024 | 2 KiB | 51 | 38 |
README.md
1# Bluetooth Lint Checks for AOSP 2 3Custom Android Lint checks are written here to be executed against Bluetooth 4Java and Kotlin source code. These will appear as part of errorprone builds, 5which are notably ran as part of pre/post-submit testing of Bluetooth code. 6 7## How to run Bluetooth lint checks against the code base 8 9While lint checks should be automatically run by Gerrit, you may want to run it manually on the 10code base. 11 12Step 1: Build the lint report: 13``` 14m Bluetooth-lint 15``` 16 17Step 2: Find your lint output: 18``` 19croot; 20find out/soong/.intermediates/packages/modules/Bluetooth/ -type f -name "*lint-report*" -print; 21``` 22 23Or: 24``` 25aninja -t query Bluetooth-lint 26``` 27 28Step 3: Identify the lint report you want to view the results of, typically in the following format: 29``` 30out/soong/.intermediates/packages/modules/Bluetooth/android/app/Bluetooth/android_common/<run-identifier>/lint/lint-report.html 31``` 32 33Step 4: Open the file in your favorite web browser. 34 35## How to run Bluetooth lint unit tests 36 37Unit tests can be ran with the following command: 38``` 39atest BluetoothLintCheckerTest --host 40``` 41 42## Documentation 43 44- [Android Lint Docs](https://googlesamples.github.io/android-custom-lint-rules/) 45- [Custom lint creation example from Android SystemUI team](https://g3doc.corp.google.com/company/teams/android-sysui/general_guides/writing_a_linter.md?cl=head) 46- [Lint Check Unit Testing](https://googlesamples.github.io/android-custom-lint-rules/api-guide/unit-testing.md.html) 47- [Android Lint source files](https://source.corp.google.com/studio-main/tools/base/lint/libs/lint-api/src/main/java/com/android/tools/lint/) 48- [PSI source files](https://github.com/JetBrains/intellij-community/tree/master/java/java-psi-api/src/com/intellij/psi) 49- [UAST source files](https://upsource.jetbrains.com/idea-ce/structure/idea-ce-7b9b8cc138bbd90aec26433f82cd2c6838694003/uast/uast-common/src/org/jetbrains/uast) 50- [IntelliJ plugin for viewing PSI tree of files](https://plugins.jetbrains.com/plugin/227-psiviewer) 51