CppCheck_Suppressions.txt.in 4.84 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

// -------- Project Wide ------------------
David Fairbrother's avatar
David Fairbrother committed
6
7

// Hide warnings about using explicit keyword constructors as we have "too many"
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// 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

// 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 -------
24
25
unmatchedSuppression

26
27
28
// If-init not supported
syntaxError:${CMAKE_SOURCE_DIR}/Framework/API/src/MatrixWorkspace.cpp

29
30
31
32
33
34
35
// --- To be added back ------
//cstyleCase:*${CMAKE_SOURCE_DIR}/MantidPlot

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

// Cppcheck struggles with some inheritance chains, some of these might be true though
36
unusedPrivateFunction
37
38
39
40
41
42
43

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

// Libs we have in-source
// *:${CMAKE_SOURCE_DIR}/Framework/DataObjects/inc/MantidDataObjects/MortonIndex/*

44
45
// ---------- Individual suppressions -----------------

46
47
48
pureVirtualCall:${CMAKE_SOURCE_DIR}/qt/scientific_interfaces/Indirect/IndirectBayesTab.cpp
pureVirtualCall:${CMAKE_SOURCE_DIR}/qt/scientific_interfaces/Indirect/IndirectBayesTab.h

49
50
51
52
53
54
// Macro expansion means this is incorrectly flagged on Unix
redundantAssignment:${CMAKE_SOURCE_DIR}/Framework/DataHandling/src/LoadRaw/isisraw.cpp

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

55
56
// the mru-list is intentionally not altered
operatorEqVarError:${CMAKE_SOURCE_DIR}/Framework/DataObjects/src/EventList.cpp:309
57
58
59
60
// false positives from checking a second time using a mutex for multi-threading
identicalConditionAfterEarlyExit:${CMAKE_SOURCE_DIR}/Framework/DataObjects/src/EventList.cpp:950
identicalConditionAfterEarlyExit:${CMAKE_SOURCE_DIR}/Framework/DataObjects/src/EventList.cpp:1016
identicalConditionAfterEarlyExit:${CMAKE_SOURCE_DIR}/Framework/DataObjects/src/EventList.cpp:1046
61

62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
// --------- 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

79
80
81
82
83
copyCtorAndEqOperator:${CMAKE_SOURCE_DIR}/Framework/Geometry/inc/MantidGeometry/Instrument/CompAssembly.h
copyCtorAndEqOperator:${CMAKE_SOURCE_DIR}/Framework/Geometry/inc/MantidGeometry/Instrument/Container.h
copyCtorAndEqOperator:${CMAKE_SOURCE_DIR}/Framework/Geometry/inc/MantidGeometry/Instrument/ObjCompAssembly.h
copyCtorAndEqOperator:${CMAKE_SOURCE_DIR}/Framework/Geometry/inc/MantidGeometry/Rendering/GeometryHandler.h

84
85
86
87
88
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
89
noCopyConstructor:${CMAKE_SOURCE_DIR}/Framework/Geometry/inc/MantidGeometry/Rendering/vtkGeometryCacheWriter.h
90
91
92
93
94
95
96

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

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

// Libs we have in-source
97
98
99
*:${CMAKE_SOURCE_DIR}/Framework/ICat/src/GSoap/*
*:${CMAKE_SOURCE_DIR}/Framework/ICat/src/ICat3/GSoapGenerated/*
*:${CMAKE_SOURCE_DIR}/Framework/ICat/src/ICat4/GSoapGenerated/*