AudioFlinger: Group common tidy check parameters together
Test: compiles with clang-tidy enabled
Bug: 286936439
Change-Id: Ib87b375afb74c5d07ec44a312baef712f450bad8
diff --git a/services/audioflinger/Android.bp b/services/audioflinger/Android.bp
index c6ce51f..4ebfa10 100644
--- a/services/audioflinger/Android.bp
+++ b/services/audioflinger/Android.bp
@@ -19,7 +19,8 @@
],
}
-tidy_errors = [
+// base tidy_errors for this and all subprojects.
+audioflinger_base_tidy_errors = [
// https://clang.llvm.org/extra/clang-tidy/checks/list.html
// For many categories, the checks are too many to specify individually.
// Feel free to disable as needed - as warnings are generally ignored,
@@ -71,8 +72,10 @@
"-bugprone-suspicious-string-compare",
"-cert-oop54-cpp", // found in TransactionLog.h
"-bugprone-narrowing-conversions", // b/182410845
+]
- // TODO(b/275642749) Reenable these warnings
+// TODO(b/275642749) Reenable these warnings
+audioflinger_tidy_errors = audioflinger_base_tidy_errors + [
"-bugprone-assignment-in-if-condition",
"-bugprone-forward-declaration-namespace",
"-bugprone-parent-virtual-call",
@@ -127,8 +130,8 @@
],
// https://clang.llvm.org/extra/clang-tidy/
tidy: true,
- tidy_checks: tidy_errors,
- tidy_checks_as_errors: tidy_errors,
+ tidy_checks: audioflinger_tidy_errors,
+ tidy_checks_as_errors: audioflinger_tidy_errors,
tidy_flags: [
"-format-style=file",
],