Reduce default global google-* clang-tidy checks

Now only keep the ones that do not have thousands of warnings.
We can add more such checks locally or when more warnings
are fixed or suppressed in source files.

Bug: 112478838
Bug: 218759304
Test: make tidy-soong_subset
Change-Id: Iac93310441cdc64ed80e8c30159a08f95e1e9ebc
This commit is contained in:
Chih-Hung Hsieh
2022-05-17 15:26:34 -07:00
parent 53c6c67cbb
commit 8212621410

View File

@@ -35,14 +35,22 @@ func init() {
"bugprone-*",
"cert-*",
"clang-diagnostic-unused-command-line-argument",
"google-*",
// Select only google-* checks that do not have thousands of warnings.
// Add more such checks when we clean up source code.
// "google-build-using-namespace",
// "google-default-arguments",
// "google-explicit-constructor",
// "google-global-names-in-headers",
// "google-runtime-int",
"google-build-explicit-make-pair",
"google-build-namespaces",
"google-runtime-operator",
"google-upgrade-*",
"misc-*",
"performance-*",
"portability-*",
"-bugprone-easily-swappable-parameters",
"-bugprone-narrowing-conversions",
"-google-readability*",
"-google-runtime-references",
"-misc-no-recursion",
"-misc-non-private-member-variables-in-classes",
"-misc-unused-parameters",
@@ -79,13 +87,10 @@ func init() {
return strings.Join([]string{
"-*",
"clang-diagnostic-unused-command-line-argument",
"google*",
"-google-build-using-namespace",
"-google-default-arguments",
"-google-explicit-constructor",
"-google-readability*",
"-google-runtime-int",
"-google-runtime-references",
"google-build-explicit-make-pair",
"google-build-namespaces",
"google-runtime-operator",
"google-upgrade-*",
}, ",")
})