Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2201df9b authored by Andy Hung's avatar Andy Hung Committed by Gerrit Code Review
Browse files

Merge "AudioFlinger: Group common tidy check parameters together"

parents 5d97c760 04eb9866
Loading
Loading
Loading
Loading
+7 −4
Original line number Diff line number Diff line
@@ -19,7 +19,8 @@ license {
    ],
}

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 @@ tidy_errors = [
    "-bugprone-suspicious-string-compare",
    "-cert-oop54-cpp", // found in TransactionLog.h
    "-bugprone-narrowing-conversions", // b/182410845
]

// 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 @@ cc_defaults {
    ],
    // 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",
    ],
+2 −54
Original line number Diff line number Diff line
@@ -7,60 +7,8 @@ package {
    default_applicable_licenses: ["frameworks_av_services_audioflinger_license"],
}

audioflinger_utils_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,
    // we treat warnings as errors.
    "android-*",
    "bugprone-*",
    "cert-*",
    "clang-analyzer-security*",
    "google-*",
    "misc-*",
    //"modernize-*",  // explicitly list the modernize as they can be subjective.
    "modernize-avoid-bind",
    //"modernize-avoid-c-arrays", // std::array<> can be verbose
    "modernize-concat-nested-namespaces",
    //"modernize-deprecated-headers", // C headers still ok even if there is C++ equivalent.
    "modernize-deprecated-ios-base-aliases",
    "modernize-loop-convert",
    "modernize-make-shared",
    "modernize-make-unique",
    // "modernize-pass-by-value",
    "modernize-raw-string-literal",
    "modernize-redundant-void-arg",
    "modernize-replace-auto-ptr",
    "modernize-replace-random-shuffle",
    "modernize-return-braced-init-list",
    "modernize-shrink-to-fit",
    "modernize-unary-static-assert",
    // "modernize-use-auto",  // found in MediaMetricsService.h, debatable - auto can obscure type
    "modernize-use-bool-literals",
    "modernize-use-default-member-init",
    "modernize-use-emplace",
    "modernize-use-equals-default",
    "modernize-use-equals-delete",
    // "modernize-use-nodiscard",
    "modernize-use-noexcept",
    "modernize-use-nullptr",
    "modernize-use-override",
    //"modernize-use-trailing-return-type", // not necessarily more readable
    "modernize-use-transparent-functors",
    "modernize-use-uncaught-exceptions",
    "modernize-use-using",
    "performance-*",

    // Remove some pedantic stylistic requirements.
    "-google-readability-casting", // C++ casts not always necessary and may be verbose
    "-google-readability-todo",    // do not require TODO(info)

    "-bugprone-unhandled-self-assignment",
    "-bugprone-suspicious-string-compare",
    "-cert-oop54-cpp", // found in TransactionLog.h
    "-bugprone-narrowing-conversions", // b/182410845

// TODO(b/275642749) Reenable these warnings
audioflinger_utils_tidy_errors = audioflinger_base_tidy_errors + [
    "-misc-non-private-member-variables-in-classes",
]

+2 −54
Original line number Diff line number Diff line
@@ -7,60 +7,8 @@ package {
    default_applicable_licenses: ["frameworks_av_services_audioflinger_license"],
}

fastpath_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,
    // we treat warnings as errors.
    "android-*",
    "bugprone-*",
    "cert-*",
    "clang-analyzer-security*",
    "google-*",
    "misc-*",
    //"modernize-*",  // explicitly list the modernize as they can be subjective.
    "modernize-avoid-bind",
    //"modernize-avoid-c-arrays", // std::array<> can be verbose
    "modernize-concat-nested-namespaces",
    //"modernize-deprecated-headers", // C headers still ok even if there is C++ equivalent.
    "modernize-deprecated-ios-base-aliases",
    "modernize-loop-convert",
    "modernize-make-shared",
    "modernize-make-unique",
    // "modernize-pass-by-value",
    "modernize-raw-string-literal",
    "modernize-redundant-void-arg",
    "modernize-replace-auto-ptr",
    "modernize-replace-random-shuffle",
    "modernize-return-braced-init-list",
    "modernize-shrink-to-fit",
    "modernize-unary-static-assert",
    // "modernize-use-auto",  // found in MediaMetricsService.h, debatable - auto can obscure type
    "modernize-use-bool-literals",
    "modernize-use-default-member-init",
    "modernize-use-emplace",
    "modernize-use-equals-default",
    "modernize-use-equals-delete",
    // "modernize-use-nodiscard",
    "modernize-use-noexcept",
    "modernize-use-nullptr",
    "modernize-use-override",
    //"modernize-use-trailing-return-type", // not necessarily more readable
    "modernize-use-transparent-functors",
    "modernize-use-uncaught-exceptions",
    "modernize-use-using",
    "performance-*",

    // Remove some pedantic stylistic requirements.
    "-google-readability-casting", // C++ casts not always necessary and may be verbose
    "-google-readability-todo",    // do not require TODO(info)

    "-bugprone-unhandled-self-assignment",
    "-bugprone-suspicious-string-compare",
    "-cert-oop54-cpp", // found in TransactionLog.h
    "-bugprone-narrowing-conversions", // b/182410845

// TODO(b/275642749) Reenable these warnings
fastpath_tidy_errors = audioflinger_base_tidy_errors + [
    "-misc-non-private-member-variables-in-classes",
    "-performance-no-int-to-ptr",
]