ART: Add tidy errors
Add some of the recently fixed categories as errors. Also add
some suppressed categories.
Bug: 32619234
Test: WITH_TIDY=1 mmma art
Change-Id: Ifd33b2414c28094d152b2626ee8fd1a46c377f38
diff --git a/build/Android.bp b/build/Android.bp
index 62f71ff..8557798 100644
--- a/build/Android.bp
+++ b/build/Android.bp
@@ -18,16 +18,25 @@
}
art_clang_tidy_errors = [
- // Protect scoped things like MutexLock.
- "bugprone-unused-raii",
+ "bugprone-lambda-function-name",
+ "bugprone-unused-raii", // Protect scoped things like MutexLock.
+ "bugprone-virtual-near-miss",
+ "modernize-use-nullptr",
+ "performance-faster-string-find",
"performance-for-range-copy",
+ "performance-implicit-conversion-in-loop",
"performance-unnecessary-copy-initialization",
"performance-unnecessary-value-param",
"misc-unused-using-decls",
]
// Should be: strings.Join(art_clang_tidy_errors, ",").
-art_clang_tidy_errors_str = "bugprone-unused-raii"
+art_clang_tidy_errors_str = "bugprone-lambda-function-name"
+ + ",bugprone-unused-raii"
+ + ",bugprone-virtual-near-miss"
+ + ",modernize-use-nullptr"
+ + ",performance-faster-string-find"
+ ",performance-for-range-copy"
+ + ",performance-implicit-conversion-in-loop"
+ ",performance-unnecessary-copy-initialization"
+ ",performance-unnecessary-value-param"
+ ",misc-unused-using-decls"
@@ -44,6 +53,11 @@
// No exceptions.
"-misc-noexcept-move-constructor",
"-performance-noexcept-move-constructor",
+ // "Modernization" we don't agree with.
+ "-modernize-use-auto",
+ "-modernize-return-braced-init-list",
+ "-modernize-use-default-member-init",
+ "-modernize-pass-by-value",
]
art_global_defaults {