annotate OrthancServer/Resources/RunCppCheck.sh @ 4203:4d42408da117

improving const-correctness in ParsedDicomFile
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 17 Sep 2020 15:01:31 +0200
parents fbc49a65340a
children 318c16cfccab
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4199
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 #!/bin/bash
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
3 set -ex
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
4
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
5 CPPCHECK=cppcheck
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
6
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
7 if [ $# -ge 1 ]; then
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8 CPPCHECK=$1
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
9 fi
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
10
4203
4d42408da117 improving const-correctness in ParsedDicomFile
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4199
diff changeset
11 cat <<EOF > /tmp/cppcheck-suppressions.txt
4d42408da117 improving const-correctness in ParsedDicomFile
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4199
diff changeset
12 constParameter:../../OrthancFramework/Sources/DicomParsing/FromDcmtkBridge.cpp
4d42408da117 improving const-correctness in ParsedDicomFile
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4199
diff changeset
13 nullPointerRedundantCheck:../../OrthancFramework/UnitTestsSources/DicomMapTests.cpp
4d42408da117 improving const-correctness in ParsedDicomFile
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4199
diff changeset
14 stlFindInsert:../../OrthancFramework/Sources/DicomFormat/DicomMap.cpp
4d42408da117 improving const-correctness in ParsedDicomFile
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4199
diff changeset
15 unreadVariable:../../OrthancFramework/Sources/FileStorage/StorageAccessor.cpp
4d42408da117 improving const-correctness in ParsedDicomFile
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4199
diff changeset
16 useInitializationList:../../OrthancFramework/Sources/Images/PngReader.cpp
4d42408da117 improving const-correctness in ParsedDicomFile
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4199
diff changeset
17 syntaxError:../../OrthancFramework/Sources/SQLite/FunctionContext.h
4d42408da117 improving const-correctness in ParsedDicomFile
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4199
diff changeset
18 EOF
4d42408da117 improving const-correctness in ParsedDicomFile
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4199
diff changeset
19
4199
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
20 ${CPPCHECK} --enable=all --quiet --std=c++11 \
4203
4d42408da117 improving const-correctness in ParsedDicomFile
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4199
diff changeset
21 --suppressions-list=/tmp/cppcheck-suppressions.txt \
4199
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
22 -DBOOST_HAS_DATE_TIME=1 \
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23 -DBOOST_HAS_FILESYSTEM_V3=1 \
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
24 -DBOOST_HAS_REGEX=1 \
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
25 -DCIVETWEB_HAS_DISABLE_KEEP_ALIVE=1 \
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
26 -DDCMTK_VERSION_NUMBER=365 \
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
27 -DMONGOOSE_USE_CALLBACKS=1 \
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
28 -DORTHANC_BUILDING_FRAMEWORK_LIBRARY=0 \
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
29 -DORTHANC_BUILDING_SERVER_LIBRARY=1 \
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
30 -DORTHANC_BUILD_UNIT_TESTS=1 \
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
31 -DORTHANC_ENABLE_BASE64=1 \
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
32 -DORTHANC_ENABLE_CIVETWEB=1 \
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
33 -DORTHANC_ENABLE_CURL=1 \
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
34 -DORTHANC_ENABLE_DCMTK=1 \
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
35 -DORTHANC_ENABLE_DCMTK_JPEG=1 \
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
36 -DORTHANC_ENABLE_DCMTK_JPEG_LOSSLESS=1 \
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
37 -DORTHANC_ENABLE_DCMTK_NETWORKING=1 \
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
38 -DORTHANC_ENABLE_DCMTK_TRANSCODING=1 \
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
39 -DORTHANC_ENABLE_JPEG=1 \
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
40 -DORTHANC_ENABLE_LOCALE=1 \
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
41 -DORTHANC_ENABLE_LOGGING=1 \
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
42 -DORTHANC_ENABLE_LOGGING_STDIO=1 \
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
43 -DORTHANC_ENABLE_LUA=1 \
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
44 -DORTHANC_ENABLE_MD5=1 \
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
45 -DORTHANC_ENABLE_MONGOOSE=0 \
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
46 -DORTHANC_ENABLE_PKCS11=1 \
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
47 -DORTHANC_ENABLE_PLUGINS=1 \
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
48 -DORTHANC_ENABLE_PNG=1 \
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
49 -DORTHANC_ENABLE_PUGIXML=1 \
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
50 -DORTHANC_ENABLE_SQLITE=1 \
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
51 -DORTHANC_ENABLE_SSL=1 \
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
52 -DORTHANC_ENABLE_ZLIB=1 \
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
53 -DORTHANC_SANDBOXED=0 \
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
54 -DORTHANC_SQLITE_VERSION=3027001 \
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
55 -DORTHANC_UNIT_TESTS_LINK_FRAMEWORK=1 \
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
56 -DPUGIXML_VERSION=150 \
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
57 -DUNIT_TESTS_WITH_HTTP_CONNEXIONS=1 \
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
58 -D__BYTE_ORDER=__LITTLE_ENDIAN \
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
59 -D__GNUC__ \
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
60 -D__cplusplus=201103 \
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
61 -D__linux__ \
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
62 -UNDEBUG \
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
63 \
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
64 ../../OrthancFramework/Sources \
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
65 ../../OrthancFramework/UnitTestsSources \
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
66 ../../OrthancServer/Plugins/Engine \
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
67 ../../OrthancServer/Plugins/Include \
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
68 ../../OrthancServer/Sources \
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
69 ../../OrthancServer/UnitTestsSources \
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
70 \
fbc49a65340a cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
71 2>&1 | grep -vE '\[unusedFunction\]$|^\^$|^$|function .* is never used'