Make every clang-tidy finding an error
TirSystem/github-action: Publish wiki / publish-wiki (push) Skipped
TirSystem/github-action: Sync GitHub mirror metadata / sync-metadata (push) Skipped
Validate workflows / validate (pull_request) Successful in 23s

Task: MIL-007#4
This commit is contained in:
2026-10-11 16:36:48 +08:00
parent 81866d8dac
commit 84383eafe9
7 changed files with 36 additions and 8 deletions
+3 -1
View File
@@ -127,7 +127,9 @@ run_checks() {
# Without a .clang-tidy, clang-tidy enables no check and refuses to run, so
# the project gets the compiler diagnostics and the static analyzer.
local tidy_args=(--quiet)
# clang-tidy exits 0 on a warning, so every finding is made an error: a
# finding must fail the check, as a failing tool does for the other languages.
local tidy_args=(--quiet "--warnings-as-errors=*")
if ! find_config_upwards .clang-tidy _clang-tidy; then
tidy_args+=("--checks=${DEFAULT_TIDY_CHECKS}")
fi