More clear clang-tidy options

Enable a closed list of checks and treat everything as errors.
This commit is contained in:
Alexander Kuzmenkov 2022-05-13 15:49:00 +03:00 committed by Alexander Kuzmenkov
parent ecf34132c6
commit a6b5f9002c
2 changed files with 2 additions and 2 deletions

View File

@ -108,7 +108,7 @@ jobs:
- name: Build TimescaleDB
run: |
./bootstrap -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DPG_SOURCE_DIR=~/$PG_SRC_DIR -DPG_PATH=~/$PG_INSTALL_DIR ${{ matrix.tsdb_build_args }} -DREQUIRE_ALL_TESTS=ON -DLINTER_STRICT=ON
./bootstrap -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DPG_SOURCE_DIR=~/$PG_SRC_DIR -DPG_PATH=~/$PG_INSTALL_DIR ${{ matrix.tsdb_build_args }} -DREQUIRE_ALL_TESTS=ON -DLINTER_STRICT=ON -DLINTER=ON -DCMAKE_VERBOSE_MAKEFILE=ON
make -j $MAKE_JOBS -C build
make -C build install

View File

@ -527,7 +527,7 @@ if(LINTER)
message(STATUS "Linter support (clang-tidy) enabled")
if(LINTER_STRICT)
set(CMAKE_C_CLANG_TIDY
"${CLANG_TIDY};--warnings-as-errors=clang-diagnostic-*,clang-analyzer-*,-*,clang-analyzer-core.*,clang-diagnostic-*"
"${CLANG_TIDY};--checks=clang-diagnostic-*,clang-analyzer-*,-*,clang-analyzer-core.*,clang-diagnostic-*,readability-redundant-control-flow,bugprone-argument-comment,bugprone-macro-parentheses;--warnings-as-errors=*"
)
else()
set(CMAKE_C_CLANG_TIDY "${CLANG_TIDY};--quiet")