Skip to content

Commit 1cd1414

Browse files
committed
One more clang-tidy variation
1 parent c898215 commit 1cd1414

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

.clang-tidy

+2-2
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,6 @@ CheckOptions:
5555
- key: readability-identifier-naming.FunctionCase
5656
value: lower_case
5757

58-
WarningsAsErrors: ''
59-
HeaderFilterRegex: 'src/|include/|tests/'
58+
WarningsAsErrors: '*'
59+
# HeaderFilterRegex: ''
6060
FormatStyle: 'file'

CMakeLists.txt

+1-4
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,12 @@ if(PROJECT_IS_TOP_LEVEL)
2323

2424
add_custom_target(
2525
clang-tidy
26-
# COMMAND git ls-files | grep -E ".*\\.(c|h|cpp|hpp)$" | xargs clang-tidy -p=${CMAKE_CURRENT_BINARY_DIR} --extra-arg=-std=c++${CMAKE_CXX_STANDARD}
27-
COMMAND find ${CMAKE_SOURCE_DIR}/include -name *.hpp -exec clang-tidy --extra-arg=-std=c++${CMAKE_CXX_STANDARD} -p ${CMAKE_BINARY_DIR} {} \;
28-
# COMMAND find ${CMAKE_SOURCE_DIR}/tests -name '*.cpp' -exec clang-tidy -p ${CMAKE_BINARY_DIR} {}
26+
COMMAND git ls-files | grep -E "^(include|src)/.*\.(c|cpp|h|hpp)$" | xargs clang-tidy --extra-arg=-std=c++${CMAKE_CXX_STANDARD} -p ${CMAKE_BINARY_DIR} --header-filter='^$'
2927
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
3028
VERBATIM
3129
USES_TERMINAL
3230
)
3331

34-
3532
add_custom_target(
3633
clang-format
3734
COMMAND git ls-files | grep -E ".*\\.(c|h|cpp|hpp)$" | xargs clang-format -i

0 commit comments

Comments
 (0)