Skip to content

Commit 43618e3

Browse files
keitherenon
authored andcommitted
Add --verify-config to clang-tidy invocations
By default clang-tidy ignores unknown checks. This makes that an error case.
1 parent 07bc385 commit 43618e3

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

clang_tidy/clang_tidy_test.bzl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,12 @@ ln -s .. external
6464
6565
has_srcs=false
6666
if [[ -n "{c_sources}" ]]; then
67-
"$bin" --quiet --export-fixes $TEST_UNDECLARED_OUTPUTS_DIR/cfixes.yaml {c_sources} -- {c_flags}
67+
"$bin" --quiet --verify-config --export-fixes $TEST_UNDECLARED_OUTPUTS_DIR/cfixes.yaml {c_sources} -- {c_flags}
6868
has_srcs=true
6969
fi
7070
7171
if [[ -n "{cxx_sources}" ]]; then
72-
"$bin" --quiet --export-fixes $TEST_UNDECLARED_OUTPUTS_DIR/cxxfixes.yaml {cxx_sources} -- {cxx_flags}
72+
"$bin" --quiet --verify-config --export-fixes $TEST_UNDECLARED_OUTPUTS_DIR/cxxfixes.yaml {cxx_sources} -- {cxx_flags}
7373
has_srcs=true
7474
fi
7575

clang_tidy/run_clang_tidy.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ trap 'if (($?)); then cat "$logfile" 1>&2; fi; rm "$logfile"' EXIT
3333
# re-promoted to an error. See the clang-tidy bug here for details:
3434
# https://github.com/llvm/llvm-project/issues/61969
3535
set -- \
36+
--verify-config \
3637
--checks=-clang-diagnostic-builtin-macro-redefined \
3738
--warnings-as-errors=-clang-diagnostic-builtin-macro-redefined \
3839
"$@"

0 commit comments

Comments
 (0)