• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..--

checks/15-Dec-2024-2,0691,624

Android.bpD15-Dec-20241.8 KiB6359

OWNERSD15-Dec-202486 43

README.mdD15-Dec-20242 KiB5138

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