Skip to content

Commit 4155f64

Browse files
authored
move clang-tidy check opts to file (#738)
1 parent ee47ee4 commit 4155f64

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

Diff for: .clang-tidy

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Checks: 'clang-diagnostic-*,clang-analyzer-*,-*,cert-*,cppcoreguidelines-*,clang-analyzer-*'
2+
WarningsAsErrors: ''

Diff for: .mci.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -201,8 +201,7 @@ functions:
201201
set -o errexit
202202
set -o xtrace
203203
set -o pipefail
204-
cd etc
205-
./run-clang-tidy.sh
204+
./etc/run-clang-tidy.sh
206205
207206
"compile":
208207
- command: shell.exec

Diff for: etc/run-clang-tidy.sh

+2-5
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,11 @@ clang-tidy -version
2121
#
2222
# see https://clang.llvm.org/extra/clang-tidy
2323
#
24-
BUILD="../build"
25-
CHECKS="\"-*,cert-*,cppcoreguidelines-*,clang-analyzer-*\""
26-
CMD="clang-tidy -p=$BUILD -checks=$CHECKS"
24+
CMD="clang-tidy -p=build"
2725

2826
echo "Running clang-tidy with configuration:"
2927
eval $CMD -dump-config
30-
clang-tidy -checks=$CHECKS -list-checks
3128

3229
# all source and header files, excluding third party libraries
33-
FIND="find ../src -type f \( -name \*.hh -o -name \*.hpp -o -name \*.cpp \) -not -path \"*third_party*\""
30+
FIND="find src -type f \( -name \*.hh -o -name \*.hpp -o -name \*.cpp \) -not -path \"*third_party*\""
3431
eval $FIND | xargs $CMD

0 commit comments

Comments
 (0)