diff options
author | 2024-10-18 14:33:17 -0700 | |
---|---|---|
committer | 2024-10-21 18:20:50 +0000 | |
commit | 31dba778fca246a40e4fe5a6a04ff148541cdcdd (patch) | |
tree | 4a2936df0c240142d6afa6abcfe6f27fea831c21 /Android.bp | |
parent | 674fff48d64159b567d0ed2ab8d3f272df08cf8c (diff) |
Add bluetooth_tidy default
Enforces clang-tidy checks for all cc targets
Bug: 331817295
Test: m com.android.btservices
Flag: EXEMPT, build change
Change-Id: I91f0a12aa06d12ad1dcbdf23ae67d3948ac66c25
Diffstat (limited to 'Android.bp')
-rw-r--r-- | Android.bp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/Android.bp b/Android.bp index 9fbf29d0df..7fbd19909a 100644 --- a/Android.bp +++ b/Android.bp @@ -75,6 +75,27 @@ cc_defaults { cpp_std: "c++20", } +// List of tidy checks that are enabled for cc targets. +// Note that the goal is not to enable all checks, many of them will +// appear as noise especially in the modernize-* range. +bluetooth_tidy_checks = [ + "-*", + "misc-*", + + // This check implements detection of local variables which could be declared + // as const but are not. + "-misc-const-correctness", +] + +// This default tidy checks that will be run against all the cc targets +// developed by the Bluetooth team. +cc_defaults { + name: "bluetooth_tidy", + tidy: true, + tidy_checks: bluetooth_tidy_checks, + tidy_checks_as_errors: bluetooth_tidy_checks, +} + java_defaults { name: "bluetooth_errorprone_rules", errorprone: { |