forked from danmar/cppcheck
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathselfcheck_san.sh
More file actions
executable file
·58 lines (45 loc) · 1.98 KB
/
selfcheck_san.sh
File metadata and controls
executable file
·58 lines (45 loc) · 1.98 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#!/bin/sh
cmake_output="$1"
selfcheck_options_extra="$2"
selfcheck_options="-q -j$(nproc) --std=c++11 --template=selfcheck --showtime=file-total -D__GNUC__ --error-exitcode=1 --inline-suppr --suppressions-list=.selfcheck_suppressions --library=gnu --inconclusive --enable=style,performance,portability,warning,missingInclude,information --exception-handling --debug-warnings --check-level=exhaustive"
selfcheck_options="$selfcheck_options $selfcheck_options_extra"
cppcheck_options="-D__CPPCHECK__ -DCHECK_INTERNAL -DHAVE_RULES --library=cppcheck-lib -Ilib -Iexternals/simplecpp/ -Iexternals/tinyxml2"
qt_options="--library=qt -DQT_VERSION=0x060000 -DQ_MOC_OUTPUT_REVISION=69 -DQT_MOC_HAS_STRINGDATA"
qt_options="$qt_options --suppress=autoNoType:*/moc_*.cpp --suppress=symbolDatabaseWarning:*/moc_*.cpp"
naming_options="--addon-python=$(command -v python) --addon=naming.json"
# clear PATH to prevent unintentional process invocations
export PATH=
ec=0
$cmake_output/bin/cppcheck $selfcheck_options \
externals \
|| ec=1
$cmake_output/bin/cppcheck $selfcheck_options $cppcheck_options $naming_options \
frontend \
|| ec=1
$cmake_output/bin/cppcheck $selfcheck_options $cppcheck_options $naming_options \
-Ifrontend \
cli \
|| ec=1
$cmake_output/bin/cppcheck $selfcheck_options $cppcheck_options $naming_options \
--enable=internal \
lib \
|| ec=1
$cmake_output/bin/cppcheck $selfcheck_options $cppcheck_options $naming_options $qt_options \
--suppress=constVariablePointer:*/moc_*.cpp \
-DQT_CHARTS_LIB \
-I$cmake_output/gui -Ifrontend -Igui \
gui/*.cpp $cmake_output/gui \
|| ec=1
$cmake_output/bin/cppcheck $selfcheck_options $cppcheck_options \
-Icli -Ifrontend \
test/*.cpp \
|| ec=1
$cmake_output/bin/cppcheck $selfcheck_options $cppcheck_options \
-Icli \
tools/dmake/*.cpp \
|| ec=1
$cmake_output/bin/cppcheck $selfcheck_options $cppcheck_options $qt_options \
-I$cmake_output/tools/triage -Igui \
tools/triage/*.cpp $cmake_output/tools/triage \
|| ec=1
exit $ec