CppCheck_Suppressions.txt.in 4.04 KB
Newer Older
1
2
3
// suppress specific rule in specific files
// NOTE this needs the full path to the file, so would need this file to be generated by cmake
//      as different build servers have different starts to the file path
4
5
6
7



// -------- Project Wide ------------------
David Fairbrother's avatar
David Fairbrother committed
8
9

// Hide warnings about using explicit keyword constructors as we have "too many"
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
// and automated clang-tidy breaks a couple of implicit conversions we use widely
noExplicitConstructor

// Hide warnings about shadowed members for inheritance. Typically "m_log" with Algorithm
duplInheritedMember

// We have some potentially uninitialized member vars but too many to fix at the moment
uninitMemberVar

// Cppcheck struggles with some inheritance chains, some of these might be true though
unusedPrivateFunction

// Nice to have, not need to have at the moment
useInitializationList

// A large number of copying instead of pass by ref were picked up by clang-tidy, but around 200 remain
passedByValue

// Around 100 of these exist where noConstructor is present
noConstructor

// Pre-processor Directives, such as #error, which are upstream anyway
preprocessorErrorDirective

// ---------- cppcheck 1.90 Transition -------
// If-init not supported
syntaxError:${CMAKE_SOURCE_DIR}/Framework/API/src/MatrixWorkspace.cpp

// ---------- Individual suppressions -----------------

// Mantid Plot specific ones we probably won't fix before removal
cstyleCase:*${CMAKE_SOURCE_DIR}/MantidPlot
*:${CMAKE_SOURCE_DIR}/MantidPlot/src/origin/tree.hh
*:${CMAKE_SOURCE_DIR}/MantidPlot/src/nrutil.cpp

// Macro expansion means this is incorrectly flagged on Unix
redundantAssignment:${CMAKE_SOURCE_DIR}/Framework/DataHandling/src/LoadRaw/isisraw.cpp

// Ones below was beyond the Cppcheck 1.90 migration scope
pureVirtualCall:${CMAKE_SOURCE_DIR}/qt/scientific_interfaces/Indirect/IndirectBayesTab.cpp

// Ref binding means Cppcheck can't see these are used
unreadVariable:${CMAKE_SOURCE_DIR}/Framework/Algorithms/src/MaskBinsIf.cpp

// --------- Missing copy assignment / constructors -------------------
// We don't want more creeping in so just mark these one by one

copyCtorAndEqOperator:${CMAKE_SOURCE_DIR}/Framework/API/inc/MantidAPI/BoxController.h
copyCtorAndEqOperator:${CMAKE_SOURCE_DIR}/Framework/API/inc/MantidAPI/ExperimentInfo.h
copyCtorAndEqOperator:${CMAKE_SOURCE_DIR}/Framework/API/inc/MantidAPI/IFunction.h
copyCtorAndEqOperator:${CMAKE_SOURCE_DIR}/Framework/API/inc/MantidAPI/MDGeometry.h
copyCtorAndEqOperator:${CMAKE_SOURCE_DIR}/Framework/API/inc/MantidAPI/MultipleExperimentInfos.h
copyCtorAndEqOperator:${CMAKE_SOURCE_DIR}/Framework/API/inc/MantidAPI/SingleValueParameter.h
copyCtorAndEqOperator:${CMAKE_SOURCE_DIR}/Framework/API/inc/MantidAPI/VectorParameter.h

copyCtorAndEqOperator:${CMAKE_SOURCE_DIR}/Framework/Catalog/inc/MantidCatalog/ONCat.h
copyCtorAndEqOperator:${CMAKE_SOURCE_DIR}/Framework/Catalog/inc/MantidCatalog/ONCatEntity.h

copyCtorAndEqOperator:${CMAKE_SOURCE_DIR}/Framework/Crystal/inc/MantidCrystal/IndexSXPeaks.h
copyCtorAndEqOperator:${CMAKE_SOURCE_DIR}/Framework/Crystal/inc/MantidCrystal/IntegratePeakTimeSlices.h

copyCtorAndEqOperator:${CMAKE_SOURCE_DIR}/qt/widgets/plotting/inc/MantidQtWidgets/Plotting/Qwt/QwtWorkspaceBinData.h
copyCtorAndEqOperator:${CMAKE_SOURCE_DIR}/qt/widgets/plotting/inc/MantidQtWidgets/Plotting/Qwt/QwtWorkspaceSpectrumData.h

noCopyConstructor:${CMAKE_SOURCE_DIR}/Framework/DataHandling/inc/MantidDataHandling/BankPulseTimes.h
noCopyConstructor:${CMAKE_SOURCE_DIR}/Framework/DataHandling/src/LoadRaw/isisraw.h

// ----------------- Upstream libs ---------------

// Always ignore bin dir
*:*${CMAKE_BINARY_DIR}/*

// For some reason upstream libs sometimes end up in the check results
*:*/usr/include/*

// All ANN files as they are upstream anyway
*:*${CMAKE_SOURCE_DIR}/Framework/Kernel/src/ANN/*

// Libs we have in-source
*:*${CMAKE_SOURCE_DIR}/Framework/DataObjects/inc/MantidDataObjects/MortonIndex/*
*:*${CMAKE_SOURCE_DIR}/Framework/ICat/src/GSoap/*
*:*${CMAKE_SOURCE_DIR}/ICat/src/ICat3/GSoapGenerated/*
*:*${CMAKE_SOURCE_DIR}/ICat/src/ICat4/GSoapGenerated/*
*:*${CMAKE_SOURCE_DIR}/MantidPlot/src/zlib123/*