It is recommended to use the CppDepend interactive UI capabilities
to make the most of CppDepend by mastering all aspects of your code.
Diagrams
Application Metrics
Note: Further Application Statistics are available.
|
Rules summary
45390This section lists all Rules violated, and Rules or Queries with Error- Number of Rules or Queries with Error (syntax error, exception thrown, time-out): 0
- Number of Rules violated: 42
Summary of Rules violated
development-time, from within Visual
Studio. Online documentation.
on existing code base? Use the option
Recent Violations Only!
can be used to break the build process if
violated. Online documentation.
Application Statistics
Stat | # Occurences | Avg | StdDev | Max |
---|---|---|---|---|
Public properties on classes | 256 Classes | 0 | 0 | 0 public properties on Keywords |
Public methods on classes | 256 classes | 9.64 | 17.86 | 168 public methods on __Globals |
Arguments on public methods on classes | 2,469 methods | 0.99 | 1.14 | 9 arguments on __Globals.valueFlowForward(Token*const,constToken*const,constVariable*const,constunsignedint,std::list<ValueFlow::Value>,constbool,TokenList*const,ErrorLogger*const,constSettings*const) |
Cyclomatic complexity on non abstract Methods | 6,145 Methods | 0.78 | 2.52 | CC = 52 for Library.load(consttinyxml2::XMLDocument&) |
Projects Metrics
Clicking column header arrows sorts values.
Clicking column header title text redirect to the online Code Metric definition.
Projects | # lines of code | # Types | # Abstract Types | # lines of comment | % Comment | Afferent Coupling | Efferent Coupling | Relational Cohesion | Instability | Abstractness | Distance |
---|---|---|---|---|---|---|---|---|---|---|---|
cppcheck v1.0.0.0 | 29136 | 179 | 5 | 8191 | 21 | 70 | 59 | 5.07 | 0.46 | 0.03 | 0.36 |
cli v1.0.0.0 | 959 | 8 | 0 | 368 | 27 | 0 | 66 | 1.4 | 1 | 0 | 0 |
testrunner v1.0.0.0 | 26308 | 126 | 0 | 5412 | 17 | 0 | 132 | 1.55 | 1 | 0.01 | 0.01 |
Types Metrics : Code Quality
If you wish to define thresholds on types' Code Metrics, consider writing some Rule.
Clicking column header arrows sorts values.
Clicking column header title text redirect to the online Code Metric definition.
Type Name | Type Rank | # Lines Of Code | # Lines Of Comment | % Comment | Cyclomatic Complexity | Afferent Coupling | Efferent Coupling | Type Namespace | |||
---|---|---|---|---|---|---|---|---|---|---|---|
Token | 9.96 | 858 | 43 | 364 | 29.79 | 423 | 33 | - | 81 | 33 | |
Settings | 7.95 | 159 | 3 | 36 | 18.46 | 41 | 13 | - | 96 | 25 | |
Tokenizer | 6.97 | 5727 | 200 | 1555 | 21.35 | 2375 | 132 | - | 83 | 62 | |
TestFixture | 6.85 | 103 | 1 | 4 | 3.74 | 46 | 10 | - | 59 | 28 | |
__Globals | 5.21 | 189 | 4 | 29 | 13.3 | 65 | 13 | - | 52 | 36 | |
__Globals | 5.19 | 2996 | 132 | 494 | 14.15 | 1409 | 182 | - | 38 | 74 | |
Scope | 3.79 | 326 | 16 | 86 | 20.87 | 167 | 13 | - | 41 | 36 | |
ErrorLogger | 3.61 | 21 | 3 | 33 | 61.11 | 20 | 6 | - | 48 | 15 | |
Variable | 3.36 | 154 | 3 | 199 | 56.37 | 94 | 2 | - | 36 | 17 | |
Library | 3.3 | 608 | 11 | 30 | 4.7 | 277 | 96 | - | 42 | 45 | |
XMLDocument | 3.02 | 207 | 1 | 129 | 38.39 | 62 | 13 | - | 15 | 19 | tinyxml2 |
XMLUtil | 2.96 | 129 | 3 | 21 | 14 | 56 | 0 | - | 10 | 2 | tinyxml2 |
Severity+SeverityType | 2.91 | - | - | 0 | - | 0 | - | - | 40 | 0 | |
XMLError | 2.61 | - | - | 0 | - | 0 | - | - | 9 | 0 | tinyxml2 |
XMLNode | 2.57 | 193 | 6 | 148 | 43.4 | 93 | 1 | - | 10 | 12 | tinyxml2 |
Check | 2.42 | 35 | 1 | 23 | 39.66 | 24 | 4 | - | 38 | 18 | |
StrPair | 2.33 | 118 | 5 | 28 | 19.18 | 39 | 0 | - | 7 | 9 | tinyxml2 |
XMLVisitor | 2.25 | 8 | 0 | 43 | 84.31 | 12 | 0 | - | 8 | 7 | tinyxml2 |
SymbolDatabase | 2.2 | 1311 | 28 | 261 | 16.6 | 508 | 56 | - | 34 | 45 | |
StrPair+AnonymousEnum | 2.2 | - | - | 0 | - | 0 | - | - | 6 | 0 | tinyxml2 |
MemPoolT<SIZE>+Chunk | 1.93 | 0 | 0 | 0 | - | 0 | 0 | - | 2 | 1 | tinyxml2 |
ErrorLogger+ErrorMessage | 1.9 | 171 | 6 | 52 | 23.32 | 57 | 39 | - | 18 | 31 | |
InternalError | 1.87 | 9 | 0 | 3 | 25 | 7 | 0 | - | 18 | 6 | |
XMLText | 1.86 | 30 | 0 | 17 | 36.17 | 19 | 0 | - | 7 | 9 | tinyxml2 |
Type | 1.82 | 76 | 4 | 14 | 15.56 | 38 | 4 | - | 14 | 24 | |
MathLib | 1.79 | 449 | 12 | 62 | 12.13 | 195 | 56 | - | 19 | 16 | |
Check+FileInfo | 1.78 | 0 | 0 | 1 | 100 | 3 | 0 | - | 7 | 0 | |
XMLElement | 1.75 | 231 | 8 | 206 | 47.14 | 104 | 2 | - | 7 | 13 | tinyxml2 |
Function | 1.7 | 254 | 9 | 53 | 17.26 | 144 | 5 | - | 26 | 28 | |
XMLUnknown | 1.66 | 16 | 0 | 11 | 40.74 | 12 | 0 | - | 6 | 7 | tinyxml2 |
XMLDeclaration | 1.66 | 16 | 0 | 16 | 50 | 12 | 0 | - | 6 | 7 | tinyxml2 |
TokenList | 1.66 | 222 | 9 | 93 | 29.52 | 85 | 13 | - | 20 | 23 | |
Path | 1.55 | 93 | 2 | 97 | 51.05 | 47 | 45 | - | 17 | 19 | |
MemPool | 1.45 | 0 | 0 | 4 | 100 | 9 | 0 | - | 5 | 0 | tinyxml2 |
Library+ErrorCode | 1.44 | - | - | 0 | - | 0 | - | - | 15 | 0 | |
Scope+ScopeType | 1.31 | - | - | 0 | - | 0 | - | - | 17 | 0 | |
Preprocessor | 1.3 | 1490 | 38 | 404 | 21.33 | 576 | 249 | - | 12 | 52 | |
Settings+PlatformType | 1.28 | - | - | 0 | - | 0 | - | - | 12 | 0 | |
Token+Type | 1.28 | - | - | 0 | - | 0 | - | - | 17 | 0 | |
AccessControl | 1.24 | - | - | 0 | - | 0 | - | - | 9 | 0 | |
Library+Container+Action | 1.17 | - | - | 0 | - | 0 | - | - | 5 | 0 | |
Library+Container+Yield | 1.17 | - | - | 0 | - | 0 | - | - | 5 | 0 | |
ErrorLogger+ErrorMessage+FileLocation | 1.17 | 17 | 0 | 17 | 50 | 13 | 4 | - | 13 | 11 | |
Suppressions | 1.16 | 76 | 7 | 57 | 42.86 | 50 | 30 | - | 14 | 24 | |
XMLAttribute | 1.16 | 66 | 0 | 38 | 36.54 | 34 | 0 | - | 5 | 6 | tinyxml2 |
XMLComment | 1.15 | 16 | 0 | 5 | 23.81 | 12 | 0 | - | 4 | 7 | tinyxml2 |
Library+Error | 1.03 | 6 | 0 | 0 | 0 | 7 | 0 | - | 14 | 5 | |
Library+ArgumentChecks+MinSize+Type | 1.02 | - | - | 0 | - | 0 | - | - | 3 | 0 | |
VarInfo+AllocStatus | 0.89 | - | - | 0 | - | 0 | - | - | 2 | 0 | |
Variables | 0.87 | 122 | 8 | 19 | 13.48 | 63 | 15 | - | 2 | 22 | |
SHOWTIME_MODES | 0.84 | - | - | 0 | - | 0 | - | - | 7 | 0 | |
__Globals | 0.78 | 7 | 0 | 0 | 0 | 3 | 0 | - | 3 | 4 | tinyxml2 |
Settings+Language | 0.77 | - | - | 0 | - | 0 | - | - | 6 | 0 | |
Function+Type | 0.73 | - | - | 0 | - | 0 | - | - | 9 | 0 | |
InternalError+Type | 0.72 | - | - | 0 | - | 0 | - | - | 2 | 0 | |
options | 0.72 | 11 | 0 | 10 | 47.62 | 9 | 0 | - | 2 | 9 | |
Value | 0.72 | 16 | 0 | 0 | 0 | 4 | 0 | - | 7 | 4 | ValueFlow |
Type+BaseInfo | 0.68 | 5 | 0 | 1 | 16.67 | 7 | 0 | - | 7 | 5 | |
Whitespace | 0.65 | - | - | 0 | - | 0 | - | - | 2 | 0 | tinyxml2 |
CppCheck | 0.63 | 300 | 9 | 154 | 33.92 | 104 | 73 | - | 8 | 44 | |
XMLElement+AnonymousEnum | 0.63 | - | - | 0 | - | 0 | - | - | 2 | 0 | tinyxml2 |
Suppressions+SuppressionEntry | 0.61 | 3 | 0 | 0 | 0 | 5 | 0 | - | 3 | 5 | |
Entity | 0.58 | 0 | 0 | 0 | - | 0 | 0 | - | 2 | 2 | tinyxml2 |
CheckMemoryLeak+AllocType | 0.58 | - | - | 0 | - | 0 | - | - | 7 | 0 | |
Library+Container | 0.57 | 12 | 0 | 0 | 0 | 9 | 2 | - | 4 | 15 | |
MemPoolT<SIZE> | 0.55 | 40 | 2 | 2 | 4.76 | 15 | 0 | - | 2 | 6 | tinyxml2 |
RedirectOutputError | 0.53 | 14 | 0 | 20 | 58.82 | 6 | 2 | - | 3 | 9 | |
Dimension | 0.52 | 4 | 0 | 3 | 42.86 | 6 | 0 | - | 4 | 3 | |
Library+PodType | 0.51 | 0 | 0 | 1 | 100 | 4 | 0 | - | 4 | 2 | |
CheckMemoryLeak | 0.51 | 214 | 3 | 99 | 31.63 | 117 | 28 | - | 6 | 29 | |
Filepointer+AppendMode | 0.51 | - | - | 0 | - | 0 | - | - | 2 | 0 | |
Filepointer+Operation | 0.51 | - | - | 0 | - | 0 | - | - | 2 | 0 | |
OpenMode | 0.51 | - | - | 0 | - | 0 | - | - | 2 | 0 | |
XMLAttribute+AnonymousEnum | 0.51 | - | - | 0 | - | 0 | - | - | 1 | 0 | tinyxml2 |
DynArray<T,INIT> | 0.5 | 34 | 0 | 1 | 2.86 | 19 | 0 | - | 2 | 1 | tinyxml2 |
StrPair+AnonymousEnum | 0.5 | - | - | 0 | - | 0 | - | - | 1 | 0 | tinyxml2 |
Variables+VariableType | 0.5 | - | - | 0 | - | 0 | - | - | 3 | 0 | |
CheckClass | 0.49 | 1065 | 66 | 374 | 25.99 | 558 | 141 | - | 3 | 48 | |
Type+NeedInitialization | 0.48 | - | - | 0 | - | 0 | - | - | 6 | 0 | |
TimerResultsData | 0.48 | 4 | 0 | 0 | 0 | 5 | 0 | - | 2 | 1 | |
Library+PlatformType | 0.48 | 8 | 0 | 0 | 0 | 7 | 0 | - | 3 | 4 | |
CheckMemoryLeakInFunction | 0.46 | 995 | 15 | 263 | 20.91 | 435 | 26 | - | 5 | 33 | |
TemplateSimplifier | 0.46 | 753 | 32 | 236 | 23.86 | 339 | 53 | - | 3 | 36 | |
CheckOther | 0.46 | 1340 | 86 | 377 | 21.96 | 678 | 137 | - | 3 | 45 | |
Library+ArgumentChecks | 0.46 | 5 | 0 | 0 | 0 | 5 | 0 | - | 5 | 3 | |
Token+Anonymous | 0.44 | 0 | 0 | 0 | - | 1 | 0 | - | 1 | 0 | |
Token+AnonymousEnum | 0.44 | - | - | 0 | - | 0 | - | - | 1 | 0 | |
XMLPrinter | 0.43 | 168 | 5 | 93 | 35.63 | 71 | 0 | - | 2 | 18 | tinyxml2 |
Scope+UsingInfo | 0.43 | 0 | 0 | 0 | - | 6 | 0 | - | 3 | 2 | |
MemPoolT<SIZE>+Block | 0.42 | 0 | 0 | 0 | - | 0 | 0 | - | 1 | 1 | tinyxml2 |
MemPoolT<SIZE>+AnonymousEnum | 0.42 | - | - | 0 | - | 0 | - | - | 1 | 0 | tinyxml2 |
TestRegistry | 0.4 | 4 | 0 | 3 | 42.86 | 8 | 1 | - | 1 | 2 | |
Variable+AnonymousEnum | 0.39 | - | - | 0 | - | 0 | - | - | 1 | 0 | |
PathMatch | 0.36 | 29 | 2 | 31 | 51.67 | 21 | 10 | - | 2 | 14 | |
CheckStl | 0.35 | 760 | 35 | 208 | 21.49 | 369 | 78 | - | 2 | 42 | |
FileLister | 0.35 | 46 | 0 | 45 | 49.45 | 18 | 7 | - | 4 | 12 | |
XMLElement+AnonymousEnum | 0.35 | - | - | 0 | - | 0 | - | - | 1 | 0 | tinyxml2 |
Library+Container+Function | 0.35 | 0 | 0 | 0 | - | 4 | 0 | - | 2 | 2 | |
TimerResultsIntf | 0.34 | 0 | 0 | 0 | - | 5 | 0 | - | 2 | 3 | |
CheckNullPointer | 0.33 | 257 | 12 | 107 | 29.4 | 144 | 22 | - | 4 | 32 | |
Library+ArgumentChecks+MinSize | 0.33 | 3 | 0 | 0 | 0 | 4 | 0 | - | 3 | 2 | |
__Globals | 0.33 | 171 | 3 | 36 | 17.39 | 55 | 10 | - | 3 | 25 | |
ExecutionPath | 0.31 | 214 | 5 | 81 | 27.46 | 107 | 21 | - | 2 | 19 | |
ThreadExecutor | 0.31 | 102 | 3 | 23 | 18.4 | 30 | 7 | - | 3 | 27 | |
CheckUninitVar | 0.31 | 568 | 16 | 103 | 15.35 | 290 | 37 | - | 3 | 44 | |
Timer | 0.3 | 18 | 0 | 0 | 0 | 9 | 0 | - | 2 | 12 | |
TimerResults | 0.3 | 18 | 1 | 1 | 5.26 | 11 | 7 | - | 2 | 20 | |
CppCheckExecutor | 0.3 | 211 | 2 | 116 | 35.47 | 80 | 27 | - | 3 | 47 | |
VarInfo+AllocInfo | 0.29 | 2 | 0 | 0 | 0 | 4 | 0 | - | 2 | 2 | |
Type+FriendInfo | 0.28 | 3 | 0 | 0 | 0 | 6 | 0 | - | 3 | 3 | |
CheckMemoryLeakInClass | 0.28 | 119 | 6 | 34 | 22.22 | 65 | 15 | - | 1 | 27 | |
CheckBool | 0.28 | 245 | 19 | 52 | 17.51 | 139 | 20 | - | 1 | 24 | |
CheckExceptionSafety | 0.28 | 137 | 11 | 70 | 33.82 | 79 | 16 | - | 1 | 24 | |
CheckAssert | 0.28 | 53 | 4 | 14 | 20.9 | 41 | 8 | - | 1 | 16 | |
Check64BitPortability | 0.28 | 69 | 3 | 19 | 21.59 | 45 | 4 | - | 1 | 17 | |
CheckVaarg | 0.28 | 79 | 4 | 16 | 16.84 | 46 | 15 | - | 1 | 22 | |
CheckSizeof | 0.28 | 178 | 12 | 49 | 21.59 | 96 | 24 | - | 1 | 19 | |
CheckMemoryLeakStructMember | 0.28 | 113 | 5 | 33 | 22.6 | 65 | 4 | - | 1 | 19 | |
CheckPostfixOperator | 0.28 | 27 | 2 | 12 | 30.77 | 24 | 4 | - | 1 | 15 | |
CheckType | 0.27 | 123 | 9 | 32 | 20.65 | 80 | 20 | - | 1 | 24 | |
CheckNonReentrantFunctions | 0.27 | 39 | 5 | 15 | 27.78 | 28 | 19 | - | 1 | 21 | |
CheckLeakAutoVar | 0.27 | 288 | 7 | 62 | 17.71 | 137 | 49 | - | 1 | 32 | |
Variables+VariableUsage | 0.27 | 11 | 0 | 3 | 21.43 | 8 | 0 | - | 2 | 6 | |
Variables+ScopeGuard | 0.27 | 4 | 0 | 1 | 20 | 4 | 0 | - | 2 | 2 | |
scopeStackEntryType | 0.26 | 4 | 0 | 2 | 33.33 | 5 | 0 | - | 1 | 2 | anonymous_namespace{tokenize.cpp} |
EnumValue | 0.26 | 35 | 1 | 2 | 5.41 | 14 | 1 | - | 1 | 13 | |
__Globals | 0.26 | 14 | 1 | 0 | 0 | 2 | 0 | - | 1 | 4 | ValueFlow |
Space | 0.26 | 2 | 0 | 0 | 0 | 5 | 0 | - | 1 | 3 | |
CheckObsoleteFunctions | 0.26 | 53 | 5 | 17 | 24.29 | 26 | 26 | - | 1 | 22 | |
CheckUnusedVar | 0.26 | 391 | 8 | 87 | 18.2 | 190 | 40 | - | 1 | 46 | |
CheckUnusedFunctions | 0.26 | 145 | 3 | 36 | 19.89 | 78 | 9 | - | 1 | 30 | |
givenACodeSampleToTokenize | 0.26 | 7 | 0 | 0 | 0 | 8 | 1 | - | 2 | 8 | |
CmdLineParser | 0.26 | 400 | 2 | 117 | 22.63 | 143 | 48 | - | 2 | 36 | |
Preprocessor+HeaderTypes | 0.25 | - | - | 0 | - | 0 | - | - | 2 | 0 | |
CheckString | 0.25 | 163 | 13 | 39 | 19.31 | 90 | 22 | - | 1 | 18 | |
CheckBoost | 0.25 | 26 | 3 | 7 | 21.21 | 23 | 4 | - | 1 | 13 | |
CheckMemoryLeakNoVar | 0.25 | 69 | 6 | 39 | 36.11 | 42 | 16 | - | 1 | 23 | |
CheckAutoVariables | 0.25 | 180 | 8 | 43 | 19.28 | 101 | 7 | - | 1 | 18 | |
Function+AnonymousEnum | 0.24 | - | - | 0 | - | 0 | - | - | 1 | 0 | |
TestCppcheck+ErrorLogger2 | 0.24 | 1 | 0 | 0 | 0 | 8 | 0 | - | 1 | 6 | |
Suppressions+FileMatcher | 0.24 | 67 | 5 | 32 | 32.32 | 34 | 9 | - | 1 | 19 | |
Severity | 0.24 | 38 | 0 | 1 | 2.56 | 25 | 9 | - | 1 | 7 | |
Library+Platform | 0.24 | 2 | 0 | 0 | 0 | 7 | 1 | - | 1 | 11 | |
Library+ExportedFunctions | 0.24 | 4 | 0 | 0 | 0 | 9 | 0 | - | 1 | 6 | |
Library+CodeBlock | 0.24 | 9 | 0 | 0 | 0 | 13 | 0 | - | 1 | 7 | |
CheckIO | 0.24 | 1159 | 14 | 65 | 5.31 | 542 | 73 | - | 1 | 42 | |
CheckCondition | 0.24 | 404 | 19 | 63 | 13.49 | 208 | 46 | - | 1 | 33 | |
CppCheckExecutor | 0.23 | 211 | 2 | 116 | 35.47 | 80 | 27 | - | 2 | 47 | |
XMLPrinter+AnonymousEnum | 0.23 | - | - | 0 | - | 0 | - | - | 1 | 0 | tinyxml2 |
CheckBufferOverrun | 0.23 | 842 | 36 | 271 | 24.35 | 384 | 110 | - | 1 | 45 | |
__Globals | 0.22 | 1 | 0 | 0 | 0 | 1 | 0 | - | 1 | 2 | anonymous_namespace{timer.cpp} |
FileLister | 0.21 | 46 | 0 | 45 | 49.45 | 18 | 7 | - | 2 | 12 | |
TestPreprocessor+OurPreprocessor | 0.21 | 4 | 0 | 0 | 0 | 3 | 3 | - | 1 | 6 | |
SimpleSuppressor | 0.2 | 5 | 0 | 0 | 0 | 9 | 0 | - | 1 | 10 | |
ThreadExecutor+MessageType | 0.2 | - | - | 0 | - | 0 | - | - | 1 | 0 | |
ThreadExecutor+MessageType | 0.2 | - | - | 0 | - | 0 | - | - | 1 | 0 | |
CheckUnusedFunctions+FunctionUsage | 0.2 | 3 | 0 | 0 | 0 | 6 | 0 | - | 1 | 3 | |
PreprocessorMacro | 0.19 | 147 | 5 | 33 | 18.33 | 62 | 17 | - | 1 | 21 | |
VarInfo | 0.19 | 23 | 2 | 2 | 8 | 14 | 4 | - | 1 | 14 | |
Settings+Rule | 0.19 | 3 | 0 | 4 | 57.14 | 6 | 0 | - | 1 | 2 | |
EraseCheckLoop | 0.18 | 54 | 3 | 30 | 35.71 | 32 | 5 | - | 1 | 11 | |
__Globals | 0.18 | 12 | 2 | 3 | 20 | 7 | 7 | - | 1 | 24 | anonymous_namespace{checkother.cpp} |
VarInfo | 0.18 | 2 | 0 | 3 | 60 | 4 | 0 | - | 1 | 2 | |
CheckClass+Usage | 0.18 | 2 | 0 | 2 | 50 | 6 | 0 | - | 1 | 1 | |
__Globals | 0.18 | 15 | 0 | 0 | 0 | 9 | 0 | - | 1 | 3 | anonymous_namespace{checkclass.cpp} |
CheckIO+ArgumentInfo | 0.18 | 189 | 6 | 13 | 6.44 | 74 | 4 | - | 1 | 19 | |
Filepointer | 0.18 | 5 | 0 | 0 | 0 | 4 | 0 | - | 1 | 4 | |
CheckUninitVar+Alloc | 0.18 | - | - | 0 | - | 0 | - | - | 1 | 0 | |
CheckUninitVar+MyFileInfo | 0.18 | 0 | 0 | 1 | 100 | 6 | 0 | - | 1 | 2 | |
UninitVar | 0.18 | 488 | 17 | 163 | 25.04 | 245 | 23 | - | 1 | 31 | |
CheckBufferOverrun+MyFileInfo+ArrayUsage | 0.18 | 0 | 0 | 0 | - | 6 | 0 | - | 1 | 3 | |
CheckBufferOverrun+ArrayInfo | 0.18 | 35 | 2 | 20 | 36.36 | 25 | 1 | - | 1 | 13 | |
CheckBufferOverrun+MyFileInfo | 0.18 | 0 | 0 | 1 | 100 | 6 | 0 | - | 1 | 2 | |
CmdLineParser | 0.18 | 400 | 2 | 117 | 22.63 | 143 | 48 | - | 1 | 36 | |
ThreadExecutor | 0.18 | 102 | 3 | 23 | 18.4 | 30 | 7 | - | 1 | 27 | |
PathMatch | 0.18 | 29 | 2 | 31 | 51.67 | 21 | 10 | - | 1 | 14 | |
__Globals | 0.15 | 0 | 0 | 0 | - | 1 | 0 | - | 0 | 1 | anonymous_namespace{checkuninitvar.cpp} |
TestAssert | 0.15 | 48 | 0 | 4 | 7.69 | 15 | 5 | - | 0 | 10 | |
__Globals | 0.15 | 0 | 0 | 0 | - | 1 | 0 | - | 0 | 1 | anonymous_namespace{checkunusedvar.cpp} |
__Globals | 0.15 | 0 | 0 | 0 | - | 1 | 0 | - | 0 | 1 | anonymous_namespace{test64bit.cpp} |
Test64BitPortability | 0.15 | 60 | 0 | 10 | 14.29 | 19 | 5 | - | 0 | 10 | |
__Globals | 0.15 | 0 | 0 | 0 | - | 1 | 0 | - | 0 | 1 | anonymous_namespace{checkcondition.cpp} |
__Globals | 0.15 | 0 | 0 | 0 | - | 1 | 0 | - | 0 | 1 | anonymous_namespace{checkstring.cpp} |
TestCppcheck | 0.15 | 25 | 3 | 6 | 19.35 | 19 | 10 | - | 0 | 14 | |
__Globals | 0.15 | 0 | 0 | 0 | - | 1 | 0 | - | 0 | 1 | anonymous_namespace{checkexceptionsafety .cpp} |
__Globals | 0.15 | 0 | 0 | 0 | - | 1 | 0 | - | 0 | 1 | anonymous_namespace{checkstl.cpp} |
__Globals | 0.15 | 0 | 0 | 0 | - | 1 | 0 | - | 0 | 1 | anonymous_namespace{checktype.cpp} |
__Globals | 0.15 | 0 | 0 | 0 | - | 1 | 0 | - | 0 | 1 | anonymous_namespace{testassert.cpp} |
TestErrorLogger | 0.15 | 200 | 0 | 14 | 6.54 | 48 | 45 | - | 0 | 15 | |
__Globals | 0.15 | 0 | 0 | 0 | - | 1 | 0 | - | 0 | 1 | anonymous_namespace{checkbool.cpp} |
AST_state | 0.15 | 3 | 0 | 1 | 25 | 5 | 0 | - | 0 | 3 | |
__Globals | 0.15 | 0 | 0 | 0 | - | 1 | 0 | - | 0 | 1 | anonymous_namespace{checkassert.cpp} |
TestVaarg | 0.15 | 55 | 0 | 8 | 12.7 | 17 | 5 | - | 0 | 10 | |
__Globals | 0.15 | 0 | 0 | 0 | - | 1 | 0 | - | 0 | 1 | anonymous_namespace{checkautovariables .cpp} |
IMAGEHLP_SYMBOL64_EXT | 0.15 | 0 | 0 | 0 | - | 3 | 0 | - | 0 | 2 | |
__Globals | 0.15 | 0 | 0 | 0 | - | 1 | 0 | - | 0 | 1 | anonymous_namespace{checkbufferoverrun .cpp} |
__Globals | 0.15 | 0 | 0 | 0 | - | 1 | 0 | - | 0 | 1 | anonymous_namespace{testcppcheck.cpp} |
__Globals | 0.15 | 0 | 0 | 0 | - | 1 | 0 | - | 0 | 1 | anonymous_namespace{checkboost.cpp} |
IMAGEHLP_SYMBOL64_EXT | 0.15 | 0 | 0 | 0 | - | 3 | 0 | - | 0 | 2 | |
__Globals | 0.15 | 0 | 0 | 0 | - | 1 | 0 | - | 0 | 1 | anonymous_namespace{checkvaarg.cpp} |
TestClass | 0.15 | 1338 | 0 | 329 | 19.74 | 298 | 76 | - | 0 | 15 | |
__Globals | 0.15 | 0 | 0 | 0 | - | 1 | 0 | - | 0 | 1 | anonymous_namespace{testcharvar.cpp} |
TestCharVar | 0.15 | 59 | 0 | 12 | 16.9 | 29 | 5 | - | 0 | 10 | |
__Globals | 0.15 | 0 | 0 | 0 | - | 1 | 0 | - | 0 | 1 | anonymous_namespace{checknullpointer .cpp} |
TestCmdlineParser | 0.15 | 627 | 0 | 45 | 6.7 | 192 | 17 | - | 0 | 17 | |
__Globals | 0.15 | 0 | 0 | 0 | - | 1 | 0 | - | 0 | 1 | anonymous_namespace{testclass.cpp} |
__Globals | 0.15 | 0 | 0 | 0 | - | 1 | 0 | - | 0 | 1 | anonymous_namespace{testbufferoverrun .cpp} |
__Globals | 0.15 | 0 | 0 | 0 | - | 1 | 0 | - | 0 | 1 | anonymous_namespace{checknonreentrantfun ctions.cpp} |
__Globals | 0.15 | 0 | 0 | 0 | - | 1 | 0 | - | 0 | 1 | anonymous_namespace{testboost.cpp} |
TestBufferOverrun | 0.15 | 976 | 0 | 236 | 19.47 | 284 | 45 | - | 0 | 17 | |
TestBoost | 0.15 | 27 | 0 | 6 | 18.18 | 10 | 8 | - | 0 | 13 | |
__Globals | 0.15 | 0 | 0 | 0 | - | 1 | 0 | - | 0 | 1 | anonymous_namespace{checkleakautovar .cpp} |
__Globals | 0.15 | 0 | 0 | 0 | - | 1 | 0 | - | 0 | 4 | anonymous_namespace{checkmemoryleak.cpp} |
__Globals | 0.15 | 0 | 0 | 0 | - | 1 | 0 | - | 0 | 1 | anonymous_namespace{checksizeof.cpp} |
TestBool | 0.15 | 274 | 0 | 21 | 7.12 | 53 | 6 | - | 0 | 10 | |
__Globals | 0.15 | 0 | 0 | 0 | - | 1 | 0 | - | 0 | 1 | anonymous_namespace{testconstructors .cpp} |
TestAutoVariables | 0.15 | 262 | 0 | 52 | 16.56 | 91 | 8 | - | 0 | 13 | |
__Globals | 0.15 | 0 | 0 | 0 | - | 1 | 0 | - | 0 | 1 | anonymous_namespace{checkio.cpp} |
__Globals | 0.15 | 0 | 0 | 0 | - | 1 | 0 | - | 0 | 1 | anonymous_namespace{testautovariables .cpp} |
__Globals | 0.15 | 0 | 0 | 0 | - | 1 | 0 | - | 0 | 1 | anonymous_namespace{checkpostfixoperator .cpp} |
TestCondition | 0.15 | 391 | 0 | 79 | 16.81 | 56 | 18 | - | 0 | 15 | |
__Globals | 0.15 | 0 | 0 | 0 | - | 1 | 0 | - | 0 | 1 | anonymous_namespace{testcmdlineparser .cpp} |
__Globals | 0.15 | 0 | 0 | 0 | - | 1 | 0 | - | 0 | 1 | anonymous_namespace{checkobsolescentfunc tions.cpp} |
TestConstructors | 0.15 | 564 | 0 | 153 | 21.34 | 245 | 6 | - | 0 | 10 | |
__Globals | 0.15 | 0 | 0 | 0 | - | 1 | 0 | - | 0 | 1 | anonymous_namespace{testcondition.cpp} |
__Globals | 0.15 | 0 | 0 | 0 | - | 1 | 0 | - | 0 | 1 | anonymous_namespace{testbool.cpp} |
__Globals | 0.15 | 0 | 0 | 0 | - | 1 | 0 | - | 0 | 1 | anonymous_namespace{testerrorlogger.cpp} |
TestString | 0.15 | 170 | 0 | 28 | 14.14 | 32 | 16 | - | 0 | 13 | |
__Globals | 0.15 | 0 | 0 | 0 | - | 1 | 0 | - | 0 | 1 | anonymous_namespace{teststring.cpp} |
__Globals | 0.15 | 0 | 0 | 0 | - | 1 | 0 | - | 0 | 1 | anonymous_namespace{teststl.cpp} |
XMLConstHandle | 0.15 | 18 | 0 | 4 | 18.18 | 30 | 8 | - | 0 | 5 | tinyxml2 |
XMLHandle | 0.15 | 18 | 0 | 72 | 80 | 30 | 8 | - | 0 | 5 | tinyxml2 |
__Globals | 0.15 | 0 | 0 | 0 | - | 1 | 0 | - | 0 | 1 | anonymous_namespace{testsymboldatabase .cpp} |
TestThreadExecutor | 0.15 | 48 | 2 | 5 | 9.43 | 25 | 12 | - | 0 | 18 | |
TestSymbolDatabase | 0.15 | 1547 | 11 | 181 | 10.47 | 399 | 106 | - | 0 | 37 | |
TestSuppressions | 0.15 | 150 | 3 | 31 | 17.13 | 41 | 37 | - | 0 | 22 | |
__Globals | 0.15 | 0 | 0 | 0 | - | 1 | 0 | - | 0 | 1 | anonymous_namespace{testsuppressions .cpp} |
TestStl | 0.15 | 627 | 1 | 116 | 15.61 | 167 | 14 | - | 0 | 15 | |
__Globals | 0.15 | 0 | 0 | 0 | - | 1 | 0 | - | 0 | 1 | anonymous_namespace{testsimplifytemplate .cpp} |
TestSimplifyTokens | 0.15 | 1429 | 0 | 200 | 12.28 | 360 | 102 | - | 0 | 19 | |
TestSimplifyTemplate | 0.15 | 295 | 1 | 111 | 27.34 | 138 | 32 | - | 0 | 14 | |
TestSamples | 0.15 | 26 | 2 | 3 | 10.34 | 12 | 12 | - | 0 | 23 | |
__Globals | 0.15 | 0 | 0 | 0 | - | 1 | 0 | - | 0 | 1 | anonymous_namespace{testsamples.cpp} |
TestSizeof | 0.15 | 211 | 0 | 13 | 5.8 | 27 | 6 | - | 0 | 10 | |
__Globals | 0.15 | 0 | 0 | 0 | - | 1 | 0 | - | 0 | 1 | anonymous_namespace{testsizeof.cpp} |
__Globals | 0.15 | 0 | 0 | 0 | - | 1 | 0 | - | 0 | 1 | anonymous_namespace{testsimplifytypedef .cpp} |
__Globals | 0.15 | 0 | 0 | 0 | - | 1 | 0 | - | 0 | 1 | anonymous_namespace{testsimplifytokens .cpp} |
TestSimplifyTypedef | 0.15 | 817 | 0 | 272 | 24.98 | 252 | 35 | - | 0 | 14 | |
__Globals | 0.15 | 0 | 0 | 0 | - | 1 | 0 | - | 0 | 1 | anonymous_namespace{testthreadexecutor .cpp} |
TestUnusedVar | 0.15 | 920 | 1 | 189 | 17.04 | 248 | 11 | - | 0 | 12 | |
__Globals | 0.15 | 0 | 0 | 0 | - | 1 | 0 | - | 0 | 1 | anonymous_namespace{testunusedvar.cpp} |
__Globals | 0.15 | 0 | 0 | 0 | - | 1 | 0 | - | 0 | 1 | anonymous_namespace{testunusedprivfunc .cpp} |
__Globals | 0.15 | 0 | 0 | 0 | - | 1 | 0 | - | 0 | 1 | anonymous_namespace{testunusedfunctions .cpp} |
TestUnusedPrivateFunction | 0.15 | 127 | 0 | 40 | 23.95 | 67 | 5 | - | 0 | 10 | |
TestValueFlow | 0.15 | 440 | 4 | 126 | 22.26 | 70 | 18 | - | 0 | 19 | |
__Globals | 0.15 | 0 | 0 | 0 | - | 1 | 0 | - | 0 | 1 | anonymous_namespace{testvaarg.cpp} |
__Globals | 0.15 | 0 | 0 | 0 | - | 1 | 0 | - | 0 | 1 | anonymous_namespace{testvalueflow.cpp} |
__Globals | 0.15 | 0 | 0 | 0 | - | 1 | 0 | - | 0 | 1 | anonymous_namespace{testvarid.cpp} |
TestVarID | 0.15 | 539 | 0 | 125 | 18.83 | 262 | 53 | - | 0 | 15 | |
TestUnusedFunctions | 0.15 | 133 | 1 | 17 | 11.33 | 52 | 11 | - | 0 | 12 | |
__Globals | 0.15 | 0 | 0 | 0 | - | 1 | 0 | - | 0 | 1 | anonymous_namespace{testtoken.cpp} |
TestTokenizer | 0.15 | 3012 | 7 | 824 | 21.48 | 793 | 256 | - | 0 | 30 | |
TestToken | 0.15 | 567 | 19 | 25 | 4.22 | 121 | 157 | - | 0 | 18 | |
TestTimer | 0.15 | 6 | 0 | 0 | 0 | 8 | 1 | - | 0 | 5 | |
__Globals | 0.15 | 0 | 0 | 0 | - | 1 | 0 | - | 0 | 1 | anonymous_namespace{testtimer.cpp} |
TestUninitVar | 0.15 | 984 | 1 | 264 | 21.15 | 89 | 27 | - | 0 | 23 | |
__Globals | 0.15 | 0 | 0 | 0 | - | 1 | 0 | - | 0 | 1 | anonymous_namespace{testuninitvar.cpp} |
__Globals | 0.15 | 0 | 0 | 0 | - | 1 | 0 | - | 0 | 1 | anonymous_namespace{testtype.cpp} |
__Globals | 0.15 | 0 | 0 | 0 | - | 1 | 0 | - | 0 | 1 | anonymous_namespace{testtokenize.cpp} |
TestType | 0.15 | 39 | 0 | 8 | 17.02 | 14 | 7 | - | 0 | 11 | |
__Globals | 0.15 | 0 | 0 | 0 | - | 1 | 0 | - | 0 | 1 | anonymous_namespace{testlibrary.cpp} |
TestMathLib | 0.15 | 737 | 0 | 115 | 13.5 | 58 | 7 | - | 0 | 10 | |
TestLibrary | 0.15 | 234 | 0 | 13 | 5.26 | 38 | 65 | - | 0 | 21 | |
TestLeakAutoVar | 0.15 | 290 | 1 | 66 | 18.54 | 120 | 5 | - | 0 | 11 | |
__Globals | 0.15 | 0 | 0 | 0 | - | 1 | 0 | - | 0 | 1 | anonymous_namespace{testleakautovar.cpp} |
TestMemleakInClass | 0.15 | 184 | 0 | 27 | 12.8 | 67 | 6 | - | 0 | 10 | |
TestMemleakStructMember | 0.15 | 141 | 0 | 38 | 21.23 | 47 | 4 | - | 0 | 10 | |
TestMemleakInFunction | 0.15 | 1073 | 4 | 195 | 15.38 | 335 | 33 | - | 0 | 21 | |
__Globals | 0.15 | 0 | 0 | 0 | - | 1 | 0 | - | 0 | 1 | anonymous_namespace{testmathlib.cpp} |
TestMemleak | 0.15 | 26 | 0 | 4 | 13.33 | 11 | 8 | - | 0 | 15 | |
__Globals | 0.15 | 0 | 0 | 0 | - | 1 | 0 | - | 0 | 1 | anonymous_namespace{testio.cpp} |
TestFileLister | 0.15 | 20 | 1 | 5 | 20 | 13 | 5 | - | 0 | 16 | |
__Globals | 0.15 | 0 | 0 | 0 | - | 1 | 0 | - | 0 | 1 | anonymous_namespace{testfilelister.cpp} |
__Globals | 0.15 | 0 | 0 | 0 | - | 1 | 0 | - | 0 | 1 | anonymous_namespace{testexceptionsafety .cpp} |
__Globals | 0.15 | 0 | 0 | 0 | - | 1 | 0 | - | 0 | 1 | anonymous_namespace{check64bit.cpp} |
TestExceptionSafety | 0.15 | 96 | 0 | 11 | 10.28 | 41 | 5 | - | 0 | 10 | |
__Globals | 0.15 | 0 | 0 | 0 | - | 1 | 0 | - | 0 | 1 | anonymous_namespace{testincompletestatem ent.cpp} |
TestIO | 0.15 | 634 | 0 | 72 | 10.2 | 51 | 36 | - | 0 | 15 | |
TestIncompleteStatement | 0.15 | 78 | 0 | 19 | 19.59 | 43 | 5 | - | 0 | 10 | |
TestGarbage | 0.15 | 185 | 1 | 79 | 29.92 | 104 | 60 | - | 0 | 17 | |
__Globals | 0.15 | 0 | 0 | 0 | - | 1 | 0 | - | 0 | 1 | anonymous_namespace{testgarbage.cpp} |
TestMemleakNoVar | 0.15 | 87 | 1 | 15 | 14.71 | 15 | 4 | - | 0 | 13 | |
__Globals | 0.15 | 0 | 0 | 0 | - | 1 | 0 | - | 0 | 1 | anonymous_namespace{testpath.cpp} |
TestPathMatch | 0.15 | 78 | 0 | 4 | 4.88 | 60 | 12 | - | 0 | 7 | |
TestPath | 0.15 | 89 | 0 | 7 | 7.29 | 18 | 1 | - | 0 | 7 | |
TestOther | 0.15 | 1555 | 0 | 234 | 13.08 | 228 | 77 | - | 0 | 24 | |
__Globals | 0.15 | 0 | 0 | 0 | - | 1 | 0 | - | 0 | 1 | anonymous_namespace{testother.cpp} |
TestPreprocessor | 0.15 | 1770 | 1 | 331 | 15.75 | 375 | 703 | - | 0 | 21 | |
__Globals | 0.15 | 0 | 0 | 0 | - | 1 | 0 | - | 0 | 1 | anonymous_namespace{testpreprocessor .cpp} |
__Globals | 0.15 | 0 | 0 | 0 | - | 1 | 0 | - | 0 | 1 | anonymous_namespace{testpostfixoperator .cpp} |
__Globals | 0.15 | 0 | 0 | 0 | - | 1 | 0 | - | 0 | 1 | anonymous_namespace{testpathmatch.cpp} |
TestPostfixOperator | 0.15 | 75 | 0 | 7 | 8.54 | 27 | 5 | - | 0 | 10 | |
__Globals | 0.15 | 0 | 0 | 0 | - | 1 | 0 | - | 0 | 1 | anonymous_namespace{testoptions.cpp} |
TestNonReentrantFunctions | 0.15 | 32 | 0 | 9 | 21.95 | 11 | 5 | - | 0 | 11 | |
__Globals | 0.15 | 0 | 0 | 0 | - | 1 | 0 | - | 0 | 1 | anonymous_namespace{testnonreentrantfunc tions.cpp} |
TestMemleakWindows | 0.15 | 18 | 0 | 4 | 18.18 | 10 | 6 | - | 0 | 18 | |
__Globals | 0.15 | 0 | 0 | 0 | - | 1 | 0 | - | 0 | 1 | anonymous_namespace{testmemleak.cpp} |
TestMemleakGLib | 0.15 | 16 | 0 | 4 | 20 | 10 | 6 | - | 0 | 18 | |
__Globals | 0.15 | 0 | 0 | 0 | - | 1 | 0 | - | 0 | 1 | anonymous_namespace{testobsolescentfunct ions.cpp} |
TestOptions | 0.15 | 34 | 0 | 0 | 0 | 22 | 8 | - | 0 | 4 | |
TestObsoleteFunctions | 0.15 | 77 | 0 | 16 | 17.2 | 39 | 5 | - | 0 | 12 | |
TestNullPointer | 0.15 | 660 | 0 | 186 | 21.99 | 103 | 27 | - | 0 | 18 | |
__Globals | 0.15 | 0 | 0 | 0 | - | 1 | 0 | - | 0 | 1 | anonymous_namespace{testnullpointer.cpp} |
Types Metrics : Code Members and Inheritance
Type Name | # Instance Methods | Nb Static Methods | # Fields | # Children Classes | Depth Of Inheritance Tree | Type Namespace | |
---|---|---|---|---|---|---|---|
Token | 122 | 21 | 0 | 17 | 0 | 0 | |
Settings | 17 | 0 | 0 | 51 | 0 | 0 | |
Tokenizer | 144 | 11 | 0 | 9 | 0 | 0 | |
TestFixture | 24 | 1 | 1 | 12 | 58 | 1 | |
__Globals | 3 | 11 | 0 | 19 | 0 | 0 | |
__Globals | 5 | 163 | 0 | 20 | 0 | 0 | |
Scope | 27 | 0 | 0 | 18 | 0 | 0 | |
ErrorLogger | 9 | 1 | 2 | 0 | 66 | 0 | |
Variable | 48 | 0 | 0 | 9 | 0 | 0 | |
Library | 52 | 3 | 0 | 27 | 0 | 0 | |
XMLDocument | 36 | 0 | 0 | 12 | 0 | 1 | tinyxml2 |
XMLUtil | 0 | 20 | 0 | 0 | 0 | 0 | tinyxml2 |
Severity+SeverityType | - | - | - | - | - | - | |
XMLError | - | - | - | - | - | - | tinyxml2 |
XMLNode | 50 | 1 | 3 | 8 | 6 | 0 | tinyxml2 |
Check | 17 | 2 | 3 | 4 | 28 | 0 | |
StrPair | 14 | 0 | 0 | 3 | 0 | 0 | tinyxml2 |
XMLVisitor | 12 | 0 | 0 | 0 | 1 | 0 | tinyxml2 |
SymbolDatabase | 26 | 1 | 0 | 9 | 0 | 0 | |
StrPair+AnonymousEnum | - | - | - | - | - | - | tinyxml2 |
MemPoolT<SIZE>+Chunk | 0 | 0 | - | 2 | - | - | tinyxml2 |
ErrorLogger+ErrorMessage | 15 | 3 | 0 | 8 | 0 | 0 | |
InternalError | 5 | 0 | 0 | 3 | - | - | |
XMLText | 12 | 0 | 0 | 1 | 0 | 1 | tinyxml2 |
Type | 10 | 0 | 0 | 6 | 0 | 0 | |
MathLib | 6 | 32 | 0 | 0 | 0 | 0 | |
Check+FileInfo | 3 | 0 | 0 | 0 | 2 | 0 | |
XMLElement | 53 | 1 | 0 | 2 | 0 | 1 | tinyxml2 |
Function | 54 | 1 | 0 | 15 | 0 | 0 | |
XMLUnknown | 10 | 0 | 0 | 0 | 0 | 1 | tinyxml2 |
XMLDeclaration | 10 | 0 | 0 | 0 | 0 | 1 | tinyxml2 |
TokenList | 22 | 2 | 0 | 6 | 0 | 0 | |
Path | 6 | 15 | 0 | 0 | 0 | 0 | |
MemPool | 9 | 0 | 5 | 0 | 1 | 0 | tinyxml2 |
Library+ErrorCode | - | - | - | - | - | - | |
Scope+ScopeType | - | - | - | - | - | - | |
Preprocessor | 23 | 13 | 0 | 6 | 1 | 0 | |
Settings+PlatformType | - | - | - | - | - | - | |
Token+Type | - | - | - | - | - | - | |
AccessControl | - | - | - | - | - | - | |
Library+Container+Action | - | - | - | - | - | - | |
Library+Container+Yield | - | - | - | - | - | - | |
ErrorLogger+ErrorMessage+FileLocation | 11 | 0 | 0 | 2 | 0 | 0 | |
Suppressions | 13 | 0 | 0 | 1 | 0 | 0 | |
XMLAttribute | 25 | 0 | 0 | 4 | 0 | 0 | tinyxml2 |
XMLComment | 10 | 0 | 0 | 0 | 0 | 1 | tinyxml2 |
Library+Error | 7 | 0 | 0 | 2 | 0 | 0 | |
Library+ArgumentChecks+MinSize+Type | - | - | - | - | - | - | |
VarInfo+AllocStatus | - | - | - | - | - | - | |
Variables | 26 | 0 | 0 | 3 | 0 | 0 | |
SHOWTIME_MODES | - | - | - | - | - | - | |
__Globals | 1 | 1 | 0 | 2 | 0 | 0 | tinyxml2 |
Settings+Language | - | - | - | - | - | - | |
Function+Type | - | - | - | - | - | - | |
InternalError+Type | - | - | - | - | - | - | |
options | 8 | 0 | 0 | 4 | 0 | 0 | |
Value | 4 | 0 | 0 | 8 | 0 | 0 | ValueFlow |
Type+BaseInfo | 7 | 0 | 0 | 5 | 0 | 0 | |
Whitespace | - | - | - | - | - | - | tinyxml2 |
CppCheck | 25 | 3 | 0 | 9 | 0 | 1 | |
XMLElement+AnonymousEnum | - | - | - | - | - | - | tinyxml2 |
Suppressions+SuppressionEntry | 5 | 0 | 0 | 3 | - | - | |
Entity | 0 | 0 | 0 | 3 | - | - | tinyxml2 |
CheckMemoryLeak+AllocType | - | - | - | - | - | - | |
Library+Container | 7 | 0 | 0 | 7 | 0 | 0 | |
MemPoolT<SIZE> | 10 | 0 | 0 | 6 | 0 | 1 | tinyxml2 |
RedirectOutputError | 6 | 0 | 0 | 4 | 0 | 0 | |
Dimension | 6 | 0 | 0 | 4 | - | - | |
Library+PodType | 4 | 0 | 0 | 2 | - | - | |
CheckMemoryLeak | 21 | 1 | 0 | 3 | 4 | 0 | |
Filepointer+AppendMode | - | - | - | - | - | - | |
Filepointer+Operation | - | - | - | - | - | - | |
OpenMode | - | - | - | - | - | - | |
XMLAttribute+AnonymousEnum | - | - | - | - | - | - | tinyxml2 |
DynArray<T,INIT> | 16 | 0 | 0 | 4 | 0 | 0 | tinyxml2 |
StrPair+AnonymousEnum | - | - | - | - | - | - | tinyxml2 |
Variables+VariableType | - | - | - | - | - | - | |
CheckClass | 65 | 9 | 0 | 1 | 0 | 1 | |
Type+NeedInitialization | - | - | - | - | - | - | |
TimerResultsData | 5 | 0 | 0 | 2 | - | - | |
Library+PlatformType | 7 | 0 | 0 | 7 | - | - | |
CheckMemoryLeakInFunction | 16 | 4 | 0 | 1 | 0 | 1 | |
TemplateSimplifier | 4 | 16 | 0 | 0 | 0 | 0 | |
CheckOther | 104 | 2 | 0 | 0 | 0 | 1 | |
Library+ArgumentChecks | 5 | 0 | 0 | 7 | 0 | 0 | |
Token+Anonymous | 1 | 0 | - | 2 | - | - | |
Token+AnonymousEnum | - | - | - | - | - | - | |
XMLPrinter | 37 | 0 | 0 | 11 | 0 | 1 | tinyxml2 |
Scope+UsingInfo | 6 | 0 | 0 | 2 | - | - | |
MemPoolT<SIZE>+Block | 0 | 0 | 0 | 1 | - | - | tinyxml2 |
MemPoolT<SIZE>+AnonymousEnum | - | - | - | - | - | - | tinyxml2 |
TestRegistry | 7 | 1 | 0 | 1 | 0 | 0 | |
Variable+AnonymousEnum | - | - | - | - | - | - | |
PathMatch | 6 | 1 | 0 | 2 | 0 | 0 | |
CheckStl | 53 | 1 | 0 | 0 | 0 | 1 | |
FileLister | 0 | 5 | 0 | 0 | 0 | 0 | |
XMLElement+AnonymousEnum | - | - | - | - | - | - | tinyxml2 |
Library+Container+Function | 4 | 0 | 0 | 2 | - | - | |
TimerResultsIntf | 5 | 0 | 1 | 0 | 1 | 0 | |
CheckNullPointer | 18 | 3 | 0 | 0 | 0 | 1 | |
Library+ArgumentChecks+MinSize | 4 | 0 | 0 | 3 | 0 | 0 | |
__Globals | 3 | 10 | 0 | 11 | 0 | 0 | |
ExecutionPath | 12 | 3 | 3 | 3 | 2 | 0 | |
ThreadExecutor | 10 | 2 | 0 | 14 | 0 | 1 | |
CheckUninitVar | 29 | 2 | 0 | 1 | 0 | 1 | |
Timer | 5 | 0 | 0 | 5 | 0 | 0 | |
TimerResults | 8 | 0 | 0 | 1 | 0 | 1 | |
CppCheckExecutor | 13 | 4 | 0 | 6 | 0 | 1 | |
VarInfo+AllocInfo | 4 | 0 | 0 | 2 | - | - | |
Type+FriendInfo | 6 | 0 | 0 | 4 | - | - | |
CheckMemoryLeakInClass | 15 | 1 | 0 | 0 | 0 | 1 | |
CheckBool | 32 | 1 | 0 | 0 | 0 | 1 | |
CheckExceptionSafety | 22 | 1 | 0 | 0 | 0 | 1 | |
CheckAssert | 14 | 2 | 0 | 0 | 0 | 1 | |
Check64BitPortability | 16 | 1 | 0 | 0 | 0 | 1 | |
CheckVaarg | 17 | 1 | 0 | 0 | 0 | 1 | |
CheckSizeof | 29 | 1 | 0 | 0 | 0 | 1 | |
CheckMemoryLeakStructMember | 12 | 2 | 0 | 0 | 0 | 1 | |
CheckPostfixOperator | 12 | 1 | 0 | 0 | 0 | 1 | |
CheckType | 18 | 2 | 0 | 0 | 0 | 1 | |
CheckNonReentrantFunctions | 12 | 1 | 0 | 1 | 0 | 1 | |
CheckLeakAutoVar | 22 | 1 | 0 | 0 | 0 | 1 | |
Variables+VariableUsage | 7 | 0 | 0 | 9 | 0 | 0 | |
Variables+ScopeGuard | 4 | 0 | 0 | 2 | 0 | 0 | |
scopeStackEntryType | 5 | 0 | 0 | 2 | - | - | anonymous_namespace{tokenize.cpp} |
EnumValue | 6 | 0 | 0 | 4 | 0 | 0 | |
__Globals | 1 | 0 | 0 | 0 | 0 | 0 | ValueFlow |
Space | 5 | 0 | 0 | 3 | - | - | |
CheckObsoleteFunctions | 12 | 1 | 0 | 3 | 0 | 1 | |
CheckUnusedVar | 22 | 1 | 0 | 2 | 0 | 1 | |
CheckUnusedFunctions | 14 | 2 | 0 | 2 | 0 | 1 | |
givenACodeSampleToTokenize | 5 | 0 | 0 | 2 | 0 | 0 | |
CmdLineParser | 12 | 2 | 0 | 7 | 0 | 0 | |
Preprocessor+HeaderTypes | - | - | - | - | - | - | |
CheckString | 24 | 1 | 0 | 0 | 0 | 1 | |
CheckBoost | 12 | 1 | 0 | 0 | 0 | 1 | |
CheckMemoryLeakNoVar | 16 | 1 | 0 | 0 | 0 | 1 | |
CheckAutoVariables | 25 | 6 | 0 | 0 | 0 | 1 | |
Function+AnonymousEnum | - | - | - | - | - | - | |
TestCppcheck+ErrorLogger2 | 8 | 0 | 0 | 1 | 0 | 1 | |
Suppressions+FileMatcher | 9 | 1 | 0 | 2 | 0 | 0 | |
Severity | 6 | 2 | 0 | 0 | 0 | 0 | |
Library+Platform | 6 | 0 | 0 | 1 | - | - | |
Library+ExportedFunctions | 9 | 0 | 0 | 2 | 0 | 0 | |
Library+CodeBlock | 13 | 0 | 0 | 4 | 0 | 0 | |
CheckIO | 37 | 2 | 0 | 0 | 0 | 1 | |
CheckCondition | 30 | 1 | 0 | 0 | 0 | 1 | |
CppCheckExecutor | 13 | 4 | 0 | 6 | 0 | 1 | |
XMLPrinter+AnonymousEnum | - | - | - | - | - | - | tinyxml2 |
CheckBufferOverrun | 44 | 3 | 0 | 0 | 0 | 1 | |
__Globals | 1 | 0 | 0 | 0 | 0 | 0 | anonymous_namespace{timer.cpp} |
FileLister | 0 | 5 | 0 | 0 | 0 | 0 | |
TestPreprocessor+OurPreprocessor | 0 | 3 | 0 | 0 | 0 | 1 | |
SimpleSuppressor | 8 | 0 | 0 | 2 | 0 | 1 | |
ThreadExecutor+MessageType | - | - | - | - | - | - | |
ThreadExecutor+MessageType | - | - | - | - | - | - | |
CheckUnusedFunctions+FunctionUsage | 6 | 0 | 0 | 4 | 0 | 0 | |
PreprocessorMacro | 11 | 0 | 0 | 8 | 0 | 0 | |
VarInfo | 11 | 0 | 0 | 4 | 0 | 0 | |
Settings+Rule | 6 | 0 | 0 | 5 | 0 | 0 | |
EraseCheckLoop | 11 | 1 | 0 | 2 | 0 | 1 | |
__Globals | 3 | 0 | 0 | 1 | 0 | 0 | anonymous_namespace{checkother.cpp} |
VarInfo | 4 | 0 | 0 | 2 | - | - | |
CheckClass+Usage | 6 | 0 | 0 | 2 | - | - | |
__Globals | 3 | 0 | 0 | 1 | 0 | 0 | anonymous_namespace{checkclass.cpp} |
CheckIO+ArgumentInfo | 10 | 0 | 0 | 7 | 0 | 0 | |
Filepointer | 4 | 0 | 0 | 5 | - | - | |
CheckUninitVar+Alloc | - | - | - | - | - | - | |
CheckUninitVar+MyFileInfo | 6 | 0 | 0 | 2 | 0 | 1 | |
UninitVar | 12 | 15 | 0 | 7 | 0 | 1 | |
CheckBufferOverrun+MyFileInfo+ArrayUsage | 6 | 0 | 0 | 3 | - | - | |
CheckBufferOverrun+ArrayInfo | 17 | 0 | 0 | 4 | 0 | 0 | |
CheckBufferOverrun+MyFileInfo | 6 | 0 | 0 | 2 | 0 | 1 | |
CmdLineParser | 12 | 2 | 0 | 7 | 0 | 0 | |
ThreadExecutor | 10 | 2 | 0 | 14 | 0 | 1 | |
PathMatch | 6 | 1 | 0 | 2 | 0 | 0 | |
__Globals | 1 | 0 | 0 | 1 | 0 | 0 | anonymous_namespace{checkuninitvar.cpp} |
TestAssert | 12 | 0 | 0 | 0 | 0 | 2 | |
__Globals | 1 | 0 | 0 | 1 | 0 | 0 | anonymous_namespace{checkunusedvar.cpp} |
__Globals | 1 | 0 | 0 | 1 | 0 | 0 | anonymous_namespace{test64bit.cpp} |
Test64BitPortability | 14 | 0 | 0 | 0 | 0 | 2 | |
__Globals | 1 | 0 | 0 | 1 | 0 | 0 | anonymous_namespace{checkcondition.cpp} |
__Globals | 1 | 0 | 0 | 1 | 0 | 0 | anonymous_namespace{checkstring.cpp} |
TestCppcheck | 10 | 0 | 0 | 0 | 0 | 2 | |
__Globals | 1 | 0 | 0 | 1 | 0 | 0 | anonymous_namespace{checkexceptionsafety .cpp} |
__Globals | 1 | 0 | 0 | 1 | 0 | 0 | anonymous_namespace{checkstl.cpp} |
__Globals | 1 | 0 | 0 | 1 | 0 | 0 | anonymous_namespace{checktype.cpp} |
__Globals | 1 | 0 | 0 | 1 | 0 | 0 | anonymous_namespace{testassert.cpp} |
TestErrorLogger | 28 | 0 | 0 | 2 | 0 | 2 | |
__Globals | 1 | 0 | 0 | 1 | 0 | 0 | anonymous_namespace{checkbool.cpp} |
AST_state | 5 | 0 | 0 | 4 | - | - | |
__Globals | 1 | 0 | 0 | 1 | 0 | 0 | anonymous_namespace{checkassert.cpp} |
TestVaarg | 13 | 0 | 0 | 0 | 0 | 2 | |
__Globals | 1 | 0 | 0 | 1 | 0 | 0 | anonymous_namespace{checkautovariables .cpp} |
IMAGEHLP_SYMBOL64_EXT | 3 | 0 | 0 | 1 | - | - | |
__Globals | 1 | 0 | 0 | 1 | 0 | 0 | anonymous_namespace{checkbufferoverrun .cpp} |
__Globals | 1 | 0 | 0 | 1 | 0 | 0 | anonymous_namespace{testcppcheck.cpp} |
__Globals | 1 | 0 | 0 | 1 | 0 | 0 | anonymous_namespace{checkboost.cpp} |
IMAGEHLP_SYMBOL64_EXT | 3 | 0 | 0 | 1 | - | - | |
__Globals | 1 | 0 | 0 | 1 | 0 | 0 | anonymous_namespace{checkvaarg.cpp} |
TestClass | 159 | 0 | 0 | 0 | 0 | 2 | |
__Globals | 1 | 0 | 0 | 1 | 0 | 0 | anonymous_namespace{testcharvar.cpp} |
TestCharVar | 19 | 0 | 0 | 0 | 0 | 2 | |
__Globals | 1 | 0 | 0 | 1 | 0 | 0 | anonymous_namespace{checknullpointer .cpp} |
TestCmdlineParser | 103 | 0 | 0 | 2 | 0 | 2 | |
__Globals | 1 | 0 | 0 | 1 | 0 | 0 | anonymous_namespace{testclass.cpp} |
__Globals | 1 | 0 | 0 | 1 | 0 | 0 | anonymous_namespace{testbufferoverrun .cpp} |
__Globals | 1 | 0 | 0 | 1 | 0 | 0 | anonymous_namespace{checknonreentrantfun ctions.cpp} |
__Globals | 1 | 0 | 0 | 1 | 0 | 0 | anonymous_namespace{testboost.cpp} |
TestBufferOverrun | 147 | 0 | 0 | 0 | 0 | 2 | |
TestBoost | 9 | 0 | 0 | 0 | 0 | 2 | |
__Globals | 1 | 0 | 0 | 1 | 0 | 0 | anonymous_namespace{checkleakautovar .cpp} |
__Globals | 1 | 0 | 0 | 4 | 0 | 0 | anonymous_namespace{checkmemoryleak.cpp} |
__Globals | 1 | 0 | 0 | 1 | 0 | 0 | anonymous_namespace{checksizeof.cpp} |
TestBool | 31 | 0 | 0 | 0 | 0 | 2 | |
__Globals | 1 | 0 | 0 | 1 | 0 | 0 | anonymous_namespace{testconstructors .cpp} |
TestAutoVariables | 49 | 0 | 0 | 0 | 0 | 2 | |
__Globals | 1 | 0 | 0 | 1 | 0 | 0 | anonymous_namespace{checkio.cpp} |
__Globals | 1 | 0 | 0 | 1 | 0 | 0 | anonymous_namespace{testautovariables .cpp} |
__Globals | 1 | 0 | 0 | 1 | 0 | 0 | anonymous_namespace{checkpostfixoperator .cpp} |
TestCondition | 32 | 0 | 0 | 0 | 0 | 2 | |
__Globals | 1 | 0 | 0 | 1 | 0 | 0 | anonymous_namespace{testcmdlineparser .cpp} |
__Globals | 1 | 0 | 0 | 1 | 0 | 0 | anonymous_namespace{checkobsolescentfunc tions.cpp} |
TestConstructors | 127 | 0 | 0 | 0 | 0 | 2 | |
__Globals | 1 | 0 | 0 | 1 | 0 | 0 | anonymous_namespace{testcondition.cpp} |
__Globals | 1 | 0 | 0 | 1 | 0 | 0 | anonymous_namespace{testbool.cpp} |
__Globals | 1 | 0 | 0 | 1 | 0 | 0 | anonymous_namespace{testerrorlogger.cpp} |
TestString | 21 | 0 | 0 | 0 | 0 | 2 | |
__Globals | 1 | 0 | 0 | 1 | 0 | 0 | anonymous_namespace{teststring.cpp} |
__Globals | 1 | 0 | 0 | 1 | 0 | 0 | anonymous_namespace{teststl.cpp} |
XMLConstHandle | 18 | 0 | 0 | 1 | 0 | 0 | tinyxml2 |
XMLHandle | 18 | 0 | 0 | 1 | 0 | 0 | tinyxml2 |
__Globals | 1 | 0 | 0 | 1 | 0 | 0 | anonymous_namespace{testsymboldatabase .cpp} |
TestThreadExecutor | 15 | 0 | 0 | 0 | 0 | 2 | |
TestSymbolDatabase | 152 | 2 | 0 | 6 | 0 | 2 | |
TestSuppressions | 23 | 0 | 0 | 0 | 0 | 2 | |
__Globals | 1 | 0 | 0 | 1 | 0 | 0 | anonymous_namespace{testsuppressions .cpp} |
TestStl | 88 | 0 | 0 | 1 | 0 | 2 | |
__Globals | 1 | 0 | 0 | 1 | 0 | 0 | anonymous_namespace{testsimplifytemplate .cpp} |
TestSimplifyTokens | 185 | 0 | 0 | 2 | 0 | 2 | |
TestSimplifyTemplate | 74 | 0 | 0 | 0 | 0 | 2 | |
TestSamples | 8 | 0 | 0 | 0 | 0 | 2 | |
__Globals | 1 | 0 | 0 | 1 | 0 | 0 | anonymous_namespace{testsamples.cpp} |
TestSizeof | 18 | 0 | 0 | 0 | 0 | 2 | |
__Globals | 1 | 0 | 0 | 1 | 0 | 0 | anonymous_namespace{testsizeof.cpp} |
__Globals | 1 | 0 | 0 | 1 | 0 | 0 | anonymous_namespace{testsimplifytypedef .cpp} |
__Globals | 1 | 0 | 0 | 1 | 0 | 0 | anonymous_namespace{testsimplifytokens .cpp} |
TestSimplifyTypedef | 131 | 0 | 0 | 0 | 0 | 2 | |
__Globals | 1 | 0 | 0 | 1 | 0 | 0 | anonymous_namespace{testthreadexecutor .cpp} |
TestUnusedVar | 128 | 0 | 0 | 0 | 0 | 2 | |
__Globals | 1 | 0 | 0 | 1 | 0 | 0 | anonymous_namespace{testunusedvar.cpp} |
__Globals | 1 | 0 | 0 | 1 | 0 | 0 | anonymous_namespace{testunusedprivfunc .cpp} |
__Globals | 1 | 0 | 0 | 1 | 0 | 0 | anonymous_namespace{testunusedfunctions .cpp} |
TestUnusedPrivateFunction | 38 | 0 | 0 | 0 | 0 | 2 | |
TestValueFlow | 36 | 0 | 0 | 0 | 0 | 2 | |
__Globals | 1 | 0 | 0 | 1 | 0 | 0 | anonymous_namespace{testvaarg.cpp} |
__Globals | 1 | 0 | 0 | 1 | 0 | 0 | anonymous_namespace{testvalueflow.cpp} |
__Globals | 1 | 0 | 0 | 1 | 0 | 0 | anonymous_namespace{testvarid.cpp} |
TestVarID | 135 | 0 | 0 | 0 | 0 | 2 | |
TestUnusedFunctions | 30 | 0 | 0 | 0 | 0 | 2 | |
__Globals | 1 | 0 | 0 | 1 | 0 | 0 | anonymous_namespace{testtoken.cpp} |
TestTokenizer | 389 | 1 | 0 | 1 | 0 | 2 | |
TestToken | 54 | 1 | 0 | 6 | 0 | 2 | |
TestTimer | 8 | 0 | 0 | 0 | 0 | 2 | |
__Globals | 1 | 0 | 0 | 1 | 0 | 0 | anonymous_namespace{testtimer.cpp} |
TestUninitVar | 49 | 0 | 0 | 1 | 0 | 2 | |
__Globals | 1 | 0 | 0 | 1 | 0 | 0 | anonymous_namespace{testuninitvar.cpp} |
__Globals | 1 | 0 | 0 | 1 | 0 | 0 | anonymous_namespace{testtype.cpp} |
__Globals | 1 | 0 | 0 | 1 | 0 | 0 | anonymous_namespace{testtokenize.cpp} |
TestType | 11 | 0 | 0 | 0 | 0 | 2 | |
__Globals | 1 | 0 | 0 | 1 | 0 | 0 | anonymous_namespace{testlibrary.cpp} |
TestMathLib | 33 | 0 | 0 | 0 | 0 | 2 | |
TestLibrary | 22 | 0 | 0 | 0 | 0 | 2 | |
TestLeakAutoVar | 63 | 0 | 0 | 0 | 0 | 2 | |
__Globals | 1 | 0 | 0 | 1 | 0 | 0 | anonymous_namespace{testleakautovar.cpp} |
TestMemleakInClass | 38 | 0 | 0 | 0 | 0 | 2 | |
TestMemleakStructMember | 27 | 0 | 0 | 0 | 0 | 2 | |
TestMemleakInFunction | 166 | 1 | 0 | 2 | 0 | 2 | |
__Globals | 1 | 0 | 0 | 1 | 0 | 0 | anonymous_namespace{testmathlib.cpp} |
TestMemleak | 10 | 0 | 0 | 0 | 0 | 2 | |
__Globals | 1 | 0 | 0 | 1 | 0 | 0 | anonymous_namespace{testio.cpp} |
TestFileLister | 9 | 0 | 0 | 0 | 0 | 2 | |
__Globals | 1 | 0 | 0 | 1 | 0 | 0 | anonymous_namespace{testfilelister.cpp} |
__Globals | 1 | 0 | 0 | 1 | 0 | 0 | anonymous_namespace{testexceptionsafety .cpp} |
__Globals | 1 | 0 | 0 | 1 | 0 | 0 | anonymous_namespace{check64bit.cpp} |
TestExceptionSafety | 25 | 0 | 0 | 0 | 0 | 2 | |
__Globals | 1 | 0 | 0 | 1 | 0 | 0 | anonymous_namespace{testincompletestatem ent.cpp} |
TestIO | 29 | 0 | 0 | 1 | 0 | 2 | |
TestIncompleteStatement | 26 | 0 | 0 | 0 | 0 | 2 | |
TestGarbage | 55 | 0 | 0 | 0 | 0 | 2 | |
__Globals | 1 | 0 | 0 | 1 | 0 | 0 | anonymous_namespace{testgarbage.cpp} |
TestMemleakNoVar | 11 | 0 | 0 | 1 | 0 | 2 | |
__Globals | 1 | 0 | 0 | 1 | 0 | 0 | anonymous_namespace{testpath.cpp} |
TestPathMatch | 34 | 0 | 0 | 4 | 0 | 2 | |
TestPath | 13 | 0 | 0 | 0 | 0 | 2 | |
TestOther | 120 | 0 | 0 | 0 | 0 | 2 | |
__Globals | 1 | 0 | 0 | 1 | 0 | 0 | anonymous_namespace{testother.cpp} |
TestPreprocessor | 192 | 0 | 0 | 0 | 0 | 2 | |
__Globals | 1 | 0 | 0 | 1 | 0 | 0 | anonymous_namespace{testpreprocessor .cpp} |
__Globals | 1 | 0 | 0 | 1 | 0 | 0 | anonymous_namespace{testpostfixoperator .cpp} |
__Globals | 1 | 0 | 0 | 1 | 0 | 0 | anonymous_namespace{testpathmatch.cpp} |
TestPostfixOperator | 18 | 0 | 0 | 0 | 0 | 2 | |
__Globals | 1 | 0 | 0 | 1 | 0 | 0 | anonymous_namespace{testoptions.cpp} |
TestNonReentrantFunctions | 10 | 0 | 0 | 0 | 0 | 2 | |
__Globals | 1 | 0 | 0 | 1 | 0 | 0 | anonymous_namespace{testnonreentrantfunc tions.cpp} |
TestMemleakWindows | 9 | 0 | 0 | 1 | 0 | 2 | |
__Globals | 1 | 0 | 0 | 1 | 0 | 0 | anonymous_namespace{testmemleak.cpp} |
TestMemleakGLib | 9 | 0 | 0 | 1 | 0 | 2 | |
__Globals | 1 | 0 | 0 | 1 | 0 | 0 | anonymous_namespace{testobsolescentfunct ions.cpp} |
TestOptions | 15 | 0 | 0 | 0 | 0 | 2 | |
TestObsoleteFunctions | 24 | 0 | 0 | 0 | 0 | 2 | |
TestNullPointer | 55 | 0 | 0 | 1 | 0 | 2 | |
__Globals | 1 | 0 | 0 | 1 | 0 | 0 | anonymous_namespace{testnullpointer.cpp} |
Types Metrics : Lack Of Cohesion Of Methods and Association Between Classes
Type Name | Lack Of Cohesion Of Methods | Lack Of Cohesion Of Methods HS | Association Between Classes | Type Namespace |
---|---|---|---|---|
Token | 0.94 | 0.95 | 132 | |
Settings | 0.92 | 1.01 | 46 | |
Tokenizer | 0.87 | 0.87 | 369 | |
TestFixture | 0.86 | 0.9 | 66 | |
__Globals | 1 | 1.08 | 79 | |
__Globals | 0 | 0 | 400 | |
Scope | 0.86 | 0.9 | 109 | |
ErrorLogger | 0 | 0 | 25 | |
Variable | 0.89 | 0.92 | 56 | |
Library | 0.95 | 0.97 | 181 | |
XMLDocument | 0.88 | 0.91 | 53 | tinyxml2 |
XMLUtil | 0 | 0 | 13 | tinyxml2 |
Severity+SeverityType | - | - | 0 | |
XMLError | - | - | 0 | tinyxml2 |
XMLNode | 0.86 | 0.88 | 20 | tinyxml2 |
Check | 0.83 | 0.88 | 24 | |
StrPair | 0.48 | 0.51 | 21 | tinyxml2 |
XMLVisitor | 0 | 0 | 0 | tinyxml2 |
SymbolDatabase | 0.86 | 0.89 | 302 | |
StrPair+AnonymousEnum | - | - | 0 | tinyxml2 |
MemPoolT<SIZE>+Chunk | 0 | 0 | 0 | tinyxml2 |
ErrorLogger+ErrorMessage | 0.57 | 0.61 | 85 | |
InternalError | 0 | 0 | 4 | |
XMLText | 0.75 | 0.82 | 20 | tinyxml2 |
Type | 0.7 | 0.88 | 41 | |
MathLib | 0 | 0 | 45 | |
Check+FileInfo | 0 | 0 | 0 | |
XMLElement | 0.89 | 0.91 | 71 | tinyxml2 |
Function | 0.95 | 0.97 | 96 | |
XMLUnknown | 0 | 0 | 13 | tinyxml2 |
XMLDeclaration | 0 | 0 | 13 | tinyxml2 |
TokenList | 0.79 | 0.83 | 88 | |
Path | 0 | 0 | 58 | |
MemPool | 0 | 0 | 0 | tinyxml2 |
Library+ErrorCode | - | - | 0 | |
Scope+ScopeType | - | - | 0 | |
Preprocessor | 0.72 | 0.74 | 261 | |
Settings+PlatformType | - | - | 0 | |
Token+Type | - | - | 0 | |
AccessControl | - | - | 0 | |
Library+Container+Action | - | - | 0 | |
Library+Container+Yield | - | - | 0 | |
ErrorLogger+ErrorMessage+FileLocation | 0.25 | 0.3 | 14 | |
Suppressions | 0.29 | 0.33 | 56 | |
XMLAttribute | 0.86 | 0.9 | 20 | tinyxml2 |
XMLComment | 0 | 0 | 13 | tinyxml2 |
Library+Error | 0 | 0 | 3 | |
Library+ArgumentChecks+MinSize+Type | - | - | 0 | |
VarInfo+AllocStatus | - | - | 0 | |
Variables | 0.78 | 0.82 | 44 | |
SHOWTIME_MODES | - | - | 0 | |
__Globals | 0 | 0 | 3 | tinyxml2 |
Settings+Language | - | - | 0 | |
Function+Type | - | - | 0 | |
InternalError+Type | - | - | 0 | |
options | 0.75 | 0.88 | 8 | |
Value | 0 | 0 | 0 | ValueFlow |
Type+BaseInfo | 0.5 | 1 | 1 | |
Whitespace | - | - | 0 | tinyxml2 |
CppCheck | 0.81 | 0.84 | 154 | |
XMLElement+AnonymousEnum | - | - | 0 | tinyxml2 |
Suppressions+SuppressionEntry | 0 | 0 | 1 | |
Entity | 0 | 0 | 0 | tinyxml2 |
CheckMemoryLeak+AllocType | - | - | 0 | |
Library+Container | 0.71 | 1.07 | 9 | |
MemPoolT<SIZE> | 0.57 | 0.63 | 3 | tinyxml2 |
RedirectOutputError | 0.5 | 0.6 | 13 | |
Dimension | 0 | 0 | 0 | |
Library+PodType | 0 | 0 | 0 | |
CheckMemoryLeak | 0.81 | 0.85 | 80 | |
Filepointer+AppendMode | - | - | 0 | |
Filepointer+Operation | - | - | 0 | |
OpenMode | - | - | 0 | |
XMLAttribute+AnonymousEnum | - | - | 0 | tinyxml2 |
DynArray<T,INIT> | 0.58 | 0.62 | 0 | tinyxml2 |
StrPair+AnonymousEnum | - | - | 0 | tinyxml2 |
Variables+VariableType | - | - | 0 | |
CheckClass | 0.74 | 0.75 | 234 | |
Type+NeedInitialization | - | - | 0 | |
TimerResultsData | 0.25 | 0.5 | 1 | |
Library+PlatformType | 0.38 | 0.57 | 1 | |
CheckMemoryLeakInFunction | 0.73 | 0.79 | 144 | |
TemplateSimplifier | 0 | 0 | 148 | |
CheckOther | 0 | 0 | 221 | |
Library+ArgumentChecks | 0.29 | 0 | 0 | |
Token+Anonymous | 0 | 0 | 0 | |
Token+AnonymousEnum | - | - | 0 | |
XMLPrinter | 0.87 | 0.9 | 39 | tinyxml2 |
Scope+UsingInfo | 0 | 0 | 0 | |
MemPoolT<SIZE>+Block | 0 | 0 | 0 | tinyxml2 |
MemPoolT<SIZE>+AnonymousEnum | - | - | 0 | tinyxml2 |
TestRegistry | 0.33 | 0.5 | 2 | |
Variable+AnonymousEnum | - | - | 0 | |
PathMatch | 0.33 | 0.5 | 28 | |
CheckStl | 0 | 0 | 154 | |
FileLister | 0 | 0 | 33 | |
XMLElement+AnonymousEnum | - | - | 0 | tinyxml2 |
Library+Container+Function | 0 | 0 | 0 | |
TimerResultsIntf | 0 | 0 | 0 | |
CheckNullPointer | 0 | 0 | 94 | |
Library+ArgumentChecks+MinSize | 0 | 0 | 0 | |
__Globals | 0 | 0 | 60 | |
ExecutionPath | 0.74 | 0.79 | 39 | |
ThreadExecutor | 0.79 | 0.86 | 66 | |
CheckUninitVar | 0.92 | 0.96 | 136 | |
Timer | 0.5 | 0.67 | 12 | |
TimerResults | 0.33 | 0.5 | 31 | |
CppCheckExecutor | 0.81 | 0.87 | 154 | |
VarInfo+AllocInfo | 0 | 0 | 1 | |
Type+FriendInfo | 0.25 | 0 | 0 | |
CheckMemoryLeakInClass | 0 | 0 | 76 | |
CheckBool | 0 | 0 | 70 | |
CheckExceptionSafety | 0 | 0 | 67 | |
CheckAssert | 0 | 0 | 44 | |
Check64BitPortability | 0 | 0 | 34 | |
CheckVaarg | 0 | 0 | 54 | |
CheckSizeof | 0 | 0 | 57 | |
CheckMemoryLeakStructMember | 0 | 0 | 45 | |
CheckPostfixOperator | 0 | 0 | 29 | |
CheckType | 0 | 0 | 67 | |
CheckNonReentrantFunctions | 0.5 | 0.57 | 44 | |
CheckLeakAutoVar | 0 | 0 | 110 | |
Variables+VariableUsage | 0.56 | 0.83 | 5 | |
Variables+ScopeGuard | 0.33 | 0.5 | 2 | |
scopeStackEntryType | 0 | 0 | 0 | anonymous_namespace{tokenize.cpp} |
EnumValue | 0.25 | 0.31 | 13 | |
__Globals | 0 | 0 | 16 | ValueFlow |
Space | 0.33 | 0 | 0 | |
CheckObsoleteFunctions | 0.67 | 0.76 | 49 | |
CheckUnusedVar | 0.94 | 1 | 158 | |
CheckUnusedFunctions | 0.82 | 0.9 | 94 | |
givenACodeSampleToTokenize | 0.25 | 0.5 | 7 | |
CmdLineParser | 0.74 | 0.83 | 124 | |
Preprocessor+HeaderTypes | - | - | 0 | |
CheckString | 0 | 0 | 61 | |
CheckBoost | 0 | 0 | 24 | |
CheckMemoryLeakNoVar | 0 | 0 | 58 | |
CheckAutoVariables | 0 | 0 | 65 | |
Function+AnonymousEnum | - | - | 0 | |
TestCppcheck+ErrorLogger2 | 0.5 | 1 | 4 | |
Suppressions+FileMatcher | 0.5 | 0.67 | 30 | |
Severity | 0 | 0 | 15 | |
Library+Platform | 0 | 0 | 5 | |
Library+ExportedFunctions | 0.5 | 0.67 | 4 | |
Library+CodeBlock | 0.75 | 0.84 | 5 | |
CheckIO | 0 | 0 | 170 | |
CheckCondition | 0 | 0 | 122 | |
CppCheckExecutor | 0.81 | 0.87 | 154 | |
XMLPrinter+AnonymousEnum | - | - | 0 | tinyxml2 |
CheckBufferOverrun | 0 | 0 | 217 | |
__Globals | 0 | 0 | 2 | anonymous_namespace{timer.cpp} |
FileLister | 0 | 0 | 33 | |
TestPreprocessor+OurPreprocessor | 0 | 0 | 7 | |
SimpleSuppressor | 0.17 | 0.25 | 13 | |
ThreadExecutor+MessageType | - | - | 0 | |
ThreadExecutor+MessageType | - | - | 0 | |
CheckUnusedFunctions+FunctionUsage | 0.25 | 0 | 0 | |
PreprocessorMacro | 0.76 | 0.86 | 63 | |
VarInfo | 0.25 | 0.31 | 25 | |
Settings+Rule | 0.4 | 0 | 1 | |
EraseCheckLoop | 0.57 | 0.67 | 35 | |
__Globals | 1 | 1.5 | 27 | anonymous_namespace{checkother.cpp} |
VarInfo | 0 | 0 | 0 | |
CheckClass+Usage | 0 | 0 | 0 | |
__Globals | 1 | 1.5 | 9 | anonymous_namespace{checkclass.cpp} |
CheckIO+ArgumentInfo | 0.67 | 0.75 | 56 | |
Filepointer | 0 | 0 | 3 | |
CheckUninitVar+Alloc | - | - | 0 | |
CheckUninitVar+MyFileInfo | 0 | 0 | 2 | |
UninitVar | 0.76 | 0.8 | 84 | |
CheckBufferOverrun+MyFileInfo+ArrayUsage | 0 | 0 | 0 | |
CheckBufferOverrun+ArrayInfo | 0.54 | 0.59 | 19 | |
CheckBufferOverrun+MyFileInfo | 0 | 0 | 2 | |
CmdLineParser | 0.74 | 0.83 | 124 | |
ThreadExecutor | 0.79 | 0.86 | 66 | |
PathMatch | 0.33 | 0.5 | 28 | |
__Globals | 1 | 0 | 1 | anonymous_namespace{checkuninitvar.cpp} |
TestAssert | 0 | 0 | 18 | |
__Globals | 1 | 0 | 1 | anonymous_namespace{checkunusedvar.cpp} |
__Globals | 1 | 0 | 1 | anonymous_namespace{test64bit.cpp} |
Test64BitPortability | 0 | 0 | 19 | |
__Globals | 1 | 0 | 1 | anonymous_namespace{checkcondition.cpp} |
__Globals | 1 | 0 | 1 | anonymous_namespace{checkstring.cpp} |
TestCppcheck | 0 | 0 | 34 | |
__Globals | 1 | 0 | 1 | anonymous_namespace{checkexceptionsafety .cpp} |
__Globals | 1 | 0 | 1 | anonymous_namespace{checkstl.cpp} |
__Globals | 1 | 0 | 1 | anonymous_namespace{checktype.cpp} |
__Globals | 1 | 0 | 1 | anonymous_namespace{testassert.cpp} |
TestErrorLogger | 0.52 | 0.55 | 47 | |
__Globals | 1 | 0 | 1 | anonymous_namespace{checkbool.cpp} |
AST_state | 0.25 | 0 | 0 | |
__Globals | 1 | 0 | 1 | anonymous_namespace{checkassert.cpp} |
TestVaarg | 0 | 0 | 18 | |
__Globals | 0 | 0 | 1 | anonymous_namespace{checkautovariables .cpp} |
IMAGEHLP_SYMBOL64_EXT | 0 | 0 | 1 | |
__Globals | 1 | 0 | 1 | anonymous_namespace{checkbufferoverrun .cpp} |
__Globals | 1 | 0 | 1 | anonymous_namespace{testcppcheck.cpp} |
__Globals | 1 | 0 | 1 | anonymous_namespace{checkboost.cpp} |
IMAGEHLP_SYMBOL64_EXT | 0 | 0 | 1 | |
__Globals | 1 | 0 | 1 | anonymous_namespace{checkvaarg.cpp} |
TestClass | 0 | 0 | 45 | |
__Globals | 1 | 0 | 1 | anonymous_namespace{testcharvar.cpp} |
TestCharVar | 0 | 0 | 18 | |
__Globals | 1 | 0 | 1 | anonymous_namespace{checknullpointer .cpp} |
TestCmdlineParser | 0.18 | 0.19 | 79 | |
__Globals | 1 | 0 | 1 | anonymous_namespace{testclass.cpp} |
__Globals | 1 | 0 | 1 | anonymous_namespace{testbufferoverrun .cpp} |
__Globals | 1 | 0 | 1 | anonymous_namespace{checknonreentrantfun ctions.cpp} |
__Globals | 1 | 0 | 1 | anonymous_namespace{testboost.cpp} |
TestBufferOverrun | 0 | 0 | 51 | |
TestBoost | 0 | 0 | 24 | |
__Globals | 1 | 0 | 1 | anonymous_namespace{checkleakautovar .cpp} |
__Globals | 1 | 0 | 4 | anonymous_namespace{checkmemoryleak.cpp} |
__Globals | 1 | 0 | 1 | anonymous_namespace{checksizeof.cpp} |
TestBool | 0 | 0 | 23 | |
__Globals | 1 | 0 | 1 | anonymous_namespace{testconstructors .cpp} |
TestAutoVariables | 0 | 0 | 29 | |
__Globals | 1 | 0 | 1 | anonymous_namespace{checkio.cpp} |
__Globals | 1 | 0 | 1 | anonymous_namespace{testautovariables .cpp} |
__Globals | 1 | 0 | 1 | anonymous_namespace{checkpostfixoperator .cpp} |
TestCondition | 0 | 0 | 31 | |
__Globals | 1 | 0 | 1 | anonymous_namespace{testcmdlineparser .cpp} |
__Globals | 1 | 0 | 1 | anonymous_namespace{checkobsolescentfunc tions.cpp} |
TestConstructors | 0 | 0 | 21 | |
__Globals | 1 | 0 | 1 | anonymous_namespace{testcondition.cpp} |
__Globals | 1 | 0 | 1 | anonymous_namespace{testbool.cpp} |
__Globals | 1 | 0 | 1 | anonymous_namespace{testerrorlogger.cpp} |
TestString | 0 | 0 | 30 | |
__Globals | 1 | 0 | 1 | anonymous_namespace{teststring.cpp} |
__Globals | 1 | 0 | 1 | anonymous_namespace{teststl.cpp} |
XMLConstHandle | 0 | 0 | 12 | tinyxml2 |
XMLHandle | 0 | 0 | 12 | tinyxml2 |
__Globals | 1 | 0 | 1 | anonymous_namespace{testsymboldatabase .cpp} |
TestThreadExecutor | 0 | 0 | 28 | |
TestSymbolDatabase | 0.78 | 0.78 | 172 | |
TestSuppressions | 0 | 0 | 57 | |
__Globals | 1 | 0 | 1 | anonymous_namespace{testsuppressions .cpp} |
TestStl | 0.98 | 0.99 | 29 | |
__Globals | 1 | 0 | 1 | anonymous_namespace{testsimplifytemplate .cpp} |
TestSimplifyTokens | 0.99 | 0.99 | 54 | |
TestSimplifyTemplate | 0 | 0 | 32 | |
TestSamples | 0 | 0 | 39 | |
__Globals | 1 | 0 | 1 | anonymous_namespace{testsamples.cpp} |
TestSizeof | 0 | 0 | 20 | |
__Globals | 1 | 0 | 1 | anonymous_namespace{testsizeof.cpp} |
__Globals | 1 | 0 | 1 | anonymous_namespace{testsimplifytypedef .cpp} |
__Globals | 1 | 0 | 1 | anonymous_namespace{testsimplifytokens .cpp} |
TestSimplifyTypedef | 0 | 0 | 33 | |
__Globals | 1 | 0 | 1 | anonymous_namespace{testthreadexecutor .cpp} |
TestUnusedVar | 0 | 0 | 25 | |
__Globals | 1 | 0 | 1 | anonymous_namespace{testunusedvar.cpp} |
__Globals | 1 | 0 | 1 | anonymous_namespace{testunusedprivfunc .cpp} |
__Globals | 1 | 0 | 1 | anonymous_namespace{testunusedfunctions .cpp} |
TestUnusedPrivateFunction | 0 | 0 | 20 | |
TestValueFlow | 0 | 0 | 48 | |
__Globals | 1 | 0 | 1 | anonymous_namespace{testvaarg.cpp} |
__Globals | 1 | 0 | 1 | anonymous_namespace{testvalueflow.cpp} |
__Globals | 1 | 0 | 1 | anonymous_namespace{testvarid.cpp} |
TestVarID | 0 | 0 | 27 | |
TestUnusedFunctions | 0 | 0 | 24 | |
__Globals | 1 | 0 | 1 | anonymous_namespace{testtoken.cpp} |
TestTokenizer | 0.99 | 1 | 123 | |
TestToken | 0.83 | 0.84 | 84 | |
TestTimer | 0 | 0 | 11 | |
__Globals | 1 | 0 | 1 | anonymous_namespace{testtimer.cpp} |
TestUninitVar | 0.86 | 0.88 | 47 | |
__Globals | 1 | 0 | 1 | anonymous_namespace{testuninitvar.cpp} |
__Globals | 1 | 0 | 1 | anonymous_namespace{testtype.cpp} |
__Globals | 1 | 0 | 1 | anonymous_namespace{testtokenize.cpp} |
TestType | 0 | 0 | 21 | |
__Globals | 1 | 0 | 1 | anonymous_namespace{testlibrary.cpp} |
TestMathLib | 0 | 0 | 46 | |
TestLibrary | 0 | 0 | 81 | |
TestLeakAutoVar | 0 | 0 | 26 | |
__Globals | 1 | 0 | 1 | anonymous_namespace{testleakautovar.cpp} |
TestMemleakInClass | 0 | 0 | 20 | |
TestMemleakStructMember | 0 | 0 | 19 | |
TestMemleakInFunction | 0.98 | 0.99 | 70 | |
__Globals | 1 | 0 | 1 | anonymous_namespace{testmathlib.cpp} |
TestMemleak | 0 | 0 | 27 | |
__Globals | 1 | 0 | 1 | anonymous_namespace{testio.cpp} |
TestFileLister | 0 | 0 | 26 | |
__Globals | 1 | 0 | 1 | anonymous_namespace{testfilelister.cpp} |
__Globals | 1 | 0 | 1 | anonymous_namespace{testexceptionsafety .cpp} |
__Globals | 1 | 0 | 1 | anonymous_namespace{check64bit.cpp} |
TestExceptionSafety | 0 | 0 | 20 | |
__Globals | 1 | 0 | 1 | anonymous_namespace{testincompletestatem ent.cpp} |
TestIO | 0.92 | 0.96 | 35 | |
TestIncompleteStatement | 0 | 0 | 19 | |
TestGarbage | 0 | 0 | 39 | |
__Globals | 1 | 0 | 1 | anonymous_namespace{testgarbage.cpp} |
TestMemleakNoVar | 0.67 | 0.8 | 26 | |
__Globals | 1 | 0 | 1 | anonymous_namespace{testpath.cpp} |
TestPathMatch | 0.78 | 0.81 | 11 | |
TestPath | 0 | 0 | 17 | |
TestOther | 0 | 0 | 63 | |
__Globals | 1 | 0 | 1 | anonymous_namespace{testother.cpp} |
TestPreprocessor | 0 | 0 | 92 | |
__Globals | 1 | 0 | 1 | anonymous_namespace{testpreprocessor .cpp} |
__Globals | 1 | 0 | 1 | anonymous_namespace{testpostfixoperator .cpp} |
__Globals | 1 | 0 | 1 | anonymous_namespace{testpathmatch.cpp} |
TestPostfixOperator | 0 | 0 | 20 | |
__Globals | 1 | 0 | 1 | anonymous_namespace{testoptions.cpp} |
TestNonReentrantFunctions | 0 | 0 | 21 | |
__Globals | 1 | 0 | 1 | anonymous_namespace{testnonreentrantfunc tions.cpp} |
TestMemleakWindows | 0.5 | 0.67 | 28 | |
__Globals | 1 | 0 | 1 | anonymous_namespace{testmemleak.cpp} |
TestMemleakGLib | 0.5 | 0.67 | 27 | |
__Globals | 1 | 0 | 1 | anonymous_namespace{testobsolescentfunct ions.cpp} |
TestOptions | 0 | 0 | 11 | |
TestObsoleteFunctions | 0 | 0 | 23 | |
TestNullPointer | 0.96 | 0.98 | 49 | |
__Globals | 1 | 0 | 1 | anonymous_namespace{testnullpointer.cpp} |
Namespaces Metrics
Clicking column header arrows sorts values.
Clicking column header title text redirect to the online Code Metric definition.
Namespaces | # lines of code | # Types | # lines of comment | % Comment | Afferent Coupling | Efferent Coupling |
---|---|---|---|---|---|---|
cppcheck::GlobalNamespace | 27759 | 121 | 0 | 0 | 29 | 9 |
cppcheck::tinyxml2 | 1315 | 30 | 0 | 0 | 2 | 3 |
cppcheck::ValueFlow | 30 | 2 | 0 | 0 | 2 | 3 |
cppcheck::anonymous_namespace{check64bit .cpp} | 0 | 1 | 0 | 0 | 0 | 1 |
cppcheck::anonymous_namespace{checkasser t.cpp} | 0 | 1 | 0 | 0 | 0 | 1 |
cppcheck::anonymous_namespace{checkautov ariables.cpp} | 0 | 1 | 0 | 0 | 0 | 1 |
cppcheck::anonymous_namespace{checkbool .cpp} | 0 | 1 | 0 | 0 | 0 | 1 |
cppcheck::anonymous_namespace{checkboost .cpp} | 0 | 1 | 0 | 0 | 0 | 1 |
cppcheck::anonymous_namespace{checkbuffe roverrun.cpp} | 0 | 1 | 0 | 0 | 0 | 1 |
cppcheck::anonymous_namespace{checkclass .cpp} | 15 | 1 | 0 | 0 | 1 | 1 |
cppcheck::anonymous_namespace{checkcondi tion.cpp} | 0 | 1 | 0 | 0 | 0 | 1 |
cppcheck::anonymous_namespace{checkstrin g.cpp} | 0 | 1 | 0 | 0 | 0 | 1 |
cppcheck::anonymous_namespace{checkexcep tionsafety.cpp} | 0 | 1 | 0 | 0 | 0 | 1 |
cppcheck::anonymous_namespace{checkio .cpp} | 0 | 1 | 0 | 0 | 0 | 1 |
cppcheck::anonymous_namespace{checkleaka utovar.cpp} | 0 | 1 | 0 | 0 | 0 | 1 |
cppcheck::anonymous_namespace{checkmemor yleak.cpp} | 0 | 1 | 0 | 0 | 0 | 1 |
cppcheck::anonymous_namespace{checknonre entrantfunctions.cpp} | 0 | 1 | 0 | 0 | 0 | 1 |
cppcheck::anonymous_namespace{checknullp ointer.cpp} | 0 | 1 | 0 | 0 | 0 | 1 |
cppcheck::anonymous_namespace{checkobsol escentfunctions.cpp} | 0 | 1 | 0 | 0 | 0 | 1 |
cppcheck::anonymous_namespace{checkother .cpp} | 12 | 1 | 0 | 0 | 1 | 2 |
cppcheck::anonymous_namespace{checkpostf ixoperator.cpp} | 0 | 1 | 0 | 0 | 0 | 1 |
cppcheck::anonymous_namespace{checksizeo f.cpp} | 0 | 1 | 0 | 0 | 0 | 1 |
cppcheck::anonymous_namespace{checkstl .cpp} | 0 | 1 | 0 | 0 | 0 | 1 |
cppcheck::anonymous_namespace{checktype .cpp} | 0 | 1 | 0 | 0 | 0 | 1 |
cppcheck::anonymous_namespace{checkunini tvar.cpp} | 0 | 1 | 0 | 0 | 0 | 1 |
cppcheck::anonymous_namespace{checkunuse dvar.cpp} | 0 | 1 | 0 | 0 | 0 | 1 |
cppcheck::anonymous_namespace{checkvaarg .cpp} | 0 | 1 | 0 | 0 | 0 | 1 |
cppcheck::anonymous_namespace{timer.cpp} | 1 | 1 | 0 | 0 | 1 | 2 |
cppcheck::anonymous_namespace{tokenize .cpp} | 4 | 1 | 0 | 0 | 1 | 1 |
cli::GlobalNamespace | 959 | 8 | 0 | 0 | 0 | 4 |
testrunner::GlobalNamespace | 26308 | 74 | 0 | 0 | 52 | 6 |
testrunner::anonymous_namespace{test64bi t.cpp} | 0 | 1 | 0 | 0 | 0 | 1 |
testrunner::anonymous_namespace{testasse rt.cpp} | 0 | 1 | 0 | 0 | 0 | 1 |
testrunner::anonymous_namespace{testauto variables.cpp} | 0 | 1 | 0 | 0 | 0 | 1 |
testrunner::anonymous_namespace{testbool .cpp} | 0 | 1 | 0 | 0 | 0 | 1 |
testrunner::anonymous_namespace{testboos t.cpp} | 0 | 1 | 0 | 0 | 0 | 1 |
testrunner::anonymous_namespace{testbuff eroverrun.cpp} | 0 | 1 | 0 | 0 | 0 | 1 |
testrunner::anonymous_namespace{testchar var.cpp} | 0 | 1 | 0 | 0 | 0 | 1 |
testrunner::anonymous_namespace{testclas s.cpp} | 0 | 1 | 0 | 0 | 0 | 1 |
testrunner::anonymous_namespace{testcmdl ineparser.cpp} | 0 | 1 | 0 | 0 | 0 | 1 |
testrunner::anonymous_namespace{testcond ition.cpp} | 0 | 1 | 0 | 0 | 0 | 1 |
testrunner::anonymous_namespace{testcons tructors.cpp} | 0 | 1 | 0 | 0 | 0 | 1 |
testrunner::anonymous_namespace{testcppc heck.cpp} | 0 | 1 | 0 | 0 | 0 | 1 |
testrunner::anonymous_namespace{testerro rlogger.cpp} | 0 | 1 | 0 | 0 | 0 | 1 |
testrunner::anonymous_namespace{testexce ptionsafety.cpp} | 0 | 1 | 0 | 0 | 0 | 1 |
testrunner::anonymous_namespace{testfile lister.cpp} | 0 | 1 | 0 | 0 | 0 | 1 |
testrunner::anonymous_namespace{testgarb age.cpp} | 0 | 1 | 0 | 0 | 0 | 1 |
testrunner::anonymous_namespace{testinco mpletestatement.cpp} | 0 | 1 | 0 | 0 | 0 | 1 |
testrunner::anonymous_namespace{testio .cpp} | 0 | 1 | 0 | 0 | 0 | 1 |
testrunner::anonymous_namespace{testleak autovar.cpp} | 0 | 1 | 0 | 0 | 0 | 1 |
testrunner::anonymous_namespace{testlibr ary.cpp} | 0 | 1 | 0 | 0 | 0 | 1 |
testrunner::anonymous_namespace{testmath lib.cpp} | 0 | 1 | 0 | 0 | 0 | 1 |
testrunner::anonymous_namespace{testmeml eak.cpp} | 0 | 1 | 0 | 0 | 0 | 1 |
testrunner::anonymous_namespace{testnonr eentrantfunctions.cpp} | 0 | 1 | 0 | 0 | 0 | 1 |
testrunner::anonymous_namespace{testnull pointer.cpp} | 0 | 1 | 0 | 0 | 0 | 1 |
testrunner::anonymous_namespace{testobso lescentfunctions.cpp} | 0 | 1 | 0 | 0 | 0 | 1 |
testrunner::anonymous_namespace{testopti ons.cpp} | 0 | 1 | 0 | 0 | 0 | 1 |
testrunner::anonymous_namespace{testothe r.cpp} | 0 | 1 | 0 | 0 | 0 | 1 |
testrunner::anonymous_namespace{testpath .cpp} | 0 | 1 | 0 | 0 | 0 | 1 |
testrunner::anonymous_namespace{testpath match.cpp} | 0 | 1 | 0 | 0 | 0 | 1 |
testrunner::anonymous_namespace{testpost fixoperator.cpp} | 0 | 1 | 0 | 0 | 0 | 1 |
testrunner::anonymous_namespace{testprep rocessor.cpp} | 0 | 1 | 0 | 0 | 0 | 1 |
testrunner::anonymous_namespace{testsamp les.cpp} | 0 | 1 | 0 | 0 | 0 | 1 |
testrunner::anonymous_namespace{testsimp lifytemplate.cpp} | 0 | 1 | 0 | 0 | 0 | 1 |
testrunner::anonymous_namespace{testsimp lifytokens.cpp} | 0 | 1 | 0 | 0 | 0 | 1 |
testrunner::anonymous_namespace{testsimp lifytypedef.cpp} | 0 | 1 | 0 | 0 | 0 | 1 |
testrunner::anonymous_namespace{testsize of.cpp} | 0 | 1 | 0 | 0 | 0 | 1 |
testrunner::anonymous_namespace{teststl .cpp} | 0 | 1 | 0 | 0 | 0 | 1 |
testrunner::anonymous_namespace{teststri ng.cpp} | 0 | 1 | 0 | 0 | 0 | 1 |
testrunner::anonymous_namespace{testsupp ressions.cpp} | 0 | 1 | 0 | 0 | 0 | 1 |
testrunner::anonymous_namespace{testsymb oldatabase.cpp} | 0 | 1 | 0 | 0 | 0 | 1 |
testrunner::anonymous_namespace{testthre adexecutor.cpp} | 0 | 1 | 0 | 0 | 0 | 1 |
testrunner::anonymous_namespace{testtime r.cpp} | 0 | 1 | 0 | 0 | 0 | 1 |
testrunner::anonymous_namespace{testtoke n.cpp} | 0 | 1 | 0 | 0 | 0 | 1 |
testrunner::anonymous_namespace{testtoke nize.cpp} | 0 | 1 | 0 | 0 | 0 | 1 |
testrunner::anonymous_namespace{testtype .cpp} | 0 | 1 | 0 | 0 | 0 | 1 |
testrunner::anonymous_namespace{testunin itvar.cpp} | 0 | 1 | 0 | 0 | 0 | 1 |
testrunner::anonymous_namespace{testunus edfunctions.cpp} | 0 | 1 | 0 | 0 | 0 | 1 |
testrunner::anonymous_namespace{testunus edprivfunc.cpp} | 0 | 1 | 0 | 0 | 0 | 1 |
testrunner::anonymous_namespace{testunus edvar.cpp} | 0 | 1 | 0 | 0 | 0 | 1 |
testrunner::anonymous_namespace{testvaar g.cpp} | 0 | 1 | 0 | 0 | 0 | 1 |
testrunner::anonymous_namespace{testvalu eflow.cpp} | 0 | 1 | 0 | 0 | 0 | 1 |
testrunner::anonymous_namespace{testvari d.cpp} | 0 | 1 | 0 | 0 | 0 | 1 |
Project Rules | 172410 |
|
Code Quality | 490 |
|
Critical Rule warning: Types too big - critical |
• How to Fix Violations: Types with many lines of code should be split in a group of smaller types. To refactor a God Class you'll need patience, and you might even need to recreate everything from scratch. Here are a few advices: • Think before pulling out methods: on what data does this method operate? What responsibility does it have? • Try to maintain the interface of the god class at first and delegate calls to the new extracted classes. In the end the god class should be a pure facade without own logic. Then you can keep it for convenience or throw it away and start to use the new classes only. • Unit Tests can help: write tests for each method before extracting it to ensure you don't break functionality.
32 types matched
types | # lines of code (LOC) | # Methods | # Fields | Full Name |
---|---|---|---|---|
Tokenizer | 5 727 | 155 | 9 | Tokenizer |
TestTokenizer | 3 012 | 390 | 1 | TestTokenizer |
TestPreprocessor | 1 770 | 192 | 0 | TestPreprocessor |
TestOther | 1 555 | 120 | 0 | TestOther |
TestSymbolDatabase | 1 547 | 154 | 6 | TestSymbolDatabase |
Preprocessor | 1 490 | 36 | 6 | Preprocessor |
TestSimplifyTokens | 1 429 | 185 | 2 | TestSimplifyTokens |
CheckOther | 1 340 | 106 | 0 | CheckOther |
TestClass | 1 338 | 159 | 0 | TestClass |
SymbolDatabase | 1 311 | 27 | 9 | SymbolDatabase |
CheckIO | 1 159 | 39 | 0 | CheckIO |
TestMemleakInFunction | 1 073 | 167 | 2 | TestMemleakInFunction |
CheckClass | 1 065 | 74 | 1 | CheckClass |
CheckMemoryLeakInFunction | 995 | 20 | 1 | CheckMemoryLeakInFunction |
TestUninitVar | 984 | 49 | 1 | TestUninitVar |
TestBufferOverrun | 976 | 147 | 0 | TestBufferOverrun |
TestUnusedVar | 920 | 128 | 0 | TestUnusedVar |
Token | 858 | 143 | 17 | Token |
CheckBufferOverrun | 842 | 47 | 0 | CheckBufferOverrun |
TestSimplifyTypedef | 817 | 131 | 0 | TestSimplifyTypedef |
CheckStl | 760 | 54 | 0 | CheckStl |
TemplateSimplifier | 753 | 20 | 0 | TemplateSimplifier |
TestMathLib | 737 | 33 | 0 | TestMathLib |
TestNullPointer | 660 | 55 | 1 | TestNullPointer |
TestIO | 634 | 29 | 1 | TestIO |
TestCmdlineParser | 627 | 103 | 2 | TestCmdlineParser |
TestStl | 627 | 88 | 1 | TestStl |
Library | 608 | 55 | 27 | Library |
CheckUninitVar | 568 | 31 | 1 | CheckUninitVar |
TestToken | 567 | 55 | 6 | TestToken |
TestConstructors | 564 | 127 | 0 | TestConstructors |
TestVarID | 539 | 135 | 0 | TestVarID |
Statistics
Stat | # lines of code (LOC) | # Methods | # Fields |
---|---|---|---|
Sum: | 37 852 | 3 254 | 94 |
Average: | 1 182 | 101.69 | 2.94 |
Minimum: | 539 | 20 | 0 |
Maximum: | 5 727 | 390 | 27 |
Standard deviation: | 952.63 | 74.26 | 5.68 |
Variance: | 907 500 | 5 514 | 32.25 |
Critical Rule warning: Methods too complex - critical |
• How to Fix Violations: A large and complex method should be split in smaller methods, or even one or several classes can be created for that. During this process it is important to question the scope of each variable local to the method. This can be an indication if such local variable will become an instance field of the newly created class(es). Large switch…case structures might be refactored through the help of a set of types that implement a common interface, the interface polymorphism playing the role of the switch cases tests. Unit Tests can help: write tests for each method before extracting it to ensure you don't break functionality.
99 methods matched
methods | Cyclomatic Complexity (CC) | NestingDepth | Full Name |
---|---|---|---|
checkWrongPrintfScanfArguments() | 349 | 14 | CheckIO.checkWrongPrintfScanfArguments() |
SymbolDatabase(constTokenizer*,constSettings*,ErrorLogger*) | 279 | 19 | SymbolDatabase.SymbolDatabase(constTokenizer*,constSettings* ,ErrorLogger*) |
simplifyTypedef() | 197 | 10 | Tokenizer.simplifyTypedef() |
getcode(constToken*,std::list<constToken*>,constunsignedint ,CheckMemoryLeak::AllocType&,CheckMemoryLeak::AllocType&,bool ,unsignedint) | 191 | 9 | CheckMemoryLeakInFunction.getcode(constToken*,std::list<constToken*> ,constunsignedint,CheckMemoryLeak::AllocType& ,CheckMemoryLeak::AllocType&,bool,unsignedint) |
load(consttinyxml2::XMLDocument&) | 148 | 8 | Library.load(consttinyxml2::XMLDocument&) |
ParseFromArgs(int,constchar*const*) | 130 | 6 | CmdLineParser.ParseFromArgs(int,constchar*const*) |
ParseFromArgs(int,constchar*const*) | 130 | 6 | CmdLineParser.ParseFromArgs(int,constchar*const*) |
simplifycode(Token*) | 124 | 7 | CheckMemoryLeakInFunction.simplifycode(Token*) |
parse(constToken&,std::list<ExecutionPath*>&) | 122 | 7 | UninitVar.parse(constToken&,std::list<ExecutionPath*>&) |
checkFunctionVariableUsage_iterateScopes(constScope*const,Variables& ,bool) | 119 | 7 | CheckUnusedVar.checkFunctionVariableUsage_iterateScopes (constScope*const,Variables&,bool) |
simplifyEnum() | 111 | 11 | Tokenizer.simplifyEnum() |
valueFlowForward(Token*const,constToken*const,constVariable*const ,constunsignedint,std::list<ValueFlow::Value>,constbool ,TokenList*const,ErrorLogger*const,constSettings*const) | 98 | 7 | __Globals.valueFlowForward(Token*const,constToken*const ,constVariable*const,constunsignedint,std::list<ValueFlow::Value> ,constbool,TokenList*const,ErrorLogger*const,constSettings*const) |
setVarId() | 96 | 9 | Tokenizer.setVarId() |
getcfgs(conststd::string&,conststd::string&,conststd::map<std::string ,std::string>&) | 96 | 6 | Preprocessor.getcfgs(conststd::string&,conststd::string&,conststd::map <std::string,std::string>&) |
simplifyKnownVariablesSimplify(Token**,Token*,unsignedint ,conststd::string&,std::string&,unsignedint,bool,constToken*const,int) | 92 | 6 | Tokenizer.simplifyKnownVariablesSimplify(Token**,Token*,unsignedint ,conststd::string&,std::string&,unsignedint,bool,constToken*const,int) |
checkScopeForVariable(constToken*,constVariable&,bool*const,bool*const ,CheckUninitVar::Alloc*const,conststd::string&) | 85 | 7 | CheckUninitVar.checkScopeForVariable(constToken*,constVariable& ,bool*const,bool*const,CheckUninitVar::Alloc*const,conststd::string&) |
checkScope(constToken*const,VarInfo*,std::set<unsignedint>) | 82 | 7 | CheckLeakAutoVar.checkScope(constToken*const,VarInfo*,std::set <unsignedint>) |
checkScope(constToken*,std::list<ExecutionPath*>&) | 81 | 10 | ExecutionPath.checkScope(constToken*,std::list<ExecutionPath*>&) |
valueFlowBeforeCondition(TokenList*,SymbolDatabase*,ErrorLogger* ,constSettings*) | 81 | 7 | __Globals.valueFlowBeforeCondition(TokenList*,SymbolDatabase* ,ErrorLogger*,constSettings*) |
simplifyVarDecl(Token*,Token*,bool) | 80 | 7 | Tokenizer.simplifyVarDecl(Token*,Token*,bool) |
checkFileUsage() | 70 | 9 | CheckIO.checkFileUsage() |
initializeVarList(constFunction&,std::list<constFunction*>& ,constScope*,std::vector<Usage>&) | 64 | 7 | CheckClass.initializeVarList(constFunction&,std::list<constFunction*>& ,constScope*,std::vector<Usage>&) |
removeComments(conststd::string&,conststd::string&) | 63 | 10 | Preprocessor.removeComments(conststd::string&,conststd::string&) |
simplifyKnownVariables() | 63 | 7 | Tokenizer.simplifyKnownVariables() |
checkScope(constToken*,conststd::vector<std::string>& ,constCheckBufferOverrun::ArrayInfo&) | 57 | 8 | CheckBufferOverrun.checkScope(constToken*,conststd::vector<std::string >&,constCheckBufferOverrun::ArrayInfo&) |
expandMacros(conststd::string&,std::string,conststd::string& ,ErrorLogger*) | 56 | 9 | Preprocessor.expandMacros(conststd::string&,std::string ,conststd::string&,ErrorLogger*) |
eraseDeadCode(Token*,constToken*) | 54 | 8 | Tokenizer.eraseDeadCode(Token*,constToken*) |
valueFlowAfterCondition(TokenList*,SymbolDatabase*,ErrorLogger* ,constSettings*) | 52 | 8 | __Globals.valueFlowAfterCondition(TokenList*,SymbolDatabase* ,ErrorLogger*,constSettings*) |
parseTokens(constTokenizer&,constchar*,constSettings*) | 52 | 6 | CheckUnusedFunctions.parseTokens(constTokenizer&,constchar* ,constSettings*) |
handleIncludes(conststd::string&,conststd::string&,conststd::list <std::string>&,std::map<std::string,std::string>&,std::set<std::string >&,std::list<std::string>) | 51 | 6 | Preprocessor.handleIncludes(conststd::string&,conststd::string& ,conststd::list<std::string>&,std::map<std::string,std::string>& ,std::set<std::string>&,std::list<std::string>) |
getcode(conststd::string&,conststd::string&,conststd::string&) | 50 | 7 | Preprocessor.getcode(conststd::string&,conststd::string& ,conststd::string&) |
simplifyCalculations(Token*) | 47 | 6 | TemplateSimplifier.simplifyCalculations(Token*) |
checkRedundantAssignment() | 46 | 9 | CheckOther.checkRedundantAssignment() |
string_c_str() | 46 | 7 | CheckStl.string_c_str() |
simplifyMathFunctions() | 46 | 6 | Tokenizer.simplifyMathFunctions() |
doAssignment(Variables&,constToken*,bool,constScope*) | 45 | 10 | __Globals.doAssignment(Variables&,constToken*,bool,constScope*) |
setTokenValue(Token*,constValueFlow::Value&) | 45 | 7 | __Globals.setTokenValue(Token*,constValueFlow::Value&) |
constructors() | 45 | 7 | CheckClass.constructors() |
simplifyTemplateInstantiations(TokenList&,ErrorLogger*,constSettings* ,constToken*,std::list<Token*>&,std::set<std::string>&) | 44 | 8 | TemplateSimplifier.simplifyTemplateInstantiations(TokenList& ,ErrorLogger*,constSettings*,constToken*,std::list<Token*>&,std::set <std::string>&) |
checkStructVariable(constVariable*const) | 44 | 7 | CheckMemoryLeakStructMember.checkStructVariable(constVariable*const) |
simplifyCondition(conststd::map<std::string,std::string>&,std::string& ,bool) | 42 | 6 | Preprocessor.simplifyCondition(conststd::map<std::string,std::string>& ,std::string&,bool) |
simplifySizeof() | 41 | 7 | Tokenizer.simplifySizeof() |
checkConstFunc(constScope*,constFunction*,bool&) | 40 | 6 | CheckClass.checkConstFunc(constScope*,constFunction*,bool&) |
duplicateTypedef(Token**,constToken*,constToken*,conststd::set <std::string>&) | 39 | 8 | Tokenizer.duplicateTypedef(Token**,constToken*,constToken* ,conststd::set<std::string>&) |
checkStructVariable() | 38 | 11 | CheckBufferOverrun.checkStructVariable() |
checkScope(constToken*,constCheckBufferOverrun::ArrayInfo&) | 38 | 9 | CheckBufferOverrun.checkScope(constToken* ,constCheckBufferOverrun::ArrayInfo&) |
useDefaultArgumentValues(conststd::list<Token*>&,std::list<Token*>*) | 37 | 7 | TemplateSimplifier.useDefaultArgumentValues(conststd::list<Token*>& ,std::list<Token*>*) |
checkIncorrectLogicOperator() | 37 | 6 | CheckCondition.checkIncorrectLogicOperator() |
code(conststd::vector<std::string>&,conststd::map<std::string ,PreprocessorMacro*>&,std::string&) | 35 | 9 | PreprocessorMacro.code(conststd::vector<std::string>&,conststd::map <std::string,PreprocessorMacro*>&,std::string&) |
createTokens(std::istream&,conststd::string&) | 35 | 8 | TokenList.createTokens(std::istream&,conststd::string&) |
findFunction(constToken*) | 35 | 8 | Scope.findFunction(constToken*) |
ArgumentInfo(constToken*,constSettings*) | 35 | 8 | CheckIO+ArgumentInfo.ArgumentInfo(constToken*,constSettings*) |
simplifyFunctionParameters() | 35 | 7 | Tokenizer.simplifyFunctionParameters() |
hasComplicatedSyntaxErrorsInTemplates(Token*) | 34 | 6 | TemplateSimplifier.hasComplicatedSyntaxErrorsInTemplates(Token*) |
addClassFunction(Scope**,constToken**,constToken*) | 33 | 9 | SymbolDatabase.addClassFunction(Scope**,constToken**,constToken*) |
virtualDestructor() | 33 | 8 | CheckClass.virtualDestructor() |
pushback() | 33 | 6 | CheckStl.pushback() |
expandTemplate(TokenList&,constToken*,conststd::string&,std::vector <constToken*>&,conststd::string&,std::vector<constToken*>&,std::list <Token*>&) | 32 | 7 | TemplateSimplifier.expandTemplate(TokenList&,constToken* ,conststd::string&,std::vector<constToken*>&,conststd::string& ,std::vector<constToken*>&,std::list<Token*>&) |
addArguments(constSymbolDatabase*,constScope*) | 31 | 8 | Function.addArguments(constSymbolDatabase*,constScope*) |
simplifyStructDecl() | 31 | 7 | Tokenizer.simplifyStructDecl() |
removeUnnecessaryQualification() | 31 | 7 | Tokenizer.removeUnnecessaryQualification() |
variable(constScope*,constToken*) | 31 | 7 | CheckMemoryLeakInClass.variable(constScope*,constToken*) |
checkUnreachableCode() | 30 | 9 | CheckOther.checkUnreachableCode() |
simplifyComma() | 30 | 7 | Tokenizer.simplifyComma() |
checkFunctionParameter(constToken&,constunsignedint ,constCheckBufferOverrun::ArrayInfo&,conststd::list<constToken*>&) | 30 | 7 | CheckBufferOverrun.checkFunctionParameter(constToken&,constunsignedint ,constCheckBufferOverrun::ArrayInfo&,conststd::list<constToken*>&) |
oppositeInnerCondition() | 30 | 6 | CheckCondition.oppositeInnerCondition() |
checkStructMemberUsage() | 30 | 6 | CheckUnusedVar.checkStructMemberUsage() |
checkConst() | 29 | 7 | CheckClass.checkConst() |
parseFunctionCall(constToken&,std::list<constToken*>&,constLibrary* ,unsignedchar) | 29 | 7 | CheckNullPointer.parseFunctionCall(constToken&,std::list<constToken*>& ,constLibrary*,unsignedchar) |
pointerassignment() | 29 | 6 | Check64BitPortability.pointerassignment() |
checkMemset() | 28 | 7 | CheckClass.checkMemset() |
nullConstantDereference() | 28 | 7 | CheckNullPointer.nullConstantDereference() |
autoVariables() | 28 | 6 | CheckAutoVariables.autoVariables() |
analyseFunctions(constToken*const,std::set<std::string>&) | 27 | 8 | UninitVar.analyseFunctions(constToken*const,std::set<std::string>&) |
clarifyCondition() | 27 | 6 | CheckCondition.clarifyCondition() |
simplifyCompoundAssignment() | 26 | 8 | Tokenizer.simplifyCompoundAssignment() |
copyconstructors() | 26 | 8 | CheckClass.copyconstructors() |
checkScope(constScope*) | 26 | 7 | CheckUninitVar.checkScope(constScope*) |
checkLoopBody(constToken*,constVariable&,constCheckUninitVar::Alloc ,conststd::string&,constbool) | 26 | 7 | CheckUninitVar.checkLoopBody(constToken*,constVariable& ,constCheckUninitVar::Alloc,conststd::string&,constbool) |
simplifyFlowControl() | 26 | 6 | Tokenizer.simplifyFlowControl() |
checkVariableScope() | 26 | 6 | CheckOther.checkVariableScope() |
checkMathFunctions() | 26 | 6 | CheckOther.checkMathFunctions() |
checkDuplicateExpression() | 25 | 9 | CheckOther.checkDuplicateExpression() |
checkAutoPointer() | 25 | 8 | CheckStl.checkAutoPointer() |
processFile(conststd::string&,std::istream&) | 25 | 6 | CppCheck.processFile(conststd::string&,std::istream&) |
simplifyIfAndWhileAssign() | 24 | 7 | Tokenizer.simplifyIfAndWhileAssign() |
valueFlowCheckArrayIndex(constToken*const ,constCheckBufferOverrun::ArrayInfo&) | 24 | 7 | CheckBufferOverrun.valueFlowCheckArrayIndex(constToken*const ,constCheckBufferOverrun::ArrayInfo&) |
assertWithSideEffects() | 23 | 8 | CheckAssert.assertWithSideEffects() |
checkMinSizes(conststd::list<Library::ArgumentChecks::MinSize>& ,constToken*const,conststd::size_t,constToken**,constSettings*const) | 23 | 6 | __Globals.checkMinSizes(conststd::list <Library::ArgumentChecks::MinSize>&,constToken*const,conststd::size_t ,constToken**,constSettings*const) |
stlOutOfBounds() | 23 | 6 | CheckStl.stlOutOfBounds() |
handleIncludes(std::string&,conststd::string&,conststd::list <std::string>&) | 23 | 6 | Preprocessor.handleIncludes(std::string&,conststd::string& ,conststd::list<std::string>&) |
checkSignConversion() | 22 | 7 | CheckType.checkSignConversion() |
isFunctionParameterPassedByValue(constToken*) | 22 | 6 | Tokenizer.isFunctionParameterPassedByValue(constToken*) |
duplicateDefinition(Token**,constToken*) | 22 | 6 | Tokenizer.duplicateDefinition(Token**,constToken*) |
if_find() | 22 | 6 | CheckStl.if_find() |
simplifyLabelsCaseDefault() | 21 | 6 | Tokenizer.simplifyLabelsCaseDefault() |
simplifyConstTernaryOp() | 21 | 6 | Tokenizer.simplifyConstTernaryOp() |
use(std::list<ExecutionPath*>&,constToken*,constint) | 21 | 6 | UninitVar.use(std::list<ExecutionPath*>&,constToken*,constint) |
preprocessCleanupDirectives(conststd::string&) | 21 | 6 | Preprocessor.preprocessCleanupDirectives(conststd::string&) |
Statistics
Stat | Cyclomatic Complexity (CC) | NestingDepth |
---|---|---|
Sum: | 5 451 | 736 |
Average: | 55.06 | 7.43 |
Minimum: | 21 | 6 |
Maximum: | 349 | 19 |
Standard deviation: | 51.69 | 1.83 |
Variance: | 2 671 | 3.34 |
Critical Rule warning: Methods with too many parameters - critical |
• How to Fix Violations: More properties/fields can be added to the declaring type to handle numerous states. An alternative is to provide a class or a structure dedicated to handle arguments passing.
2 methods matched
methods | # Parameters | Full Name |
---|---|---|
valueFlowForward(Token*const,constToken*const,constVariable*const ,constunsignedint,std::list<ValueFlow::Value>,constbool ,TokenList*const,ErrorLogger*const,constSettings*const) | 9 | __Globals.valueFlowForward(Token*const,constToken*const ,constVariable*const,constunsignedint,std::list<ValueFlow::Value> ,constbool,TokenList*const,ErrorLogger*const,constSettings*const) |
simplifyKnownVariablesSimplify(Token**,Token*,unsignedint ,conststd::string&,std::string&,unsignedint,bool,constToken*const,int) | 9 | Tokenizer.simplifyKnownVariablesSimplify(Token**,Token*,unsignedint ,conststd::string&,std::string&,unsignedint,bool,constToken*const,int) |
Statistics
Stat | # Parameters |
---|---|
Sum: | 18 |
Average: | 9 |
Minimum: | 9 |
Maximum: | 9 |
Standard deviation: | 0 |
Variance: | 0 |
Rule warning: Quick summary of methods to refactor |
• How to Fix Violations: To refactor such method and increase code quality and maintainability, certainly you'll have to split the method into several smaller methods or even create one or several classes to implement the logic. During this process it is important to question the scope of each variable local to the method. This can be an indication if such local variable will become an instance field of the newly created class(es). Large switch…case structures might be refactored through the help of a set of types that implement a common interface, the interface polymorphism playing the role of the switch cases tests. Unit Tests can help: write tests for each method before extracting it to ensure you don't break functionality.
520 methods matched
methods | # lines of code (LOC) | MaxNestedLoop | Cyclomatic Complexity (CC) | NestingDepth | # Parameters | # Variables | # Overloads | Full Name |
---|---|---|---|---|---|---|---|---|
checkMinSizes(conststd::list<Library::ArgumentChecks::MinSize>& ,constToken*const,conststd::size_t,constToken**,constSettings*const) | 55 | 2 | 23 | 6 | 5 | 11 | 1 | __Globals.checkMinSizes(conststd::list <Library::ArgumentChecks::MinSize>&,constToken*const,conststd::size_t ,constToken**,constSettings*const) |
isSameExpression(constToken*,constToken*,conststd::set<std::string>&) | 55 | 1 | 23 | 3 | 3 | 9 | 1 | __Globals.isSameExpression(constToken*,constToken*,conststd::set <std::string>&) |
astGetSizeSign(constSettings*,constToken*,unsignedint*,char*) | 53 | 1 | 24 | 4 | 4 | 5 | 1 | __Globals.astGetSizeSign(constSettings*,constToken*,unsignedint*,char* ) |
doAssignment(Variables&,constToken*,bool,constScope*) | 115 | 1 | 45 | 10 | 4 | 11 | 1 | __Globals.doAssignment(Variables&,constToken*,bool,constScope*) |
getparams(conststd::string&,std::string::size_type&,std::vector <std::string>&,unsignedint&,bool&) | 37 | 1 | 18 | 4 | 5 | 3 | 1 | __Globals.getparams(conststd::string&,std::string::size_type& ,std::vector<std::string>&,unsignedint&,bool&) |
getlines(std::istream&,std::string&) | 36 | 2 | 16 | 5 | 2 | 3 | 1 | __Globals.getlines(std::istream&,std::string&) |
multiComparePercent(constToken*,constchar*&,bool,unsignedint) | 89 | 0 | 37 | 5 | 4 | 0 | 1 | __Globals.multiComparePercent(constToken*,constchar*&,bool,unsignedint ) |
splitDefinitionFromTypedef(Token*) | 49 | 1 | 11 | 4 | 1 | 5 | 1 | __Globals.splitDefinitionFromTypedef(Token*) |
processFunc(Token*,bool) | 33 | 1 | 17 | 5 | 2 | 0 | 1 | __Globals.processFunc(Token*,bool) |
setVarIdParseDeclaration(constToken**,conststd::map<std::string ,unsignedint>&,bool,bool,bool) | 55 | 1 | 23 | 4 | 5 | 7 | 1 | __Globals.setVarIdParseDeclaration(constToken**,conststd::map <std::string,unsignedint>&,bool,bool,bool) |
setVarIdClassDeclaration(Token*const,conststd::map<std::string ,unsignedint>&,constunsignedint,std::map<unsignedint,std::map <std::string,unsignedint>>*,unsignedint*) | 42 | 1 | 22 | 5 | 5 | 9 | 1 | __Globals.setVarIdClassDeclaration(Token*const,conststd::map <std::string,unsignedint>&,constunsignedint,std::map<unsignedint ,std::map<std::string,unsignedint>>*,unsignedint*) |
setVarIdClassFunction(conststd::string&,Token*const,constToken*const ,conststd::map<std::string,unsignedint>&,std::map<unsignedint,std::map <std::string,unsignedint>>*,unsignedint*) | 13 | 1 | 11 | 3 | 6 | 2 | 1 | __Globals.setVarIdClassFunction(conststd::string&,Token*const ,constToken*const,conststd::map<std::string,unsignedint>&,std::map <unsignedint,std::map<std::string,unsignedint>>*,unsignedint*) |
linkBrackets(Tokenizer*,std::stack<constToken*>&,std::stack<Token*>& ,Token*,char,char) | 11 | 0 | 5 | 3 | 6 | 0 | 1 | __Globals.linkBrackets(Tokenizer*,std::stack<constToken*>&,std::stack <Token*>&,Token*,char,char) |
compileTerm(Token*&,AST_state&) | 34 | 1 | 14 | 4 | 2 | 0 | 1 | __Globals.compileTerm(Token*&,AST_state&) |
compilePrecedence2(Token*&,AST_state&) | 46 | 1 | 12 | 4 | 2 | 8 | 1 | __Globals.compilePrecedence2(Token*&,AST_state&) |
compilePrecedence3(Token*&,AST_state&) | 59 | 2 | 23 | 5 | 2 | 5 | 1 | __Globals.compilePrecedence3(Token*&,AST_state&) |
createAstAtToken(Token*,bool) | 69 | 2 | 28 | 4 | 2 | 13 | 1 | __Globals.createAstAtToken(Token*,bool) |
execute(constToken*,std::map<unsignedint,MathLib::bigint>*const ,MathLib::bigint*,bool*) | 105 | 0 | 40 | 4 | 4 | 11 | 1 | __Globals.execute(constToken*,std::map<unsignedint,MathLib::bigint >*const,MathLib::bigint*,bool*) |
bailoutFunctionPar(constToken*,constValueFlow::Value&,constSettings* ,bool*) | 32 | 1 | 15 | 3 | 4 | 3 | 1 | __Globals.bailoutFunctionPar(constToken*,constValueFlow::Value& ,constSettings*,bool*) |
setTokenValue(Token*,constValueFlow::Value&) | 90 | 3 | 45 | 7 | 2 | 12 | 1 | __Globals.setTokenValue(Token*,constValueFlow::Value&) |
valueFlowBeforeCondition(TokenList*,SymbolDatabase*,ErrorLogger* ,constSettings*) | 155 | 4 | 81 | 7 | 4 | 23 | 1 | __Globals.valueFlowBeforeCondition(TokenList*,SymbolDatabase* ,ErrorLogger*,constSettings*) |
valueFlowForward(Token*const,constToken*const,constVariable*const ,constunsignedint,std::list<ValueFlow::Value>,constbool ,TokenList*const,ErrorLogger*const,constSettings*const) | 206 | 3 | 98 | 7 | 9 | 39 | 1 | __Globals.valueFlowForward(Token*const,constToken*const ,constVariable*const,constunsignedint,std::list<ValueFlow::Value> ,constbool,TokenList*const,ErrorLogger*const,constSettings*const) |
valueFlowAfterAssign(TokenList*,SymbolDatabase*,ErrorLogger* ,constSettings*) | 18 | 2 | 11 | 3 | 4 | 9 | 1 | __Globals.valueFlowAfterAssign(TokenList*,SymbolDatabase*,ErrorLogger* ,constSettings*) |
valueFlowAfterCondition(TokenList*,SymbolDatabase*,ErrorLogger* ,constSettings*) | 102 | 4 | 52 | 8 | 4 | 23 | 1 | __Globals.valueFlowAfterCondition(TokenList*,SymbolDatabase* ,ErrorLogger*,constSettings*) |
valueFlowForLoop1(constToken*,unsignedint*const,MathLib::bigint*const ,MathLib::bigint*const,MathLib::bigint*const) | 33 | 1 | 16 | 2 | 5 | 3 | 1 | __Globals.valueFlowForLoop1(constToken*,unsignedint*const ,MathLib::bigint*const,MathLib::bigint*const,MathLib::bigint*const) |
valueFlowForLoop2(constToken*,std::map<unsignedint,MathLib::bigint>* ,std::map<unsignedint,MathLib::bigint>*,std::map<unsignedint ,MathLib::bigint>*) | 35 | 1 | 10 | 3 | 4 | 11 | 1 | __Globals.valueFlowForLoop2(constToken*,std::map<unsignedint ,MathLib::bigint>*,std::map<unsignedint,MathLib::bigint>*,std::map <unsignedint,MathLib::bigint>*) |
valueFlowForLoopSimplify(Token*const,constunsignedint ,constMathLib::bigint,TokenList*,ErrorLogger*,constSettings*) | 48 | 2 | 24 | 5 | 6 | 7 | 1 | __Globals.valueFlowForLoopSimplify(Token*const,constunsignedint ,constMathLib::bigint,TokenList*,ErrorLogger*,constSettings*) |
valueFlowForLoopSimplifyAfter(Token*,unsignedint,constMathLib::bigint ,TokenList*,ErrorLogger*,constSettings*) | 16 | 1 | 5 | 3 | 6 | 5 | 1 | __Globals.valueFlowForLoopSimplifyAfter(Token*,unsignedint ,constMathLib::bigint,TokenList*,ErrorLogger*,constSettings*) |
valueFlowForLoop(TokenList*,SymbolDatabase*,ErrorLogger* ,constSettings*) | 26 | 2 | 12 | 4 | 4 | 11 | 1 | __Globals.valueFlowForLoop(TokenList*,SymbolDatabase*,ErrorLogger* ,constSettings*) |
valueFlowInjectParameter(TokenList*,ErrorLogger*,constSettings* ,constVariable*,constScope*,conststd::list<ValueFlow::Value>&) | 6 | 0 | 3 | 1 | 6 | 1 | 1 | __Globals.valueFlowInjectParameter(TokenList*,ErrorLogger* ,constSettings*,constVariable*,constScope*,conststd::list <ValueFlow::Value>&) |
valueFlowFunctionReturn(TokenList*,ErrorLogger*,constSettings*) | 38 | 2 | 19 | 4 | 3 | 10 | 1 | __Globals.valueFlowFunctionReturn(TokenList*,ErrorLogger* ,constSettings*) |
toLongNumber(conststd::string&) | 37 | 1 | 12 | 3 | 1 | 11 | 1 | MathLib.toLongNumber(conststd::string&) |
toULongNumber(conststd::string&) | 33 | 1 | 10 | 3 | 1 | 11 | 1 | MathLib.toULongNumber(conststd::string&) |
isFloat(conststd::string&) | 90 | 1 | 39 | 3 | 1 | 3 | 1 | MathLib.isFloat(conststd::string&) |
isHex(conststd::string&) | 36 | 1 | 13 | 3 | 1 | 3 | 1 | MathLib.isHex(conststd::string&) |
isBin(conststd::string&) | 36 | 1 | 13 | 3 | 1 | 3 | 1 | MathLib.isBin(conststd::string&) |
isValidSuffix(std::string::const_iterator,std::string::const_iterator) | 55 | 1 | 21 | 3 | 2 | 2 | 1 | MathLib.isValidSuffix(std::string::const_iterator ,std::string::const_iterator) |
swapWithNext() | 35 | 0 | 2 | 2 | 0 | 1 | 1 | Token.swapWithNext() |
Match(constToken*,constchar*,unsignedint) | 51 | 2 | 24 | 5 | 3 | 5 | 1 | Token.Match(constToken*,constchar*,unsignedint) |
multiCompare(constToken*,constchar*,unsignedint) | 34 | 1 | 15 | 4 | 3 | 4 | 1 | Token.multiCompare(constToken*,constchar*,unsignedint) |
stringifyList(bool,bool,bool,bool,bool,conststd::vector<std::string>* ,constToken*) | 40 | 2 | 15 | 6 | 7 | 6 | 3 | Token.stringifyList(bool,bool,bool,bool,bool,conststd::vector <std::string>*,constToken*) |
deleteThis() | 41 | 0 | 7 | 3 | 0 | 1 | 1 | Token.deleteThis() |
update_property_info() | 35 | 0 | 17 | 3 | 0 | 0 | 1 | Token.update_property_info() |
printValueFlow(bool,std::ostream&) | 38 | 2 | 16 | 4 | 2 | 3 | 1 | Token.printValueFlow(bool,std::ostream&) |
match(conststd::string&,conststd::string&) | 31 | 3 | 12 | 5 | 2 | 4 | 1 | Suppressions+FileMatcher.match(conststd::string&,conststd::string&) |
ErrorMessage(conststd::list<constToken*>&,constTokenList* ,Severity::SeverityType,conststd::string&,conststd::string&,bool) | 11 | 1 | 5 | 2 | 6 | 1 | 5 | ErrorLogger+ErrorMessage.ErrorMessage(conststd::list<constToken*>& ,constTokenList*,Severity::SeverityType,conststd::string& ,conststd::string&,bool) |
toXML(bool,int) | 32 | 1 | 10 | 3 | 2 | 3 | 1 | ErrorLogger+ErrorMessage.toXML(bool,int) |
deserialize(conststd::string&) | 47 | 2 | 13 | 3 | 1 | 13 | 1 | ErrorLogger+ErrorMessage.deserialize(conststd::string&) |
addtoken(conststd::string&,constunsignedint,constunsignedint,bool) | 31 | 1 | 9 | 3 | 4 | 4 | 2 | TokenList.addtoken(conststd::string&,constunsignedint,constunsignedint ,bool) |
createTokens(std::istream&,conststd::string&) | 106 | 2 | 35 | 8 | 2 | 15 | 1 | TokenList.createTokens(std::istream&,conststd::string&) |
setVarId() | 197 | 3 | 96 | 9 | 0 | 36 | 1 | Tokenizer.setVarId() |
simplifyTokenList1(constchar*) | 190 | 2 | 53 | 5 | 1 | 16 | 1 | Tokenizer.simplifyTokenList1(constchar*) |
simplifyTokenList2() | 122 | 2 | 34 | 5 | 0 | 15 | 1 | Tokenizer.simplifyTokenList2() |
eraseDeadCode(Token*,constToken*) | 144 | 2 | 54 | 8 | 2 | 20 | 1 | Tokenizer.eraseDeadCode(Token*,constToken*) |
simplifyMulAndParens() | 43 | 3 | 18 | 7 | 0 | 5 | 1 | Tokenizer.simplifyMulAndParens() |
isFunctionParameterPassedByValue(constToken*) | 47 | 2 | 22 | 6 | 1 | 8 | 1 | Tokenizer.isFunctionParameterPassedByValue(constToken*) |
arraySize() | 37 | 2 | 14 | 7 | 0 | 7 | 1 | Tokenizer.arraySize() |
simplifyLabelsCaseDefault() | 43 | 2 | 21 | 6 | 0 | 5 | 1 | Tokenizer.simplifyLabelsCaseDefault() |
removeMacrosInGlobalScope() | 37 | 2 | 19 | 5 | 0 | 7 | 1 | Tokenizer.removeMacrosInGlobalScope() |
removeRedundantAssignment() | 32 | 3 | 15 | 6 | 0 | 6 | 1 | Tokenizer.removeRedundantAssignment() |
simplifySizeof() | 102 | 2 | 41 | 7 | 0 | 17 | 1 | Tokenizer.simplifySizeof() |
simplifyVarDecl(Token*,Token*,bool) | 179 | 3 | 80 | 7 | 3 | 16 | 2 | Tokenizer.simplifyVarDecl(Token*,Token*,bool) |
simplifyPlatformTypes() | 92 | 1 | 34 | 5 | 0 | 9 | 1 | Tokenizer.simplifyPlatformTypes() |
simplifyStdType() | 63 | 1 | 25 | 5 | 0 | 3 | 1 | Tokenizer.simplifyStdType() |
simplifyConstTernaryOp() | 44 | 2 | 21 | 6 | 0 | 7 | 1 | Tokenizer.simplifyConstTernaryOp() |
simplifyCompoundAssignment() | 60 | 2 | 26 | 8 | 0 | 8 | 1 | Tokenizer.simplifyCompoundAssignment() |
simplifyIfAndWhileAssign() | 64 | 2 | 24 | 7 | 0 | 11 | 1 | Tokenizer.simplifyIfAndWhileAssign() |
simplifyIfNot() | 37 | 2 | 12 | 4 | 0 | 2 | 1 | Tokenizer.simplifyIfNot() |
simplifyIfNotNull() | 31 | 1 | 14 | 5 | 0 | 3 | 1 | Tokenizer.simplifyIfNotNull() |
simplifyComma() | 57 | 2 | 30 | 7 | 0 | 10 | 1 | Tokenizer.simplifyComma() |
simplifyAddBracesToCommand(Token*) | 34 | 0 | 15 | 5 | 1 | 4 | 1 | Tokenizer.simplifyAddBracesToCommand(Token*) |
simplifyAddBracesPair(Token*,bool) | 47 | 1 | 14 | 6 | 2 | 10 | 1 | Tokenizer.simplifyAddBracesPair(Token*,bool) |
simplifyTypedef() | 643 | 4 | 197 | 10 | 0 | 79 | 1 | Tokenizer.simplifyTypedef() |
simplifyCasts() | 43 | 2 | 20 | 4 | 0 | 5 | 1 | Tokenizer.simplifyCasts() |
simplifyKnownVariables() | 131 | 3 | 63 | 7 | 0 | 38 | 1 | Tokenizer.simplifyKnownVariables() |
simplifyKnownVariablesGetData(unsignedint,Token**,Token**,std::string& ,unsignedint&,bool&,bool) | 41 | 1 | 14 | 4 | 7 | 6 | 1 | Tokenizer.simplifyKnownVariablesGetData(unsignedint,Token**,Token** ,std::string&,unsignedint&,bool&,bool) |
simplifyKnownVariablesSimplify(Token**,Token*,unsignedint ,conststd::string&,std::string&,unsignedint,bool,constToken*const,int) | 233 | 2 | 92 | 6 | 9 | 23 | 1 | Tokenizer.simplifyKnownVariablesSimplify(Token**,Token*,unsignedint ,conststd::string&,std::string&,unsignedint,bool,constToken*const,int) |
simplifyFlowControl() | 44 | 3 | 26 | 6 | 0 | 6 | 1 | Tokenizer.simplifyFlowControl() |
simplifyConditions() | 95 | 2 | 35 | 5 | 0 | 12 | 1 | Tokenizer.simplifyConditions() |
removeRedundantConditions() | 31 | 1 | 9 | 4 | 0 | 5 | 1 | Tokenizer.removeRedundantConditions() |
removeRedundantFor() | 49 | 2 | 18 | 6 | 0 | 14 | 1 | Tokenizer.removeRedundantFor() |
simplifyStructDecl() | 87 | 2 | 31 | 7 | 0 | 13 | 1 | Tokenizer.simplifyStructDecl() |
simplifyRedundantParentheses() | 88 | 3 | 31 | 5 | 0 | 5 | 1 | Tokenizer.simplifyRedundantParentheses() |
simplifyReference() | 18 | 3 | 11 | 7 | 0 | 6 | 1 | Tokenizer.simplifyReference() |
simplifyFunctionParameters() | 94 | 3 | 35 | 7 | 0 | 12 | 1 | Tokenizer.simplifyFunctionParameters() |
simplifyDoublePlusAndDoubleMinus() | 33 | 2 | 17 | 6 | 0 | 1 | 1 | Tokenizer.simplifyDoublePlusAndDoubleMinus() |
simplifyMathFunctions() | 158 | 2 | 46 | 6 | 0 | 42 | 1 | Tokenizer.simplifyMathFunctions() |
simplifyMathExpressions() | 70 | 1 | 43 | 5 | 0 | 21 | 1 | Tokenizer.simplifyMathExpressions() |
simplifyEnum() | 322 | 4 | 111 | 11 | 0 | 57 | 1 | Tokenizer.simplifyEnum() |
simplifyFunctionPointers() | 49 | 2 | 29 | 3 | 0 | 4 | 1 | Tokenizer.simplifyFunctionPointers() |
createLinks2() | 34 | 2 | 20 | 4 | 0 | 4 | 1 | Tokenizer.createLinks2() |
simplifyAttribute() | 56 | 3 | 27 | 5 | 0 | 6 | 1 | Tokenizer.simplifyAttribute() |
simplifyKeyword() | 39 | 2 | 22 | 4 | 0 | 6 | 1 | Tokenizer.simplifyKeyword() |
simplifyAsm() | 37 | 2 | 13 | 4 | 0 | 6 | 1 | Tokenizer.simplifyAsm() |
simplifyBuiltinExpect() | 15 | 2 | 8 | 6 | 0 | 3 | 1 | Tokenizer.simplifyBuiltinExpect() |
removeUnnecessaryQualification() | 61 | 2 | 31 | 7 | 0 | 10 | 1 | Tokenizer.removeUnnecessaryQualification() |
simplifyNamespaceStd() | 30 | 1 | 11 | 3 | 0 | 10 | 1 | Tokenizer.simplifyNamespaceStd() |
simplifyMicrosoftStringFunctions() | 111 | 2 | 70 | 5 | 0 | 2 | 1 | Tokenizer.simplifyMicrosoftStringFunctions() |
simplifyBorland() | 28 | 3 | 15 | 6 | 0 | 4 | 1 | Tokenizer.simplifyBorland() |
simplifyQtSignalsSlots() | 33 | 2 | 16 | 4 | 0 | 3 | 1 | Tokenizer.simplifyQtSignalsSlots() |
Statistics
Stat | # lines of code (LOC) | MaxNestedLoop | Cyclomatic Complexity (CC) | NestingDepth | # Parameters | # Variables | # Overloads |
---|---|---|---|---|---|---|---|
Sum: | 32 009 | 631 | 12 121 | 2 518 | 586 | 4 988 | 558 |
Average: | 61.56 | 1.21 | 23.31 | 4.84 | 1.13 | 9.59 | 1.07 |
Minimum: | 1 | 0 | 1 | 1 | 0 | 0 | 1 |
Maximum: | 698 | 6 | 375 | 31 | 9 | 108 | 5 |
Standard deviation: | 71.73 | 1.25 | 38.25 | 3.71 | 1.85 | 11.88 | 0.4 |
Variance: | 5 145 | 1.56 | 1 463 | 13.78 | 3.41 | 141.2 | 0.16 |
Rule warning: Methods too big |
• How to Fix Violations: Usually too big methods should be split in smaller methods. But long methods with no branch conditions, that typically initialize some data, are not necessarily a problem to maintain nor to test, and might not need refactoring.
396 methods matched
methods | # lines of code (LOC) | Full Name |
---|---|---|
SymbolDatabase(constTokenizer*,constSettings*,ErrorLogger*) | 698 | SymbolDatabase.SymbolDatabase(constTokenizer*,constSettings* ,ErrorLogger*) |
checkWrongPrintfScanfArguments() | 691 | CheckIO.checkWrongPrintfScanfArguments() |
simplifyTypedef() | 643 | Tokenizer.simplifyTypedef() |
getcode(constToken*,std::list<constToken*>,constunsignedint ,CheckMemoryLeak::AllocType&,CheckMemoryLeak::AllocType&,bool ,unsignedint) | 410 | CheckMemoryLeakInFunction.getcode(constToken*,std::list<constToken*> ,constunsignedint,CheckMemoryLeak::AllocType& ,CheckMemoryLeak::AllocType&,bool,unsignedint) |
ParseFromArgs(int,constchar*const*) | 387 | CmdLineParser.ParseFromArgs(int,constchar*const*) |
ParseFromArgs(int,constchar*const*) | 387 | CmdLineParser.ParseFromArgs(int,constchar*const*) |
load(consttinyxml2::XMLDocument&) | 377 | Library.load(consttinyxml2::XMLDocument&) |
run() | 375 | TestTokenizer.run() |
simplifycode(Token*) | 328 | CheckMemoryLeakInFunction.simplifycode(Token*) |
simplifyEnum() | 322 | Tokenizer.simplifyEnum() |
parse(constToken&,std::list<ExecutionPath*>&) | 264 | UninitVar.parse(constToken&,std::list<ExecutionPath*>&) |
checkFunctionVariableUsage_iterateScopes(constScope*const,Variables& ,bool) | 263 | CheckUnusedVar.checkFunctionVariableUsage_iterateScopes (constScope*const,Variables&,bool) |
getcfgs(conststd::string&,conststd::string&,conststd::map<std::string ,std::string>&) | 247 | Preprocessor.getcfgs(conststd::string&,conststd::string&,conststd::map <std::string,std::string>&) |
simplifyKnownVariablesSimplify(Token**,Token*,unsignedint ,conststd::string&,std::string&,unsignedint,bool,constToken*const,int) | 233 | Tokenizer.simplifyKnownVariablesSimplify(Token**,Token*,unsignedint ,conststd::string&,std::string&,unsignedint,bool,constToken*const,int) |
valueFlowForward(Token*const,constToken*const,constVariable*const ,constunsignedint,std::list<ValueFlow::Value>,constbool ,TokenList*const,ErrorLogger*const,constSettings*const) | 206 | __Globals.valueFlowForward(Token*const,constToken*const ,constVariable*const,constunsignedint,std::list<ValueFlow::Value> ,constbool,TokenList*const,ErrorLogger*const,constSettings*const) |
setVarId() | 197 | Tokenizer.setVarId() |
simplifyTokenList1(constchar*) | 190 | Tokenizer.simplifyTokenList1(constchar*) |
checkScopeForVariable(constToken*,constVariable&,bool*const,bool*const ,CheckUninitVar::Alloc*const,conststd::string&) | 188 | CheckUninitVar.checkScopeForVariable(constToken*,constVariable& ,bool*const,bool*const,CheckUninitVar::Alloc*const,conststd::string&) |
testScanfArgument() | 185 | TestIO.testScanfArgument() |
removeComments(conststd::string&,conststd::string&) | 184 | Preprocessor.removeComments(conststd::string&,conststd::string&) |
run() | 181 | TestPreprocessor.run() |
simplifyVarDecl(Token*,Token*,bool) | 179 | Tokenizer.simplifyVarDecl(Token*,Token*,bool) |
checkScope(constToken*const,VarInfo*,std::set<unsignedint>) | 179 | CheckLeakAutoVar.checkScope(constToken*const,VarInfo*,std::set <unsignedint>) |
checkFileUsage() | 177 | CheckIO.checkFileUsage() |
checkScope(constToken*,std::list<ExecutionPath*>&) | 177 | ExecutionPath.checkScope(constToken*,std::list<ExecutionPath*>&) |
run() | 171 | TestSimplifyTokens.run() |
simplifyMathFunctions() | 158 | Tokenizer.simplifyMathFunctions() |
testPrintfArgument() | 158 | TestIO.testPrintfArgument() |
run() | 158 | TestMemleakInFunction.run() |
expandMacros(conststd::string&,std::string,conststd::string& ,ErrorLogger*) | 156 | Preprocessor.expandMacros(conststd::string&,std::string ,conststd::string&,ErrorLogger*) |
valueFlowBeforeCondition(TokenList*,SymbolDatabase*,ErrorLogger* ,constSettings*) | 155 | __Globals.valueFlowBeforeCondition(TokenList*,SymbolDatabase* ,ErrorLogger*,constSettings*) |
eraseDeadCode(Token*,constToken*) | 144 | Tokenizer.eraseDeadCode(Token*,constToken*) |
run() | 144 | TestSymbolDatabase.run() |
uninitvar1() | 144 | TestUninitVar.uninitvar1() |
initializeVarList(constFunction&,std::list<constFunction*>& ,constScope*,std::vector<Usage>&) | 143 | CheckClass.initializeVarList(constFunction&,std::list<constFunction*>& ,constScope*,std::vector<Usage>&) |
run() | 137 | TestBufferOverrun.run() |
run() | 137 | TestClass.run() |
simplifyKnownVariables() | 131 | Tokenizer.simplifyKnownVariables() |
handleIncludes(conststd::string&,conststd::string&,conststd::list <std::string>&,std::map<std::string,std::string>&,std::set<std::string >&,std::list<std::string>) | 131 | Preprocessor.handleIncludes(conststd::string&,conststd::string& ,conststd::list<std::string>&,std::map<std::string,std::string>& ,std::set<std::string>&,std::list<std::string>) |
uninitvar2() | 131 | TestUninitVar.uninitvar2() |
printOut(constchar*) | 129 | SymbolDatabase.printOut(constchar*) |
createLinks() | 128 | TestTokenizer.createLinks() |
getcode(conststd::string&,conststd::string&,conststd::string&) | 127 | Preprocessor.getcode(conststd::string&,conststd::string& ,conststd::string&) |
run() | 127 | TestVarID.run() |
isVariableUsage(constToken*,bool,CheckUninitVar::Alloc) | 125 | CheckUninitVar.isVariableUsage(constToken*,bool,CheckUninitVar::Alloc) |
isNullValue() | 125 | TestMathLib.isNullValue() |
testgetcode() | 124 | TestMemleakInFunction.testgetcode() |
simplifyTokenList2() | 122 | Tokenizer.simplifyTokenList2() |
run() | 121 | TestSimplifyTypedef.run() |
run() | 119 | TestConstructors.run() |
run() | 119 | TestUnusedVar.run() |
checkRedundantAssignment() | 118 | CheckOther.checkRedundantAssignment() |
checkScope(constToken*,conststd::vector<std::string>& ,constCheckBufferOverrun::ArrayInfo&) | 116 | CheckBufferOverrun.checkScope(constToken*,conststd::vector<std::string >&,constCheckBufferOverrun::ArrayInfo&) |
doAssignment(Variables&,constToken*,bool,constScope*) | 115 | __Globals.doAssignment(Variables&,constToken*,bool,constScope*) |
simplifyCalculations(Token*) | 113 | TemplateSimplifier.simplifyCalculations(Token*) |
simplifyMicrosoftStringFunctions() | 111 | Tokenizer.simplifyMicrosoftStringFunctions() |
parseTokens(constTokenizer&,constchar*,constSettings*) | 111 | CheckUnusedFunctions.parseTokens(constTokenizer&,constchar* ,constSettings*) |
createTokens(std::istream&,conststd::string&) | 106 | TokenList.createTokens(std::istream&,conststd::string&) |
localvaralias1() | 106 | TestUnusedVar.localvaralias1() |
execute(constToken*,std::map<unsignedint,MathLib::bigint>*const ,MathLib::bigint*,bool*) | 105 | __Globals.execute(constToken*,std::map<unsignedint,MathLib::bigint >*const,MathLib::bigint*,bool*) |
simplifyTemplateInstantiations(TokenList&,ErrorLogger*,constSettings* ,constToken*,std::list<Token*>&,std::set<std::string>&) | 104 | TemplateSimplifier.simplifyTemplateInstantiations(TokenList& ,ErrorLogger*,constSettings*,constToken*,std::list<Token*>&,std::set <std::string>&) |
call_func(constToken*,std::list<constToken*>,constunsignedint ,CheckMemoryLeak::AllocType&,CheckMemoryLeak::AllocType&,bool& ,unsignedint) | 103 | CheckMemoryLeakInFunction.call_func(constToken*,std::list<constToken*> ,constunsignedint,CheckMemoryLeak::AllocType& ,CheckMemoryLeak::AllocType&,bool&,unsignedint) |
run() | 103 | TestOther.run() |
valueFlowAfterCondition(TokenList*,SymbolDatabase*,ErrorLogger* ,constSettings*) | 102 | __Globals.valueFlowAfterCondition(TokenList*,SymbolDatabase* ,ErrorLogger*,constSettings*) |
simplifySizeof() | 102 | Tokenizer.simplifySizeof() |
localvar1() | 100 | TestUnusedVar.localvar1() |
ArgumentInfo(constToken*,constSettings*) | 99 | CheckIO+ArgumentInfo.ArgumentInfo(constToken*,constSettings*) |
pointerCheckAndDeRef() | 99 | TestNullPointer.pointerCheckAndDeRef() |
isfloat() | 97 | TestMathLib.isfloat() |
simplifyConditions() | 95 | Tokenizer.simplifyConditions() |
string_c_str() | 95 | CheckStl.string_c_str() |
simplifyFunctionParameters() | 94 | Tokenizer.simplifyFunctionParameters() |
addClassFunction(Scope**,constToken**,constToken*) | 94 | SymbolDatabase.addClassFunction(Scope**,constToken**,constToken*) |
checkStructVariable(constVariable*const) | 93 | CheckMemoryLeakStructMember.checkStructVariable(constVariable*const) |
valueFlowAfterAssign() | 93 | TestValueFlow.valueFlowAfterAssign() |
simplifyPlatformTypes() | 92 | Tokenizer.simplifyPlatformTypes() |
checkIncorrectLogicOperator() | 91 | CheckCondition.checkIncorrectLogicOperator() |
setTokenValue(Token*,constValueFlow::Value&) | 90 | __Globals.setTokenValue(Token*,constValueFlow::Value&) |
isFloat(conststd::string&) | 90 | MathLib.isFloat(conststd::string&) |
run() | 90 | TestCmdlineParser.run() |
simplifyInitVar() | 90 | TestTokenizer.simplifyInitVar() |
multiComparePercent(constToken*,constchar*&,bool,unsignedint) | 89 | __Globals.multiComparePercent(constToken*,constchar*&,bool,unsignedint ) |
duplicateTypedef(Token**,constToken*,constToken*,conststd::set <std::string>&) | 89 | Tokenizer.duplicateTypedef(Token**,constToken*,constToken* ,conststd::set<std::string>&) |
simplifyRedundantParentheses() | 88 | Tokenizer.simplifyRedundantParentheses() |
simplifyCondition(conststd::map<std::string,std::string>&,std::string& ,bool) | 88 | Preprocessor.simplifyCondition(conststd::map<std::string,std::string>& ,std::string&,bool) |
uninitvar2_structmembers() | 88 | TestUninitVar.uninitvar2_structmembers() |
simplifyStructDecl() | 87 | Tokenizer.simplifyStructDecl() |
useDefaultArgumentValues(conststd::list<Token*>&,std::list<Token*>*) | 87 | TemplateSimplifier.useDefaultArgumentValues(conststd::list<Token*>& ,std::list<Token*>*) |
argsMatch(constScope*,constToken*,constToken*,conststd::string& ,unsignedint) | 86 | Function.argsMatch(constScope*,constToken*,constToken* ,conststd::string&,unsignedint) |
convert() | 86 | TestMathLib.convert() |
code(conststd::vector<std::string>&,conststd::map<std::string ,PreprocessorMacro*>&,std::string&) | 85 | PreprocessorMacro.code(conststd::vector<std::string>&,conststd::map <std::string,PreprocessorMacro*>&,std::string&) |
simplifycode() | 85 | TestMemleakInFunction.simplifycode() |
pointerDerefAndCheck() | 82 | TestNullPointer.pointerDerefAndCheck() |
doublefree1() | 80 | TestLeakAutoVar.doublefree1() |
duplicateExpression1() | 80 | TestOther.duplicateExpression1() |
simplifyTypedefFunction1() | 80 | TestSimplifyTypedef.simplifyTypedefFunction1() |
checkGlobalAndLocalVariable() | 79 | CheckBufferOverrun.checkGlobalAndLocalVariable() |
run() | 79 | TestStl.run() |
checkScope(constToken*,constCheckBufferOverrun::ArrayInfo&) | 78 | CheckBufferOverrun.checkScope(constToken* ,constCheckBufferOverrun::ArrayInfo&) |
constructors() | 78 | CheckClass.constructors() |
Statistics
Stat | # lines of code (LOC) |
---|---|
Sum: | 29 586 |
Average: | 74.71 |
Minimum: | 31 |
Maximum: | 698 |
Standard deviation: | 77.57 |
Variance: | 6 017 |
Rule warning: Methods too complex |
• How to Fix Violations: A large and complex method should be split in smaller methods, or even one or several classes can be created for that. During this process it is important to question the scope of each variable local to the method. This can be an indication if such local variable will become an instance field of the newly created class(es). Large switch…case structures might be refactored through the help of a set of types that implement a common interface, the interface polymorphism playing the role of the switch cases tests. Unit Tests can help: write tests for each method before extracting it to ensure you don't break functionality.
294 methods matched
methods | Cyclomatic Complexity (CC) | MaxNestedLoop | NestingDepth | Full Name |
---|---|---|---|---|
run() | 375 | 0 | 1 | TestTokenizer.run() |
checkWrongPrintfScanfArguments() | 349 | 4 | 14 | CheckIO.checkWrongPrintfScanfArguments() |
SymbolDatabase(constTokenizer*,constSettings*,ErrorLogger*) | 279 | 5 | 19 | SymbolDatabase.SymbolDatabase(constTokenizer*,constSettings* ,ErrorLogger*) |
simplifyTypedef() | 197 | 4 | 10 | Tokenizer.simplifyTypedef() |
getcode(constToken*,std::list<constToken*>,constunsignedint ,CheckMemoryLeak::AllocType&,CheckMemoryLeak::AllocType&,bool ,unsignedint) | 191 | 3 | 9 | CheckMemoryLeakInFunction.getcode(constToken*,std::list<constToken*> ,constunsignedint,CheckMemoryLeak::AllocType& ,CheckMemoryLeak::AllocType&,bool,unsignedint) |
run() | 181 | 0 | 1 | TestPreprocessor.run() |
run() | 170 | 0 | 2 | TestSimplifyTokens.run() |
run() | 156 | 0 | 3 | TestMemleakInFunction.run() |
load(consttinyxml2::XMLDocument&) | 148 | 4 | 8 | Library.load(consttinyxml2::XMLDocument&) |
run() | 144 | 0 | 1 | TestSymbolDatabase.run() |
run() | 137 | 0 | 1 | TestBufferOverrun.run() |
run() | 137 | 0 | 1 | TestClass.run() |
ParseFromArgs(int,constchar*const*) | 130 | 2 | 6 | CmdLineParser.ParseFromArgs(int,constchar*const*) |
ParseFromArgs(int,constchar*const*) | 130 | 2 | 6 | CmdLineParser.ParseFromArgs(int,constchar*const*) |
run() | 127 | 0 | 1 | TestVarID.run() |
simplifycode(Token*) | 124 | 4 | 7 | CheckMemoryLeakInFunction.simplifycode(Token*) |
parse(constToken&,std::list<ExecutionPath*>&) | 122 | 2 | 7 | UninitVar.parse(constToken&,std::list<ExecutionPath*>&) |
run() | 121 | 0 | 1 | TestSimplifyTypedef.run() |
checkFunctionVariableUsage_iterateScopes(constScope*const,Variables& ,bool) | 119 | 2 | 7 | CheckUnusedVar.checkFunctionVariableUsage_iterateScopes (constScope*const,Variables&,bool) |
run() | 119 | 0 | 1 | TestConstructors.run() |
run() | 119 | 0 | 1 | TestUnusedVar.run() |
simplifyEnum() | 111 | 4 | 11 | Tokenizer.simplifyEnum() |
run() | 103 | 0 | 1 | TestOther.run() |
valueFlowForward(Token*const,constToken*const,constVariable*const ,constunsignedint,std::list<ValueFlow::Value>,constbool ,TokenList*const,ErrorLogger*const,constSettings*const) | 98 | 3 | 7 | __Globals.valueFlowForward(Token*const,constToken*const ,constVariable*const,constunsignedint,std::list<ValueFlow::Value> ,constbool,TokenList*const,ErrorLogger*const,constSettings*const) |
setVarId() | 96 | 3 | 9 | Tokenizer.setVarId() |
getcfgs(conststd::string&,conststd::string&,conststd::map<std::string ,std::string>&) | 96 | 3 | 6 | Preprocessor.getcfgs(conststd::string&,conststd::string&,conststd::map <std::string,std::string>&) |
simplifyKnownVariablesSimplify(Token**,Token*,unsignedint ,conststd::string&,std::string&,unsignedint,bool,constToken*const,int) | 92 | 2 | 6 | Tokenizer.simplifyKnownVariablesSimplify(Token**,Token*,unsignedint ,conststd::string&,std::string&,unsignedint,bool,constToken*const,int) |
run() | 90 | 0 | 1 | TestCmdlineParser.run() |
checkScopeForVariable(constToken*,constVariable&,bool*const,bool*const ,CheckUninitVar::Alloc*const,conststd::string&) | 85 | 2 | 7 | CheckUninitVar.checkScopeForVariable(constToken*,constVariable& ,bool*const,bool*const,CheckUninitVar::Alloc*const,conststd::string&) |
checkScope(constToken*const,VarInfo*,std::set<unsignedint>) | 82 | 2 | 7 | CheckLeakAutoVar.checkScope(constToken*const,VarInfo*,std::set <unsignedint>) |
valueFlowBeforeCondition(TokenList*,SymbolDatabase*,ErrorLogger* ,constSettings*) | 81 | 4 | 7 | __Globals.valueFlowBeforeCondition(TokenList*,SymbolDatabase* ,ErrorLogger*,constSettings*) |
checkScope(constToken*,std::list<ExecutionPath*>&) | 81 | 2 | 10 | ExecutionPath.checkScope(constToken*,std::list<ExecutionPath*>&) |
simplifyVarDecl(Token*,Token*,bool) | 80 | 3 | 7 | Tokenizer.simplifyVarDecl(Token*,Token*,bool) |
run() | 79 | 0 | 1 | TestStl.run() |
checkFileUsage() | 70 | 3 | 9 | CheckIO.checkFileUsage() |
simplifyMicrosoftStringFunctions() | 70 | 2 | 5 | Tokenizer.simplifyMicrosoftStringFunctions() |
initializeVarList(constFunction&,std::list<constFunction*>& ,constScope*,std::vector<Usage>&) | 64 | 2 | 7 | CheckClass.initializeVarList(constFunction&,std::list<constFunction*>& ,constScope*,std::vector<Usage>&) |
simplifyKnownVariables() | 63 | 3 | 7 | Tokenizer.simplifyKnownVariables() |
removeComments(conststd::string&,conststd::string&) | 63 | 2 | 10 | Preprocessor.removeComments(conststd::string&,conststd::string&) |
run() | 63 | 0 | 1 | TestSimplifyTemplate.run() |
checkScope(constToken*,conststd::vector<std::string>& ,constCheckBufferOverrun::ArrayInfo&) | 57 | 2 | 8 | CheckBufferOverrun.checkScope(constToken*,conststd::vector<std::string >&,constCheckBufferOverrun::ArrayInfo&) |
expandMacros(conststd::string&,std::string,conststd::string& ,ErrorLogger*) | 56 | 4 | 9 | Preprocessor.expandMacros(conststd::string&,std::string ,conststd::string&,ErrorLogger*) |
isVariableUsage(constToken*,bool,CheckUninitVar::Alloc) | 56 | 1 | 5 | CheckUninitVar.isVariableUsage(constToken*,bool,CheckUninitVar::Alloc) |
run() | 55 | 0 | 1 | TestLeakAutoVar.run() |
eraseDeadCode(Token*,constToken*) | 54 | 2 | 8 | Tokenizer.eraseDeadCode(Token*,constToken*) |
simplifyTokenList1(constchar*) | 53 | 2 | 5 | Tokenizer.simplifyTokenList1(constchar*) |
valueFlowAfterCondition(TokenList*,SymbolDatabase*,ErrorLogger* ,constSettings*) | 52 | 4 | 8 | __Globals.valueFlowAfterCondition(TokenList*,SymbolDatabase* ,ErrorLogger*,constSettings*) |
parseTokens(constTokenizer&,constchar*,constSettings*) | 52 | 2 | 6 | CheckUnusedFunctions.parseTokens(constTokenizer&,constchar* ,constSettings*) |
handleIncludes(conststd::string&,conststd::string&,conststd::list <std::string>&,std::map<std::string,std::string>&,std::set<std::string >&,std::list<std::string>) | 51 | 2 | 6 | Preprocessor.handleIncludes(conststd::string&,conststd::string& ,conststd::list<std::string>&,std::map<std::string,std::string>& ,std::set<std::string>&,std::list<std::string>) |
getcode(conststd::string&,conststd::string&,conststd::string&) | 50 | 2 | 7 | Preprocessor.getcode(conststd::string&,conststd::string& ,conststd::string&) |
printOut(constchar*) | 47 | 3 | 4 | SymbolDatabase.printOut(constchar*) |
simplifyCalculations(Token*) | 47 | 2 | 6 | TemplateSimplifier.simplifyCalculations(Token*) |
run() | 47 | 0 | 2 | TestNullPointer.run() |
run() | 47 | 0 | 1 | TestGarbage.run() |
string_c_str() | 46 | 4 | 7 | CheckStl.string_c_str() |
checkRedundantAssignment() | 46 | 3 | 9 | CheckOther.checkRedundantAssignment() |
simplifyMathFunctions() | 46 | 2 | 6 | Tokenizer.simplifyMathFunctions() |
constructors() | 45 | 4 | 7 | CheckClass.constructors() |
setTokenValue(Token*,constValueFlow::Value&) | 45 | 3 | 7 | __Globals.setTokenValue(Token*,constValueFlow::Value&) |
doAssignment(Variables&,constToken*,bool,constScope*) | 45 | 1 | 10 | __Globals.doAssignment(Variables&,constToken*,bool,constScope*) |
run() | 45 | 0 | 1 | TestToken.run() |
simplifyTemplateInstantiations(TokenList&,ErrorLogger*,constSettings* ,constToken*,std::list<Token*>&,std::set<std::string>&) | 44 | 3 | 8 | TemplateSimplifier.simplifyTemplateInstantiations(TokenList& ,ErrorLogger*,constSettings*,constToken*,std::list<Token*>&,std::set <std::string>&) |
checkStructVariable(constVariable*const) | 44 | 3 | 7 | CheckMemoryLeakStructMember.checkStructVariable(constVariable*const) |
call_func(constToken*,std::list<constToken*>,constunsignedint ,CheckMemoryLeak::AllocType&,CheckMemoryLeak::AllocType&,bool& ,unsignedint) | 44 | 2 | 4 | CheckMemoryLeakInFunction.call_func(constToken*,std::list<constToken*> ,constunsignedint,CheckMemoryLeak::AllocType& ,CheckMemoryLeak::AllocType&,bool&,unsignedint) |
argsMatch(constScope*,constToken*,constToken*,conststd::string& ,unsignedint) | 43 | 2 | 5 | Function.argsMatch(constScope*,constToken*,constToken* ,conststd::string&,unsignedint) |
simplifyMathExpressions() | 43 | 1 | 5 | Tokenizer.simplifyMathExpressions() |
simplifyCondition(conststd::map<std::string,std::string>&,std::string& ,bool) | 42 | 2 | 6 | Preprocessor.simplifyCondition(conststd::map<std::string,std::string>& ,std::string&,bool) |
simplifySizeof() | 41 | 2 | 7 | Tokenizer.simplifySizeof() |
run() | 41 | 0 | 1 | TestAutoVariables.run() |
checkConstFunc(constScope*,constFunction*,bool&) | 40 | 2 | 6 | CheckClass.checkConstFunc(constScope*,constFunction*,bool&) |
getVariableList(constLibrary*) | 40 | 2 | 4 | Scope.getVariableList(constLibrary*) |
execute(constToken*,std::map<unsignedint,MathLib::bigint>*const ,MathLib::bigint*,bool*) | 40 | 0 | 4 | __Globals.execute(constToken*,std::map<unsignedint,MathLib::bigint >*const,MathLib::bigint*,bool*) |
duplicateTypedef(Token**,constToken*,constToken*,conststd::set <std::string>&) | 39 | 1 | 8 | Tokenizer.duplicateTypedef(Token**,constToken*,constToken* ,conststd::set<std::string>&) |
isFloat(conststd::string&) | 39 | 1 | 3 | MathLib.isFloat(conststd::string&) |
checkStructVariable() | 38 | 6 | 11 | CheckBufferOverrun.checkStructVariable() |
checkScope(constToken*,constCheckBufferOverrun::ArrayInfo&) | 38 | 2 | 9 | CheckBufferOverrun.checkScope(constToken* ,constCheckBufferOverrun::ArrayInfo&) |
run() | 38 | 0 | 1 | TestUninitVar.run() |
useDefaultArgumentValues(conststd::list<Token*>&,std::list<Token*>*) | 37 | 4 | 7 | TemplateSimplifier.useDefaultArgumentValues(conststd::list<Token*>& ,std::list<Token*>*) |
checkIncorrectLogicOperator() | 37 | 3 | 6 | CheckCondition.checkIncorrectLogicOperator() |
multiComparePercent(constToken*,constchar*&,bool,unsignedint) | 37 | 0 | 5 | __Globals.multiComparePercent(constToken*,constchar*&,bool,unsignedint ) |
templateParameters(constToken*) | 36 | 3 | 4 | TemplateSimplifier.templateParameters(constToken*) |
code(conststd::vector<std::string>&,conststd::map<std::string ,PreprocessorMacro*>&,std::string&) | 35 | 3 | 9 | PreprocessorMacro.code(conststd::vector<std::string>&,conststd::map <std::string,PreprocessorMacro*>&,std::string&) |
simplifyFunctionParameters() | 35 | 3 | 7 | Tokenizer.simplifyFunctionParameters() |
createTokens(std::istream&,conststd::string&) | 35 | 2 | 8 | TokenList.createTokens(std::istream&,conststd::string&) |
findFunction(constToken*) | 35 | 2 | 8 | Scope.findFunction(constToken*) |
ArgumentInfo(constToken*,constSettings*) | 35 | 2 | 8 | CheckIO+ArgumentInfo.ArgumentInfo(constToken*,constSettings*) |
simplifyConditions() | 35 | 2 | 5 | Tokenizer.simplifyConditions() |
hasComplicatedSyntaxErrorsInTemplates(Token*) | 34 | 3 | 6 | TemplateSimplifier.hasComplicatedSyntaxErrorsInTemplates(Token*) |
simplifyTokenList2() | 34 | 2 | 5 | Tokenizer.simplifyTokenList2() |
iterators() | 34 | 2 | 5 | CheckStl.iterators() |
simplifyPlatformTypes() | 34 | 1 | 5 | Tokenizer.simplifyPlatformTypes() |
virtualDestructor() | 33 | 3 | 8 | CheckClass.virtualDestructor() |
pushback() | 33 | 3 | 6 | CheckStl.pushback() |
addClassFunction(Scope**,constToken**,constToken*) | 33 | 2 | 9 | SymbolDatabase.addClassFunction(Scope**,constToken**,constToken*) |
countSprintfLength(conststd::string&,conststd::list<constToken*>&) | 33 | 1 | 5 | CheckBufferOverrun.countSprintfLength(conststd::string&,conststd::list <constToken*>&) |
expandTemplate(TokenList&,constToken*,conststd::string&,std::vector <constToken*>&,conststd::string&,std::vector<constToken*>&,std::list <Token*>&) | 32 | 3 | 7 | TemplateSimplifier.expandTemplate(TokenList&,constToken* ,conststd::string&,std::vector<constToken*>&,conststd::string& ,std::vector<constToken*>&,std::list<Token*>&) |
addArguments(constSymbolDatabase*,constScope*) | 31 | 3 | 8 | Function.addArguments(constSymbolDatabase*,constScope*) |
simplifyRedundantParentheses() | 31 | 3 | 5 | Tokenizer.simplifyRedundantParentheses() |
simplifyStructDecl() | 31 | 2 | 7 | Tokenizer.simplifyStructDecl() |
removeUnnecessaryQualification() | 31 | 2 | 7 | Tokenizer.removeUnnecessaryQualification() |
Statistics
Stat | Cyclomatic Complexity (CC) | MaxNestedLoop | NestingDepth |
---|---|---|---|
Sum: | 10 585 | 479 | 1 950 |
Average: | 36 | 1.63 | 6.63 |
Minimum: | 1 | 0 | 1 |
Maximum: | 375 | 6 | 31 |
Standard deviation: | 46.73 | 1.32 | 3.9 |
Variance: | 2 184 | 1.73 | 15.21 |
Rule warning: Methods potentially poorly commented |
• How to Fix Violations: Typically add more comment. But code commenting is subject to controversy. While poorly written and designed code would needs a lot of comment to be understood, clean code doesn't need that much comment, especially if variables and methods are properly named and convey enough information. Unit-Test code can also play the role of code commenting. However, even when writing clean and well-tested code, one will have to write hacks at a point, usually to circumvent some API limitations or bugs. A hack is a non-trivial piece of code, that doesn't make sense at first glance, and that took time and web research to be found. In such situation comments must absolutely be used to express the intention, the need for the hacks and the source where the solution has been found.
382 methods matched
methods | Percentage Comment | # lines of code (LOC) | # lines of comment | Full Name |
---|---|---|---|---|
printfFormatType(std::ostream&,conststd::string&,bool) | 0 | 29 | 0 | __Globals.printfFormatType(std::ostream&,conststd::string&,bool) |
toxml(conststd::string&) | 0 | 27 | 0 | __Globals.toxml(conststd::string&) |
execute(constToken*,std::map<unsignedint,MathLib::bigint>*const ,MathLib::bigint*,bool*) | 0 | 105 | 1 | __Globals.execute(constToken*,std::map<unsignedint,MathLib::bigint >*const,MathLib::bigint*,bool*) |
valueFlowForLoop(TokenList*,SymbolDatabase*,ErrorLogger* ,constSettings*) | 0 | 26 | 0 | __Globals.valueFlowForLoop(TokenList*,SymbolDatabase*,ErrorLogger* ,constSettings*) |
isFloat(conststd::string&) | 0 | 90 | 0 | MathLib.isFloat(conststd::string&) |
isDec(conststd::string&) | 0 | 24 | 0 | MathLib.isDec(conststd::string&) |
isHex(conststd::string&) | 0 | 36 | 0 | MathLib.isHex(conststd::string&) |
printValueFlow(bool,std::ostream&) | 0 | 38 | 0 | Token.printValueFlow(bool,std::ostream&) |
deserialize(conststd::string&) | 0 | 47 | 0 | ErrorLogger+ErrorMessage.deserialize(conststd::string&) |
unsupportedTypedef(constToken*) | 0 | 21 | 0 | Tokenizer.unsupportedTypedef(constToken*) |
isScopeNoReturn(constToken*,std::string*) | 0 | 22 | 0 | Library.isScopeNoReturn(constToken*,std::string*) |
printOut(constchar*) | 0 | 129 | 1 | SymbolDatabase.printOut(constchar*) |
printVariable(constVariable*,constchar*) | 0 | 34 | 0 | SymbolDatabase.printVariable(constVariable*,constchar*) |
arrayIndexOutOfBoundsError(constToken* ,constCheckBufferOverrun::ArrayInfo&,conststd::vector<ValueFlow::Value >&) | 0 | 25 | 0 | CheckBufferOverrun.arrayIndexOutOfBoundsError(constToken* ,constCheckBufferOverrun::ArrayInfo&,conststd::vector<ValueFlow::Value >&) |
invalidScanfArgTypeError_int(constToken*,unsignedint,conststd::string& ,constCheckIO::ArgumentInfo*,bool) | 0 | 40 | 0 | CheckIO.invalidScanfArgTypeError_int(constToken*,unsignedint ,conststd::string&,constCheckIO::ArgumentInfo*,bool) |
argumentType(std::ostream&,constCheckIO::ArgumentInfo*) | 0 | 41 | 0 | CheckIO.argumentType(std::ostream&,constCheckIO::ArgumentInfo*) |
getErrorMessages(ErrorLogger*,constSettings*) | 0 | 24 | 0 | CheckIO.getErrorMessages(ErrorLogger*,constSettings*) |
checkIfForWhileHead(constToken*,constVariable&,bool,bool ,CheckUninitVar::Alloc,conststd::string&) | 0 | 22 | 0 | CheckUninitVar.checkIfForWhileHead(constToken*,constVariable&,bool ,bool,CheckUninitVar::Alloc,conststd::string&) |
getErrorMessages(ErrorLogger*,constSettings*) | 0 | 28 | 0 | CheckStl.getErrorMessages(ErrorLogger*,constSettings*) |
tooManyConfigsError(conststd::string&,conststd::size_t) | 0 | 21 | 0 | CppCheck.tooManyConfigsError(conststd::string&,conststd::size_t) |
check() | 0 | 39 | 0 | ThreadExecutor.check() |
check() | 0 | 39 | 0 | ThreadExecutor.check() |
comparisonOfBoolExpressionWithInt2() | 0 | 28 | 0 | TestBool.comparisonOfBoolExpressionWithInt2() |
countSprintfLength() | 0 | 70 | 0 | TestBufferOverrun.countSprintfLength() |
constassign2() | 0 | 28 | 0 | TestClass.constassign2() |
relativePaths() | 0 | 25 | 0 | TestCmdlineParser.relativePaths() |
enforceLanguage() | 0 | 23 | 0 | TestCmdlineParser.enforceLanguage() |
checkBadBitmaskCheck() | 0 | 24 | 0 | TestCondition.checkBadBitmaskCheck() |
testMicrosoftSecureScanfArgument() | 0 | 26 | 0 | TestIO.testMicrosoftSecureScanfArgument() |
run() | 0 | 26 | 0 | TestMathLib.run() |
assign1() | 0 | 22 | 0 | TestMemleakInFunction.assign1() |
switchRedundantOperationTest() | 0 | 48 | 0 | TestOther.switchRedundantOperationTest() |
switchRedundantBitwiseOperationTest() | 0 | 24 | 0 | TestOther.switchRedundantBitwiseOperationTest() |
suspiciousEqualityComparison() | 0 | 32 | 0 | TestOther.suspiciousEqualityComparison() |
checkSignOfPointer() | 0 | 62 | 0 | TestOther.checkSignOfPointer() |
checkInvalidFree() | 0 | 22 | 0 | TestOther.checkInvalidFree() |
run() | 0 | 27 | 0 | TestPathMatch.run() |
match_cfg_def() | 0 | 22 | 0 | TestPreprocessor.match_cfg_def() |
macroInMacro1() | 0 | 26 | 0 | TestPreprocessor.macroInMacro1() |
iftruefalse() | 0 | 35 | 0 | TestSimplifyTokens.iftruefalse() |
sizeof18() | 0 | 50 | 0 | TestSimplifyTokens.sizeof18() |
simplifyStructDecl3() | 0 | 60 | 0 | TestSimplifyTokens.simplifyStructDecl3() |
incorrectStringCompare() | 0 | 30 | 0 | TestString.incorrectStringCompare() |
test_isVariableDeclarationIdentifiesPointers() | 0 | 28 | 0 | TestSymbolDatabase.test_isVariableDeclarationIdentifiesPointers() |
isVariableDeclarationIdentifiesReference() | 0 | 24 | 0 | TestSymbolDatabase.isVariableDeclarationIdentifiesReference() |
isVariableStlType() | 0 | 38 | 0 | TestSymbolDatabase.isVariableStlType() |
symboldatabase31() | 0 | 21 | 0 | TestSymbolDatabase.symboldatabase31() |
symboldatabase37() | 0 | 21 | 0 | TestSymbolDatabase.symboldatabase37() |
findFunction4() | 0 | 59 | 0 | TestSymbolDatabase.findFunction4() |
varTypesIntegral() | 0 | 67 | 0 | TestSymbolDatabase.varTypesIntegral() |
varTypesFloating() | 0 | 42 | 0 | TestSymbolDatabase.varTypesFloating() |
matchNumeric() | 0 | 34 | 0 | TestToken.matchNumeric() |
initOps() | 0 | 38 | 0 | TestToken.initOps() |
operators() | 0 | 22 | 0 | TestToken.operators() |
syntax_error() | 0 | 57 | 0 | TestTokenizer.syntax_error() |
bitfields1() | 0 | 50 | 0 | TestTokenizer.bitfields1() |
microsoftMemory() | 0 | 30 | 0 | TestTokenizer.microsoftMemory() |
localvar8() | 0 | 57 | 0 | TestUnusedVar.localvar8() |
localvarStruct5() | 0 | 32 | 0 | TestUnusedVar.localvarStruct5() |
localvardynamic1() | 0 | 30 | 0 | TestUnusedVar.localvardynamic1() |
localvardynamic2() | 0 | 28 | 0 | TestUnusedVar.localvardynamic2() |
run() | 0 | 24 | 0 | TestValueFlow.run() |
createAstAtToken(Token*,bool) | 1 | 69 | 1 | __Globals.createAstAtToken(Token*,bool) |
load(consttinyxml2::XMLDocument&) | 1 | 377 | 6 | Library.load(consttinyxml2::XMLDocument&) |
comparisonOfBoolExpressionWithInt1() | 1 | 65 | 1 | TestBool.comparisonOfBoolExpressionWithInt1() |
const14() | 1 | 52 | 1 | TestClass.const14() |
isfloat() | 1 | 97 | 1 | TestMathLib.isfloat() |
checkSignOfUnsignedVariable() | 1 | 57 | 1 | TestOther.checkSignOfUnsignedVariable() |
checkPointerSizeof() | 1 | 62 | 1 | TestSizeof.checkPointerSizeof() |
simplifyKnownVariables29() | 1 | 56 | 1 | TestTokenizer.simplifyKnownVariables29() |
compileTerm(Token*&,AST_state&) | 2 | 34 | 1 | __Globals.compileTerm(Token*&,AST_state&) |
valueFlowForLoop1(constToken*,unsignedint*const,MathLib::bigint*const ,MathLib::bigint*const,MathLib::bigint*const) | 2 | 33 | 1 | __Globals.valueFlowForLoop1(constToken*,unsignedint*const ,MathLib::bigint*const,MathLib::bigint*const,MathLib::bigint*const) |
simplifyDoublePlusAndDoubleMinus() | 2 | 33 | 1 | Tokenizer.simplifyDoublePlusAndDoubleMinus() |
operatorEqToSelf5() | 2 | 34 | 1 | TestClass.operatorEqToSelf5() |
testScanfArgument() | 2 | 185 | 5 | TestIO.testScanfArgument() |
testMicrosoftSecurePrintfArgument() | 2 | 36 | 1 | TestIO.testMicrosoftSecurePrintfArgument() |
doublefree1() | 2 | 80 | 2 | TestLeakAutoVar.doublefree1() |
container() | 2 | 39 | 1 | TestLibrary.container() |
simplifyStructDecl1() | 2 | 69 | 2 | TestSimplifyTokens.simplifyStructDecl1() |
noexceptFunction3() | 2 | 33 | 1 | TestSymbolDatabase.noexceptFunction3() |
simplifyInitVar() | 2 | 90 | 2 | TestTokenizer.simplifyInitVar() |
astGetSizeSign(constSettings*,constToken*,unsignedint*,char*) | 3 | 53 | 2 | __Globals.astGetSizeSign(constSettings*,constToken*,unsignedint*,char* ) |
compilePrecedence3(Token*&,AST_state&) | 3 | 59 | 2 | __Globals.compilePrecedence3(Token*&,AST_state&) |
Settings() | 3 | 26 | 1 | Settings.Settings() |
printXml(std::ostream&) | 3 | 59 | 2 | SymbolDatabase.printXml(std::ostream&) |
checkComparisonOfFuncReturningBool() | 3 | 25 | 1 | CheckBool.checkComparisonOfFuncReturningBool() |
getErrorMessages(ErrorLogger*,constSettings*) | 3 | 27 | 1 | CheckClass.getErrorMessages(ErrorLogger*,constSettings*) |
checkFileUsage() | 3 | 177 | 6 | CheckIO.checkFileUsage() |
checkLoopBody(constToken*,constVariable&,constCheckUninitVar::Alloc ,conststd::string&,constbool) | 3 | 58 | 2 | CheckUninitVar.checkLoopBody(constToken*,constVariable& ,constCheckUninitVar::Alloc,conststd::string&,constbool) |
filterException(int,PEXCEPTION_POINTERS) | 3 | 76 | 3 | __Globals.filterException(int,PEXCEPTION_POINTERS) |
filterException(int,PEXCEPTION_POINTERS) | 3 | 76 | 3 | __Globals.filterException(int,PEXCEPTION_POINTERS) |
runTests(constoptions&) | 3 | 30 | 1 | TestFixture.runTests(constoptions&) |
array_index_multidim() | 3 | 28 | 1 | TestBufferOverrun.array_index_multidim() |
cmdLineArgs1() | 3 | 26 | 1 | TestBufferOverrun.cmdLineArgs1() |
incorrectLogicOperator1() | 3 | 26 | 1 | TestCondition.incorrectLogicOperator1() |
printf_with_invalid_va_argument() | 3 | 26 | 1 | TestNullPointer.printf_with_invalid_va_argument() |
functionArgs1() | 3 | 28 | 1 | TestSymbolDatabase.functionArgs1() |
throwFunction2() | 3 | 31 | 1 | TestSymbolDatabase.throwFunction2() |
pointers_condition() | 3 | 30 | 1 | TestTokenizer.pointers_condition() |
simplifyMicrosoftStringFunctions() | 4 | 111 | 5 | Tokenizer.simplifyMicrosoftStringFunctions() |
Statistics
Stat | Percentage Comment | # lines of code (LOC) | # lines of comment |
---|---|---|---|
Sum: | 3 449 | 22 398 | 2 699 |
Average: | 9.03 | 58.63 | 7.07 |
Minimum: | 0 | 21 | 0 |
Maximum: | 19 | 691 | 107 |
Standard deviation: | 6.09 | 69.31 | 11.34 |
Variance: | 37.11 | 4 803 | 128.7 |
Rule warning: Methods with too many parameters |
• How to Fix Violations: More properties/fields can be added to the declaring type to handle numerous states. An alternative is to provide a class or a structure dedicated to handle arguments passing.
28 methods matched
methods | # Parameters | Full Name |
---|---|---|
valueFlowForward(Token*const,constToken*const,constVariable*const ,constunsignedint,std::list<ValueFlow::Value>,constbool ,TokenList*const,ErrorLogger*const,constSettings*const) | 9 | __Globals.valueFlowForward(Token*const,constToken*const ,constVariable*const,constunsignedint,std::list<ValueFlow::Value> ,constbool,TokenList*const,ErrorLogger*const,constSettings*const) |
simplifyKnownVariablesSimplify(Token**,Token*,unsignedint ,conststd::string&,std::string&,unsignedint,bool,constToken*const,int) | 9 | Tokenizer.simplifyKnownVariablesSimplify(Token**,Token*,unsignedint ,conststd::string&,std::string&,unsignedint,bool,constToken*const,int) |
Variable(constToken*,constToken*,constToken*,std::size_t,AccessControl ,constType*,constScope*,constLibrary*) | 8 | Variable.Variable(constToken*,constToken*,constToken*,std::size_t ,AccessControl,constType*,constScope*,constLibrary*) |
stringifyList(bool,bool,bool,bool,bool,conststd::vector<std::string>* ,constToken*) | 7 | Token.stringifyList(bool,bool,bool,bool,bool,conststd::vector <std::string>*,constToken*) |
simplifyKnownVariablesGetData(unsignedint,Token**,Token**,std::string& ,unsignedint&,bool&,bool) | 7 | Tokenizer.simplifyKnownVariablesGetData(unsignedint,Token**,Token** ,std::string&,unsignedint&,bool&,bool) |
addVariable(constToken*,constToken*,constToken*,AccessControl ,constType*,constScope*,constLibrary*) | 7 | Scope.addVariable(constToken*,constToken*,constToken*,AccessControl ,constType*,constScope*,constLibrary*) |
duplInheritedMembersError(constToken*,constToken*,conststd::string& ,conststd::string&,conststd::string&,bool,bool) | 7 | CheckClass.duplInheritedMembersError(constToken*,constToken* ,conststd::string&,conststd::string&,conststd::string&,bool,bool) |
call_func(constToken*,std::list<constToken*>,constunsignedint ,CheckMemoryLeak::AllocType&,CheckMemoryLeak::AllocType&,bool& ,unsignedint) | 7 | CheckMemoryLeakInFunction.call_func(constToken*,std::list<constToken*> ,constunsignedint,CheckMemoryLeak::AllocType& ,CheckMemoryLeak::AllocType&,bool&,unsignedint) |
getcode(constToken*,std::list<constToken*>,constunsignedint ,CheckMemoryLeak::AllocType&,CheckMemoryLeak::AllocType&,bool ,unsignedint) | 7 | CheckMemoryLeakInFunction.getcode(constToken*,std::list<constToken*> ,constunsignedint,CheckMemoryLeak::AllocType& ,CheckMemoryLeak::AllocType&,bool,unsignedint) |
expandTemplate(TokenList&,constToken*,conststd::string&,std::vector <constToken*>&,conststd::string&,std::vector<constToken*>&,std::list <Token*>&) | 7 | TemplateSimplifier.expandTemplate(TokenList&,constToken* ,conststd::string&,std::vector<constToken*>&,conststd::string& ,std::vector<constToken*>&,std::list<Token*>&) |
check(constchar*,constchar*,bool,bool,bool,Settings*,bool) | 7 | TestOther.check(constchar*,constchar*,bool,bool,bool,Settings*,bool) |
setVarIdClassFunction(conststd::string&,Token*const,constToken*const ,conststd::map<std::string,unsignedint>&,std::map<unsignedint,std::map <std::string,unsignedint>>*,unsignedint*) | 6 | __Globals.setVarIdClassFunction(conststd::string&,Token*const ,constToken*const,conststd::map<std::string,unsignedint>&,std::map <unsignedint,std::map<std::string,unsignedint>>*,unsignedint*) |
linkBrackets(Tokenizer*,std::stack<constToken*>&,std::stack<Token*>& ,Token*,char,char) | 6 | __Globals.linkBrackets(Tokenizer*,std::stack<constToken*>&,std::stack <Token*>&,Token*,char,char) |
valueFlowForLoopSimplify(Token*const,constunsignedint ,constMathLib::bigint,TokenList*,ErrorLogger*,constSettings*) | 6 | __Globals.valueFlowForLoopSimplify(Token*const,constunsignedint ,constMathLib::bigint,TokenList*,ErrorLogger*,constSettings*) |
valueFlowForLoopSimplifyAfter(Token*,unsignedint,constMathLib::bigint ,TokenList*,ErrorLogger*,constSettings*) | 6 | __Globals.valueFlowForLoopSimplifyAfter(Token*,unsignedint ,constMathLib::bigint,TokenList*,ErrorLogger*,constSettings*) |
valueFlowInjectParameter(TokenList*,ErrorLogger*,constSettings* ,constVariable*,constScope*,conststd::list<ValueFlow::Value>&) | 6 | __Globals.valueFlowInjectParameter(TokenList*,ErrorLogger* ,constSettings*,constVariable*,constScope*,conststd::list <ValueFlow::Value>&) |
ErrorMessage(conststd::list<constToken*>&,constTokenList* ,Severity::SeverityType,conststd::string&,conststd::string&,bool) | 6 | ErrorLogger+ErrorMessage.ErrorMessage(conststd::list<constToken*>& ,constTokenList*,Severity::SeverityType,conststd::string& ,conststd::string&,bool) |
reportError<T,U>(constToken*,constSeverity::SeverityType,constT,constU ,unsignedint,bool) | 6 | Check.reportError<T,U>(constToken*,constSeverity::SeverityType,constT ,constU,unsignedint,bool) |
reportError<T,U>(conststd::list<constToken*>&,Severity::SeverityType ,constT,constU,unsignedint,bool) | 6 | Check.reportError<T,U>(conststd::list<constToken*>& ,Severity::SeverityType,constT,constU,unsignedint,bool) |
assignIfParseScope(constToken*const,constToken*const,constunsignedint ,constbool,constchar,constMathLib::bigint) | 6 | CheckCondition.assignIfParseScope(constToken*const,constToken*const ,constunsignedint,constbool,constchar,constMathLib::bigint) |
comparisonError(constToken*,conststd::string&,MathLib::bigint ,conststd::string&,MathLib::bigint,bool) | 6 | CheckCondition.comparisonError(constToken*,conststd::string& ,MathLib::bigint,conststd::string&,MathLib::bigint,bool) |
checkScopeForVariable(constToken*,constVariable&,bool*const,bool*const ,CheckUninitVar::Alloc*const,conststd::string&) | 6 | CheckUninitVar.checkScopeForVariable(constToken*,constVariable& ,bool*const,bool*const,CheckUninitVar::Alloc*const,conststd::string&) |
checkIfForWhileHead(constToken*,constVariable&,bool,bool ,CheckUninitVar::Alloc,conststd::string&) | 6 | CheckUninitVar.checkIfForWhileHead(constToken*,constVariable&,bool ,bool,CheckUninitVar::Alloc,conststd::string&) |
VariableUsage(constVariable*,Variables::VariableType,bool,bool,bool ,bool) | 6 | Variables+VariableUsage.VariableUsage(constVariable* ,Variables::VariableType,bool,bool,bool,bool) |
handleIncludes(conststd::string&,conststd::string&,conststd::list <std::string>&,std::map<std::string,std::string>&,std::set<std::string >&,std::list<std::string>) | 6 | Preprocessor.handleIncludes(conststd::string&,conststd::string& ,conststd::list<std::string>&,std::map<std::string,std::string>& ,std::set<std::string>&,std::list<std::string>) |
simplifyTemplateInstantiations(TokenList&,ErrorLogger*,constSettings* ,constToken*,std::list<Token*>&,std::set<std::string>&) | 6 | TemplateSimplifier.simplifyTemplateInstantiations(TokenList& ,ErrorLogger*,constSettings*,constToken*,std::list<Token*>&,std::set <std::string>&) |
tokenizeAndStringify(constchar*,bool,bool,Settings::PlatformType ,constchar*,bool) | 6 | TestTokenizer.tokenizeAndStringify(constchar*,bool,bool ,Settings::PlatformType,constchar*,bool) |
tokenizeAndStringifyWindows(constchar*,bool,bool ,Settings::PlatformType,constchar*,bool) | 6 | TestTokenizer.tokenizeAndStringifyWindows(constchar*,bool,bool ,Settings::PlatformType,constchar*,bool) |
Statistics
Stat | # Parameters |
---|---|
Sum: | 184 |
Average: | 6.57 |
Minimum: | 6 |
Maximum: | 9 |
Standard deviation: | 0.86 |
Variance: | 0.74 |
Rule warning: Methods with too many local variables |
• How to Fix Violations: To refactor such method and increase code quality and maintainability, certainly you'll have to split the method into several smaller methods or even create one or several classes to implement the logic. During this process it is important to question the scope of each variable local to the method. This can be an indication if such local variable will become an instance field of the newly created class(es).
82 methods matched
methods | # Variables | Full Name |
---|---|---|
SymbolDatabase(constTokenizer*,constSettings*,ErrorLogger*) | 108 | SymbolDatabase.SymbolDatabase(constTokenizer*,constSettings* ,ErrorLogger*) |
load(consttinyxml2::XMLDocument&) | 94 | Library.load(consttinyxml2::XMLDocument&) |
simplifyTypedef() | 79 | Tokenizer.simplifyTypedef() |
getcfgs(conststd::string&,conststd::string&,conststd::map<std::string ,std::string>&) | 61 | Preprocessor.getcfgs(conststd::string&,conststd::string&,conststd::map <std::string,std::string>&) |
simplifyEnum() | 57 | Tokenizer.simplifyEnum() |
createLinks() | 55 | TestTokenizer.createLinks() |
simplifyStdType() | 48 | TestTokenizer.simplifyStdType() |
ParseFromArgs(int,constchar*const*) | 46 | CmdLineParser.ParseFromArgs(int,constchar*const*) |
ParseFromArgs(int,constchar*const*) | 46 | CmdLineParser.ParseFromArgs(int,constchar*const*) |
simplifyStructDecl1() | 46 | TestSimplifyTokens.simplifyStructDecl1() |
testScanfArgument() | 45 | TestIO.testScanfArgument() |
simplifyMathFunctions() | 42 | Tokenizer.simplifyMathFunctions() |
getcode(constToken*,std::list<constToken*>,constunsignedint ,CheckMemoryLeak::AllocType&,CheckMemoryLeak::AllocType&,bool ,unsignedint) | 40 | CheckMemoryLeakInFunction.getcode(constToken*,std::list<constToken*> ,constunsignedint,CheckMemoryLeak::AllocType& ,CheckMemoryLeak::AllocType&,bool,unsignedint) |
simplifyStructDecl3() | 40 | TestSimplifyTokens.simplifyStructDecl3() |
simplifyTypedefFunction1() | 40 | TestSimplifyTypedef.simplifyTypedefFunction1() |
valueFlowForward(Token*const,constToken*const,constVariable*const ,constunsignedint,std::list<ValueFlow::Value>,constbool ,TokenList*const,ErrorLogger*const,constSettings*const) | 39 | __Globals.valueFlowForward(Token*const,constToken*const ,constVariable*const,constunsignedint,std::list<ValueFlow::Value> ,constbool,TokenList*const,ErrorLogger*const,constSettings*const) |
removeComments(conststd::string&,conststd::string&) | 39 | Preprocessor.removeComments(conststd::string&,conststd::string&) |
def_handleIncludes() | 39 | TestPreprocessor.def_handleIncludes() |
simplifyKnownVariables() | 38 | Tokenizer.simplifyKnownVariables() |
simplifyKnownVariables29() | 38 | TestTokenizer.simplifyKnownVariables29() |
parse(constToken&,std::list<ExecutionPath*>&) | 37 | UninitVar.parse(constToken&,std::list<ExecutionPath*>&) |
checkFunctionVariableUsage_iterateScopes(constScope*const,Variables& ,bool) | 37 | CheckUnusedVar.checkFunctionVariableUsage_iterateScopes (constScope*const,Variables&,bool) |
setVarId() | 36 | Tokenizer.setVarId() |
checkWrongPrintfScanfArguments() | 36 | CheckIO.checkWrongPrintfScanfArguments() |
expandMacros(conststd::string&,std::string,conststd::string& ,ErrorLogger*) | 36 | Preprocessor.expandMacros(conststd::string&,std::string ,conststd::string&,ErrorLogger*) |
checkIncorrectLogicOperator() | 35 | CheckCondition.checkIncorrectLogicOperator() |
checkScope(constToken*,conststd::vector<std::string>& ,constCheckBufferOverrun::ArrayInfo&) | 33 | CheckBufferOverrun.checkScope(constToken*,conststd::vector<std::string >&,constCheckBufferOverrun::ArrayInfo&) |
syntax_error() | 32 | TestTokenizer.syntax_error() |
checkFileUsage() | 30 | CheckIO.checkFileUsage() |
simplifyInitVar() | 30 | TestTokenizer.simplifyInitVar() |
flowControl() | 29 | TestSimplifyTokens.flowControl() |
checkScopeForVariable(constToken*,constVariable&,bool*const,bool*const ,CheckUninitVar::Alloc*const,conststd::string&) | 28 | CheckUninitVar.checkScopeForVariable(constToken*,constVariable& ,bool*const,bool*const,CheckUninitVar::Alloc*const,conststd::string&) |
string_c_str() | 28 | CheckStl.string_c_str() |
simplifyTemplateInstantiations(TokenList&,ErrorLogger*,constSettings* ,constToken*,std::list<Token*>&,std::set<std::string>&) | 26 | TemplateSimplifier.simplifyTemplateInstantiations(TokenList& ,ErrorLogger*,constSettings*,constToken*,std::list<Token*>&,std::set <std::string>&) |
checkRedundantAssignment() | 25 | CheckOther.checkRedundantAssignment() |
checkScope(constToken*const,VarInfo*,std::set<unsignedint>) | 25 | CheckLeakAutoVar.checkScope(constToken*const,VarInfo*,std::set <unsignedint>) |
parseTokens(constTokenizer&,constchar*,constSettings*) | 25 | CheckUnusedFunctions.parseTokens(constTokenizer&,constchar* ,constSettings*) |
getcode(conststd::string&,conststd::string&,conststd::string&) | 25 | Preprocessor.getcode(conststd::string&,conststd::string& ,conststd::string&) |
if_cond4() | 25 | TestPreprocessor.if_cond4() |
define_ifdef() | 25 | TestPreprocessor.define_ifdef() |
bitfields1() | 25 | TestTokenizer.bitfields1() |
virtualDestructor() | 24 | CheckClass.virtualDestructor() |
syntax_error_templates_1() | 24 | TestTokenizer.syntax_error_templates_1() |
valueFlowBeforeCondition(TokenList*,SymbolDatabase*,ErrorLogger* ,constSettings*) | 23 | __Globals.valueFlowBeforeCondition(TokenList*,SymbolDatabase* ,ErrorLogger*,constSettings*) |
valueFlowAfterCondition(TokenList*,SymbolDatabase*,ErrorLogger* ,constSettings*) | 23 | __Globals.valueFlowAfterCondition(TokenList*,SymbolDatabase* ,ErrorLogger*,constSettings*) |
simplifyKnownVariablesSimplify(Token**,Token*,unsignedint ,conststd::string&,std::string&,unsignedint,bool,constToken*const,int) | 23 | Tokenizer.simplifyKnownVariablesSimplify(Token**,Token*,unsignedint ,conststd::string&,std::string&,unsignedint,bool,constToken*const,int) |
pushback() | 23 | CheckStl.pushback() |
iftruefalse() | 23 | TestSimplifyTokens.iftruefalse() |
sizeof9() | 23 | TestSimplifyTokens.sizeof9() |
checkStructVariable() | 22 | CheckBufferOverrun.checkStructVariable() |
checkScope(constToken*,constCheckBufferOverrun::ArrayInfo&) | 22 | CheckBufferOverrun.checkScope(constToken* ,constCheckBufferOverrun::ArrayInfo&) |
checkFile(conststd::string&,constchar*,std::set<unsignedlonglong>&) | 22 | CppCheck.checkFile(conststd::string&,constchar*,std::set <unsignedlonglong>&) |
handleIncludes(conststd::string&,conststd::string&,conststd::list <std::string>&,std::map<std::string,std::string>&,std::set<std::string >&,std::list<std::string>) | 22 | Preprocessor.handleIncludes(conststd::string&,conststd::string& ,conststd::list<std::string>&,std::map<std::string,std::string>& ,std::set<std::string>&,std::list<std::string>) |
utf16() | 22 | TestPreprocessor.utf16() |
simplifyMathExpressions() | 21 | Tokenizer.simplifyMathExpressions() |
checkGlobalAndLocalVariable() | 21 | CheckBufferOverrun.checkGlobalAndLocalVariable() |
simplifycode(Token*) | 21 | CheckMemoryLeakInFunction.simplifycode(Token*) |
handleIncludes(std::string&,conststd::string&,conststd::list <std::string>&) | 21 | Preprocessor.handleIncludes(std::string&,conststd::string& ,conststd::list<std::string>&) |
check_internal(CppCheck&,int,constchar*const*) | 21 | CppCheckExecutor.check_internal(CppCheck&,int,constchar*const*) |
check_internal(CppCheck&,int,constchar*const*) | 21 | CppCheckExecutor.check_internal(CppCheck&,int,constchar*const*) |
eraseDeadCode(Token*,constToken*) | 20 | Tokenizer.eraseDeadCode(Token*,constToken*) |
constructors() | 20 | CheckClass.constructors() |
call_func(constToken*,std::list<constToken*>,constunsignedint ,CheckMemoryLeak::AllocType&,CheckMemoryLeak::AllocType&,bool& ,unsignedint) | 20 | CheckMemoryLeakInFunction.call_func(constToken*,std::list<constToken*> ,constunsignedint,CheckMemoryLeak::AllocType& ,CheckMemoryLeak::AllocType&,bool&,unsignedint) |
isVariableUsage(constToken*,bool,CheckUninitVar::Alloc) | 20 | CheckUninitVar.isVariableUsage(constToken*,bool,CheckUninitVar::Alloc) |
mismatchingContainers() | 20 | CheckStl.mismatchingContainers() |
useDefaultArgumentValues(conststd::list<Token*>&,std::list<Token*>*) | 20 | TemplateSimplifier.useDefaultArgumentValues(conststd::list<Token*>& ,std::list<Token*>*) |
functioncalllibrary() | 20 | TestNullPointer.functioncalllibrary() |
variable(constScope*,constToken*) | 19 | CheckMemoryLeakInClass.variable(constScope*,constToken*) |
checkScope(constToken*,std::list<ExecutionPath*>&) | 19 | ExecutionPath.checkScope(constToken*,std::list<ExecutionPath*>&) |
processFile(conststd::string&,std::istream&) | 19 | CppCheck.processFile(conststd::string&,std::istream&) |
checkFunctionParameter(constToken&,constunsignedint ,constCheckBufferOverrun::ArrayInfo&,conststd::list<constToken*>&) | 18 | CheckBufferOverrun.checkFunctionParameter(constToken&,constunsignedint ,constCheckBufferOverrun::ArrayInfo&,conststd::list<constToken*>&) |
sizeof18() | 18 | TestSimplifyTokens.sizeof18() |
simplifySizeof() | 17 | Tokenizer.simplifySizeof() |
addClassFunction(Scope**,constToken**,constToken*) | 17 | SymbolDatabase.addClassFunction(Scope**,constToken**,constToken*) |
isVariableStlType() | 17 | TestSymbolDatabase.isVariableStlType() |
matchNumeric() | 17 | TestToken.matchNumeric() |
simplifyNamespaceStd() | 17 | TestTokenizer.simplifyNamespaceStd() |
simplifyTokenList1(constchar*) | 16 | Tokenizer.simplifyTokenList1(constchar*) |
simplifyVarDecl(Token*,Token*,bool) | 16 | Tokenizer.simplifyVarDecl(Token*,Token*,bool) |
valueFlowCheckArrayIndex(constToken*const ,constCheckBufferOverrun::ArrayInfo&) | 16 | CheckBufferOverrun.valueFlowCheckArrayIndex(constToken*const ,constCheckBufferOverrun::ArrayInfo&) |
oppositeInnerCondition() | 16 | CheckCondition.oppositeInnerCondition() |
enum15() | 16 | TestSimplifyTokens.enum15() |
Statistics
Stat | # Variables |
---|---|
Sum: | 2 488 |
Average: | 30.34 |
Minimum: | 16 |
Maximum: | 108 |
Standard deviation: | 16.31 |
Variance: | 265.98 |
Rule warning: Types with too many methods |
• How to Fix Violations: To refactor such type and increase code quality and maintainability, certainly you'll have to split the type into several smaller types that together, implement the same logic. To refactor a God Class you'll need patience, and you might even need to recreate everything from scratch. Here are a few advices: • Think before pulling out methods: What responsibility does it have? Can you isolate some subsets of methods that operate on the same subsets of fields? • Try to maintain the interface of the god class at first and delegate calls to the new extracted classes. In the end the god class should be a pure facade without own logic. Then you can keep it for convenience or throw it away and start to use the new classes only. • Unit Tests can help: write tests for each method before extracting it to ensure you don't break functionality.
65 types matched
types | InstanceMethods | StaticMethods | Full Name |
---|---|---|---|
TestTokenizer | 386 methods | 1 method | TestTokenizer |
TestPreprocessor | 189 methods | 0 method | TestPreprocessor |
TestSimplifyTokens | 182 methods | 0 method | TestSimplifyTokens |
TestMemleakInFunction | 163 methods | 1 method | TestMemleakInFunction |
TestClass | 156 methods | 0 method | TestClass |
Tokenizer | 141 methods | 11 methods | Tokenizer |
TestSymbolDatabase | 149 methods | 2 methods | TestSymbolDatabase |
TestBufferOverrun | 144 methods | 0 method | TestBufferOverrun |
Token | 119 methods | 21 methods | Token |
TestVarID | 132 methods | 0 method | TestVarID |
TestSimplifyTypedef | 128 methods | 0 method | TestSimplifyTypedef |
TestUnusedVar | 125 methods | 0 method | TestUnusedVar |
TestConstructors | 124 methods | 0 method | TestConstructors |
TestOther | 117 methods | 0 method | TestOther |
CheckOther | 100 methods | 2 methods | CheckOther |
TestCmdlineParser | 100 methods | 0 method | TestCmdlineParser |
TestStl | 85 methods | 0 method | TestStl |
TestSimplifyTemplate | 71 methods | 0 method | TestSimplifyTemplate |
CheckClass | 61 methods | 9 methods | CheckClass |
TestLeakAutoVar | 60 methods | 0 method | TestLeakAutoVar |
Library | 49 methods | 3 methods | Library |
Function | 51 methods | 1 method | Function |
XMLElement | 51 methods | 1 method | tinyxml2.XMLElement |
TestGarbage | 52 methods | 0 method | TestGarbage |
TestNullPointer | 52 methods | 0 method | TestNullPointer |
TestToken | 51 methods | 1 method | TestToken |
CheckStl | 49 methods | 1 method | CheckStl |
XMLNode | 48 methods | 1 method | tinyxml2.XMLNode |
TestAutoVariables | 46 methods | 0 method | TestAutoVariables |
TestUninitVar | 46 methods | 0 method | TestUninitVar |
Variable | 45 methods | 0 method | Variable |
CheckBufferOverrun | 40 methods | 3 methods | CheckBufferOverrun |
MathLib | 3 methods | 32 methods | MathLib |
CheckIO | 33 methods | 2 methods | CheckIO |
XMLPrinter | 35 methods | 0 method | tinyxml2.XMLPrinter |
TestMemleakInClass | 35 methods | 0 method | TestMemleakInClass |
TestUnusedPrivateFunction | 35 methods | 0 method | TestUnusedPrivateFunction |
XMLDocument | 34 methods | 0 method | tinyxml2.XMLDocument |
Preprocessor | 20 methods | 13 methods | Preprocessor |
TestValueFlow | 33 methods | 0 method | TestValueFlow |
TestPathMatch | 31 methods | 0 method | TestPathMatch |
TestMathLib | 30 methods | 0 method | TestMathLib |
CheckBool | 28 methods | 1 method | CheckBool |
TestCondition | 29 methods | 0 method | TestCondition |
TestBool | 28 methods | 0 method | TestBool |
CheckAutoVariables | 21 methods | 6 methods | CheckAutoVariables |
CheckCondition | 26 methods | 1 method | CheckCondition |
CheckUninitVar | 25 methods | 2 methods | CheckUninitVar |
TestUnusedFunctions | 27 methods | 0 method | TestUnusedFunctions |
CheckSizeof | 25 methods | 1 method | CheckSizeof |
CppCheck | 23 methods | 3 methods | CppCheck |
TestIO | 26 methods | 0 method | TestIO |
SymbolDatabase | 24 methods | 1 method | SymbolDatabase |
TestErrorLogger | 25 methods | 0 method | TestErrorLogger |
TestMemleakStructMember | 24 methods | 0 method | TestMemleakStructMember |
Scope | 23 methods | 0 method | Scope |
UninitVar | 8 methods | 15 methods | UninitVar |
Variables | 23 methods | 0 method | Variables |
XMLAttribute | 23 methods | 0 method | tinyxml2.XMLAttribute |
TestFixture | 22 methods | 1 method | TestFixture |
TestIncompleteStatement | 23 methods | 0 method | TestIncompleteStatement |
TokenList | 20 methods | 2 methods | TokenList |
TestExceptionSafety | 22 methods | 0 method | TestExceptionSafety |
CheckString | 20 methods | 1 method | CheckString |
TestObsoleteFunctions | 21 methods | 0 method | TestObsoleteFunctions |
Statistics
Stat | InstanceMethods | StaticMethods |
---|---|---|
Sum: | 0 | 0 |
Average: | 0 | 0 |
Minimum: | 0 | 0 |
Maximum: | 0 | 0 |
Standard deviation: | 0 | 0 |
Variance: | 0 | 0 |
Rule warning: Types with too many fields |
• How to Fix Violations: To refactor such type and increase code quality and maintainability, certainly you'll have to group subsets of fields into smaller types and dispatch the logic implemented into the methods into these smaller types.
2 types matched
types | InstanceFields | StaticFields | Full Name |
---|---|---|---|
Settings | 51 fields | 0 field | Settings |
Library | 27 fields | 0 field | Library |
Statistics
Stat | InstanceFields | StaticFields |
---|---|---|
Sum: | 0 | 0 |
Average: | 0 | 0 |
Minimum: | 0 | 0 |
Maximum: | 0 | 0 |
Standard deviation: | 0 | 0 |
Variance: | 0 | 0 |
Rule warning: Types with poor cohesion |
• How to Fix Violations: To refactor a poorly cohesive type and increase code quality and maintainability, certainly you'll have to split the type into several smaller and more cohesive types that together, implement the same logic.
8 types matched
types | Lack of Cohesion Of Methods (LCOM) | LCOM Henderson-Sellers (LCOMHS) | # Methods | # Fields | Full Name |
---|---|---|---|---|---|
Library | 0.95 | 0.97 | 55 | 27 | Library |
Function | 0.95 | 0.97 | 55 | 15 | Function |
Token | 0.94 | 0.95 | 143 | 17 | Token |
Settings | 0.92 | 1.01 | 17 | 51 | Settings |
XMLDocument | 0.88 | 0.91 | 36 | 12 | tinyxml2.XMLDocument |
XMLPrinter | 0.87 | 0.9 | 37 | 11 | tinyxml2.XMLPrinter |
TestFixture | 0.86 | 0.9 | 25 | 12 | TestFixture |
Scope | 0.86 | 0.9 | 27 | 18 | Scope |
Statistics
Stat | Lack of Cohesion Of Methods (LCOM) | LCOM Henderson-Sellers (LCOMHS) | # Methods | # Fields |
---|---|---|---|---|
Sum: | 7.24 | 7.5 | 395 | 163 |
Average: | 0.9 | 0.94 | 49.38 | 20.38 |
Minimum: | 0.86 | 0.9 | 17 | 11 |
Maximum: | 0.95 | 1.01 | 143 | 51 |
Standard deviation: | 0.038 | 0.04 | 37.59 | 12.53 |
Variance: | 0.0014 | 0.0016 | 1 412 | 156.98 |
Object Oriented Design | 240 |
|
Rule warning: Base class should not use derivatives |
• How to Fix Violations: Understand the need for using derivatives, then imagine a new design, and then refactor. Typically an algorithm in the base class needs to access something from derived classes. You can try to encapsulate this access behind an abstract or a virtual method. If you see in the base class some conditions on typeof(DerivedClass) not only urgent refactoring is needed. Such condition can easily be replaced through an abstract or a virtual method. Sometime you'll see a base class that creates instance of some derived classes. In such situation, certainly using the factory method pattern http://en.wikipedia.org/wiki/Factory_method_pattern or the abstract factory pattern http://en.wikipedia.org/wiki/Abstract_factory_pattern will improve the design.
1 types matched
type | derivedClassesUsed | Full Name |
---|---|---|
XMLNode | 6 types | tinyxml2.XMLNode |
Statistics
Stat | derivedClassesUsed |
---|---|
Sum: | 0 |
Average: | 0 |
Minimum: | 0 |
Maximum: | 0 |
Standard deviation: | 0 |
Variance: | 0 |
Rule warning: Constructor should not call a virtual methods |
// Returns constructor of a non-sealed type calling virtual methods.
// In such a situation, if a derived class overrides the method,
// then the override method will be called before the derived constructor.
// This makes the class fragile to derive from.
//
// Violations reported can be solved by re-designing object initialisation
// or by marking the parent class as sealed, if possible.
warnif count > 0
from t in Application.Types where
t.IsClass &&
!t.IsGeneratedByCompiler
from ctor in t.Constructors
let virtualMethodsCalled = from mCalled in ctor.MethodsCalled
where mCalled.IsVirtual &&
(mCalled.ParentType == t ||
t.DeriveFrom(mCalled.ParentType))
select mCalled
where virtualMethodsCalled.Count() > 0
select new { ctor ,
virtualMethodsCalled,
// If there is no derived type, it might be
// an opportunity to mark t as sealed.
t.DerivedTypes }
1 methods matched
method | virtualMethodsCalled | DerivedTypes | Full Name |
---|---|---|---|
SymbolDatabase(constTokenizer*,constSettings*,ErrorLogger*) | 1 method | 0 type | SymbolDatabase.SymbolDatabase(constTokenizer*,constSettings* ,ErrorLogger*) |
Statistics
Stat | virtualMethodsCalled | DerivedTypes |
---|---|---|
Sum: | 0 | 0 |
Average: | 0 | 0 |
Minimum: | 0 | 0 |
Maximum: | 0 | 0 |
Standard deviation: | 0 | 0 |
Variance: | 0 | 0 |
Rule warning: Don't assign static fields from instance methods |
• How to Fix Violations: If the static field is just assigned once in the program lifetime, make sure to declare it as readonly and assign it inline, or from the static constructor. In Object-Oriented-Programming the natural artifact to hold states that can be modified is instance fields. Hence to fix violations of this rule, make sure to hold assignable states through instance fields, not through static fields.
3 fields matched
fields | assignedBy | Full Name |
---|---|---|
macroChar | 5 methods | Preprocessor.macroChar |
missingIncludeFlag | 5 methods | Preprocessor.missingIncludeFlag |
missingSystemIncludeFlag | 3 methods | Preprocessor.missingSystemIncludeFlag |
Statistics
Stat | assignedBy |
---|---|
Sum: | 0 |
Average: | 0 |
Minimum: | 0 |
Maximum: | 0 |
Standard deviation: | 0 |
Variance: | 0 |
Rule warning: Avoid Abstract Classes with too many methods |
// An abstract class should abstract a clear and well-defined concept.
// Such concept shoudln't be represented with too many methods and property getter.
warnif count > 0 from t in JustMyCode.Types where
t.IsAbstract
let methodsAndGetters = t.Methods
where methodsAndGetters.Count() > 10
select new { t, methodsAndGetters }
4 types matched
types | methodsAndGetters | Full Name |
---|---|---|
Check | 16 methods | Check |
ExecutionPath | 13 methods | ExecutionPath |
XMLNode | 49 methods | tinyxml2.XMLNode |
TestFixture | 23 methods | TestFixture |
Statistics
Stat | methodsAndGetters |
---|---|
Sum: | 0 |
Average: | 0 |
Minimum: | 0 |
Maximum: | 0 |
Standard deviation: | 0 |
Variance: | 0 |
Design | 110 |
|
Rule warning: Nested types should not be visible |
warnif count > 0 from t in JustMyCode.Types where
t.IsNested &&
!t.IsGeneratedByCompiler &&
!t.IsPrivate
select new { t, t.NbLinesOfCode, t.Visibility }
// A nested type is a type declared within the
// scope of another type. Nested types are useful
// for encapsulating private implementation details
// of the containing type. Used for this purpose,
// nested types should not be externally visible.
// Do not use externally visible nested types for
// logical grouping or to avoid name collisions;
// instead, use namespaces.
46 types matched
types | # lines of code (LOC) | Visibility | Full Name |
---|---|---|---|
Token+Type | N/A | Public | Token+Type |
Suppressions+SuppressionEntry | 3 | Public | Suppressions+SuppressionEntry |
InternalError+Type | N/A | Public | InternalError+Type |
Severity+SeverityType | N/A | Public | Severity+SeverityType |
ErrorLogger+ErrorMessage | 171 | Public | ErrorLogger+ErrorMessage |
ErrorLogger+ErrorMessage+FileLocation | 17 | Public | ErrorLogger+ErrorMessage+FileLocation |
Library+ErrorCode | N/A | Public | Library+ErrorCode |
Library+Error | 6 | Public | Library+Error |
Library+Container | 12 | Public | Library+Container |
Library+Container+Action | N/A | Public | Library+Container+Action |
Library+Container+Yield | N/A | Public | Library+Container+Yield |
Library+Container+Function | 0 | Public | Library+Container+Function |
Library+ArgumentChecks | 5 | Public | Library+ArgumentChecks |
Library+ArgumentChecks+MinSize | 3 | Public | Library+ArgumentChecks+MinSize |
Library+ArgumentChecks+MinSize+Type | N/A | Public | Library+ArgumentChecks+MinSize+Type |
Library+PodType | 0 | Public | Library+PodType |
Library+PlatformType | 8 | Public | Library+PlatformType |
Library+Platform | 2 | Public | Library+Platform |
Settings+Language | N/A | Public | Settings+Language |
Settings+Rule | 3 | Public | Settings+Rule |
Settings+PlatformType | N/A | Public | Settings+PlatformType |
Check+FileInfo | 0 | Public | Check+FileInfo |
Type+NeedInitialization | N/A | Public | Type+NeedInitialization |
Type+BaseInfo | 5 | Public | Type+BaseInfo |
Type+FriendInfo | 3 | Public | Type+FriendInfo |
Function+Type | N/A | Public | Function+Type |
Scope+UsingInfo | 0 | Public | Scope+UsingInfo |
Scope+ScopeType | N/A | Public | Scope+ScopeType |
CheckBufferOverrun+ArrayInfo | 35 | Public | CheckBufferOverrun+ArrayInfo |
CheckBufferOverrun+MyFileInfo | 0 | Public | CheckBufferOverrun+MyFileInfo |
CheckBufferOverrun+MyFileInfo+ArrayUsage | 0 | Public | CheckBufferOverrun+MyFileInfo+ArrayUsage |
Filepointer+Operation | N/A | Public | Filepointer+Operation |
Filepointer+AppendMode | N/A | Public | Filepointer+AppendMode |
VarInfo+AllocStatus | N/A | Public | VarInfo+AllocStatus |
VarInfo+AllocInfo | 2 | Public | VarInfo+AllocInfo |
CheckMemoryLeak+AllocType | N/A | Public | CheckMemoryLeak+AllocType |
CheckUninitVar+Alloc | N/A | Public | CheckUninitVar+Alloc |
CheckUninitVar+MyFileInfo | 0 | Public | CheckUninitVar+MyFileInfo |
Variables+VariableType | N/A | Public | Variables+VariableType |
Variables+VariableUsage | 11 | Public | Variables+VariableUsage |
Variables+ScopeGuard | 4 | Public | Variables+ScopeGuard |
Preprocessor+HeaderTypes | N/A | Public | Preprocessor+HeaderTypes |
StrPair+AnonymousEnum | N/A | Public | tinyxml2.StrPair+AnonymousEnum |
MemPoolT<SIZE>+AnonymousEnum | N/A | Public | tinyxml2.MemPoolT<SIZE>+AnonymousEnum |
XMLElement+AnonymousEnum | N/A | Public | tinyxml2.XMLElement+AnonymousEnum |
TestPreprocessor+OurPreprocessor | 4 | Public | TestPreprocessor+OurPreprocessor |
Statistics
Stat | # lines of code (LOC) | Visibility |
---|---|---|
Sum: | 294 | 0 |
Average: | 12.25 | 0 |
Minimum: | 0 | 0 |
Maximum: | 171 | 0 |
Standard deviation: | 33.94 | 0 |
Variance: | 1 151 | 0 |
Architecture and Layering | 330 |
|
Rule warning: Avoid namespaces mutually dependent |
warnif count > 0
// Foreach pair of namespace mutually dependent, this rule lists pairs.
// The pair { first, second } is formatted to show that first namespace shouldn't use the second namespace.
// The first/second order is inferred from the number of types used by each other.
// The first namespace is using less types of the second.
// It means that the first namespace is certainly at a lower level in the architecture, than the second.
// To explore the coupling between the two namespaces, you can export:
// - typesOfFirstUsedBySecond to the vertical header of the dependency matrix
// - typesOfSecondUsedByFirst to the horizontal header of the dependency matrix
//
// Optimization: restreint application Projects set
// If some namespaces are mutually dependent
// - They must be declared in the same project
// - The parent project must ContainsNamespaceDependencyCycle
from project in Application.Projects.Where(a => a.ContainsNamespaceDependencyCycle != null && a.ContainsNamespaceDependencyCycle.Value)
// hashset is used to avoid reporting both A <-> B and B <-> A
let hashset = new HashSet<INamespace>()
// Optimization: restreint namespaces set
// If a namespace doesn't have a Level value, it must be in a dependency cycle
// or it must be using directly or indirectly a dependency cycle.
let namespacesSuspect = project.ChildNamespaces.Where(n => n.Level == null && n.Name!="")
from nA in namespacesSuspect
// Select namespaces mutually dependent with nA
let unused = hashset.Add(nA) // Populate hashset
let namespacesMutuallyDependentWith_nA = nA.NamespacesUsed.Using(nA)
.Except(hashset) // <-- avoid reporting both A <-> B and B <-> A
where namespacesMutuallyDependentWith_nA.Count() > 0
from nB in namespacesMutuallyDependentWith_nA
// nA and nB are mutually dependent
// Select first the one that shouldn't use the other.
// The first namespace is inferred from the fact that it is using less types of the second.
let typesOfBUsedByA = nB.ChildTypes.UsedBy(nA)
let typesOfAUsedByB = nA.ChildTypes.UsedBy(nB)
let first = (typesOfBUsedByA.Count() > typesOfAUsedByB.Count()) ? nB : nA
let second = (first == nA) ? nB : nA
let typesOfFirstUsedBySecond = (first == nA) ? typesOfAUsedByB : typesOfBUsedByA
let typesOfSecondUsedByFirst = (first == nA) ? typesOfBUsedByA : typesOfAUsedByB
where typesOfFirstUsedBySecond.Count()>0 && typesOfSecondUsedByFirst.Count()>0
select new { first, shouldntUse = second, typesOfFirstUsedBySecond, typesOfSecondUsedByFirst }
1 namespaces matched
namespace | shouldntUse | typesOfFirstUsedBySecond | typesOfSecondUsedByFirst | Full Name |
---|---|---|---|---|
ValueFlow | 1 type | 1 type | ValueFlow |
Statistics
Stat | shouldntUse | typesOfFirstUsedBySecond | typesOfSecondUsedByFirst |
---|---|---|---|
Sum: | 0 | 0 | 0 |
Average: | 0 | 0 | 0 |
Minimum: | 0 | 0 | 0 |
Maximum: | 0 | 0 | 0 |
Standard deviation: | 0 | 0 | 0 |
Variance: | 0 | 0 | 0 |
Rule warning: Avoid namespaces dependency cycles |
warnif count > 0
// This query lists all application namespaces dependency cyles.
// Each row shows a different cycle, prefixed with a namespace entangled in the cycle.
//
// To browse a cycle on the dependency graph or the dependency matrix, just right click
// a cycle cell and export namespaces matched to the dependency graph or matrix!
//
// In the matrix, dependency cycles are represented with red squares and black cells.
// To browse easily dependency cycles, the Matrix comes with the option:
// --> Display Direct and Indirect Dependencies
//
// Optimization: restreint application Projects set
// If some namespaces are mutually dependent
// - They must be declared in the same project
// - The parent project must ContainsNamespaceDependencyCycle
from project in Application.Projects
.Where(a => a.ContainsNamespaceDependencyCycle != null &&
a.ContainsNamespaceDependencyCycle.Value)
// Optimization: restreint namespaces set
// A namespace involved in a cycle necessarily have a null Level.
let namespacesSuspect = project.ChildNamespaces.Where(n => n.Level == null && n.Name!="")
// hashset is used to avoid iterating again on namespaces already caught in a cycle.
let hashset = new HashSet<INamespace>()
from suspect in namespacesSuspect
// By commenting this line, the query matches all namespaces involved in a cycle.
where !hashset.Contains(suspect)
// Define 2 code metrics
// - Namespaces depth of is using indirectly the suspect namespace.
// - Namespaces depth of is used by the suspect namespace indirectly.
// Note: for direct usage the depth is equal to 1.
let namespacesUserDepth = namespacesSuspect.DepthOfIsUsing(suspect)
let namespacesUsedDepth = namespacesSuspect.DepthOfIsUsedBy(suspect)
// Select namespaces that are both using and used by namespaceSuspect
let usersAndUsed = from n in namespacesSuspect where
namespacesUserDepth[n] > 0 &&
namespacesUsedDepth[n] > 0
select n
where usersAndUsed.Count() > 0
// Here we've found namespace(s) both using and used by the suspect namespace.
// A cycle involving the suspect namespace is found!
let cycle = usersAndUsed.Concat(new[] { suspect })
// Fill hashset with namespaces in the cycle.
// .ToArray() is needed to force the iterating process.
let unused1 = (from n in cycle let unused2 = hashset.Add(n) select n).ToArray()
select new { suspect, cycle }
1 namespaces matched
namespace | cycle | Full Name |
---|---|---|
tinyxml2 | 5 namespaces | tinyxml2 |
Statistics
Stat | cycle |
---|---|
Sum: | 0 |
Average: | 0 |
Minimum: | 0 |
Maximum: | 0 |
Standard deviation: | 0 |
Variance: | 0 |
Rule warning: Projects with poor cohesion (RelationalCohesion) |
warnif count > 0 from a in Application.Projects where
a.NbTypes > 20 && // Relational Cohesion metrics is relevant only if there are several types
(a.RelationalCohesion < 1.5 ||
a.RelationalCohesion > 4.0)
select new { a, a.NbTypes, a.RelationalCohesion }
// As classes inside an project should be strongly related,
// the cohesion should be high. On the other hand, a value
// which is too high may indicate over-coupling. A good range
// for RelationalCohesion is 1.5 to 4.0.
// See the definition of the RelationalCohesion metric here
// http://www.cppdepend.com/Metrics.aspx#RelationalCohesion
1 projects matched
project | # Types | Relational cohesion | Full Name |
---|---|---|---|
cppcheck | 179 | 5.07 | cppcheck |
Statistics
Stat | # Types | Relational cohesion |
---|---|---|
Sum: | 179 | 5.07 |
Average: | 179 | 5.07 |
Minimum: | 179 | 5.07 |
Maximum: | 179 | 5.07 |
Standard deviation: | 0 | 0 |
Variance: | 0 | 0 |
CppCheck Queries | 710 |
|
Rule warning: All CppCheck Violations |
warnif count>0
from issue in Issues where issue.ToolName=="CppCheck"
select new { issue,issue.FilePath,issue.BeginLine }
15 fields matched
fields | FilePath | BeginLine | Full Name |
---|---|---|---|
Skipping configuration '_WIN32=1;_MSC_VER=1800;_UNICODE=1;UNICODE=1;CP PCHECKLIB_EXPORT=1;TINYXML2_EXPORT=1;WIN32=1;_CRT_SECURE_NO_WARNINGS=1 ;WIN32_LEAN_AND_MEAN=1;%(PreprocessorDefinitions )=1;_MT=1;MAXTIME' since the value of 'MAXTIME' is unknown . Use -D if you want to check it. You can use -U to skip it explicitly . | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\tokenize.cpp | 1 | CppCheck.information.information .Skipping configuration '_WIN32=1;_MSC_VER=1800;_UNICODE=1;UNICODE=1;C PPCHECKLIB_EXPORT=1;TINYXML2_EXPORT=1;WIN32=1;_CRT_SECURE_NO_WARNINGS= 1;WIN32_LEAN_AND_MEAN=1;%(PreprocessorDefinitions )=1;_MT=1;MAXTIME' since the value of 'MAXTIME' is unknown . Use -D if you want to check it. You can use -U to skip it explicitly . |
Class 'XMLNode' has a constructor with 1 argument that is not explicit . | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\externals\tinyxml\tinyxml2.h | 873 | CppCheck.style.style .Class 'XMLNode' has a constructor with 1 argument that is not explici t. |
Class 'XMLComment' has a constructor with 1 argument that is not expli cit. | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\externals\tinyxml\tinyxml2.h | 964 | CppCheck.style.style .Class 'XMLComment' has a constructor with 1 argument that is not expl icit. |
Class 'XMLDeclaration' has a constructor with 1 argument that is not e xplicit. | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\externals\tinyxml\tinyxml2.h | 1 002 | CppCheck.style.style .Class 'XMLDeclaration' has a constructor with 1 argument that is not explicit. |
Class 'XMLUnknown' has a constructor with 1 argument that is not expli cit. | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\externals\tinyxml\tinyxml2.h | 1 034 | CppCheck.style.style .Class 'XMLUnknown' has a constructor with 1 argument that is not expl icit. |
Class 'XMLElement' has a constructor with 1 argument that is not expli cit. | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\externals\tinyxml\tinyxml2.h | 1 489 | CppCheck.style.style .Class 'XMLElement' has a constructor with 1 argument that is not expl icit. |
Skipping configuration '_WIN32=1;_MSC_VER=1800;_UNICODE=1;UNICODE=1;CP PCHECKLIB_EXPORT=1;TINYXML2_EXPORT=1;WIN32=1;_CRT_SECURE_NO_WARNINGS=1 ;WIN32_LEAN_AND_MEAN=1;%(PreprocessorDefinitions )=1;_MT=1;CFGDIR' since the value of 'CFGDIR' is unknown . Use -D if you want to check it. You can use -U to skip it explicitly . | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\library.cpp | 1 | CppCheck.information.information .Skipping configuration '_WIN32=1;_MSC_VER=1800;_UNICODE=1;UNICODE=1;C PPCHECKLIB_EXPORT=1;TINYXML2_EXPORT=1;WIN32=1;_CRT_SECURE_NO_WARNINGS= 1;WIN32_LEAN_AND_MEAN=1;%(PreprocessorDefinitions )=1;_MT=1;CFGDIR' since the value of 'CFGDIR' is unknown . Use -D if you want to check it. You can use -U to skip it explicitly . |
Memory is allocated but not initialized: block | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\externals\tinyxml\tinyxml2.h | 364 | CppCheck.error.error.Memory is allocated but not initialized: block |
Abstract class 'XMLNode' has a copy/move constructor that is not expli cit. | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\externals\tinyxml\tinyxml2.h | 875 | CppCheck.style.style .Abstract class 'XMLNode' has a copy/move constructor that is not expl icit. |
Class 'XMLText' has a constructor with 1 argument that is not explicit . | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\externals\tinyxml\tinyxml2.h | 935 | CppCheck.style.style .Class 'XMLText' has a constructor with 1 argument that is not explici t. |
Class 'XMLHandle' has a constructor with 1 argument that is not explic it. | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\externals\tinyxml\tinyxml2.h | 1 790 | CppCheck.style.style .Class 'XMLHandle' has a constructor with 1 argument that is not expli cit. |
Class 'XMLHandle' has a constructor with 1 argument that is not explic it. | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\externals\tinyxml\tinyxml2.h | 1 794 | CppCheck.style.style .Class 'XMLHandle' has a constructor with 1 argument that is not expli cit. |
Class 'XMLConstHandle' has a constructor with 1 argument that is not e xplicit. | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\externals\tinyxml\tinyxml2.h | 1 873 | CppCheck.style.style .Class 'XMLConstHandle' has a constructor with 1 argument that is not explicit. |
Class 'XMLConstHandle' has a constructor with 1 argument that is not e xplicit. | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\externals\tinyxml\tinyxml2.h | 1 876 | CppCheck.style.style .Class 'XMLConstHandle' has a constructor with 1 argument that is not explicit. |
Skipping configuration '_WIN32=1;_MSC_VER=1800;_UNICODE=1;UNICODE=1;CP PCHECKLIB_IMPORT=1;WIN32=1;_CRT_SECURE_NO_WARNINGS=1;WIN32_LEAN_AND_ME AN=1;%(PreprocessorDefinitions )=1;_MT=1;CFGDIR' since the value of 'CFGDIR' is unknown . Use -D if you want to check it. You can use -U to skip it explicitly . | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\cli\cppcheckexecutor.cpp | 1 | CppCheck.information.information .Skipping configuration '_WIN32=1;_MSC_VER=1800;_UNICODE=1;UNICODE=1;C PPCHECKLIB_IMPORT=1;WIN32=1;_CRT_SECURE_NO_WARNINGS=1;WIN32_LEAN_AND_M EAN=1;%(PreprocessorDefinitions )=1;_MT=1;CFGDIR' since the value of 'CFGDIR' is unknown . Use -D if you want to check it. You can use -U to skip it explicitly . |
Statistics
Stat | FilePath | BeginLine |
---|---|---|
Sum: | 0 | 14 872 |
Average: | 0 | 991.47 |
Minimum: | 0 | 1 |
Maximum: | 0 | 1 876 |
Standard deviation: | 0 | 656.2 |
Variance: | 0 | 430 600 |
Diagnostics Queries | 850 |
|
Rule warning: All diagnostics |
warnif count > 0
from issue in Issues where issue.ToolName=="Clang"
select new { issue,issue.FilePath,issue.BeginLine }
1,211 fields matched
fields | FilePath | BeginLine | Full Name |
---|---|---|---|
declaration requires an exit-time destructor | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\tokenize.cpp | 6 126 | Clang.diagnostic.diagnostic .declaration requires an exit-time destructor |
declaration requires a global destructor | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\tokenize.cpp | 6 126 | Clang.diagnostic.diagnostic.declaration requires a global destructor |
declaration requires an exit-time destructor | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\tokenize.cpp | 6 132 | Clang.diagnostic.diagnostic .declaration requires an exit-time destructor |
declaration requires a global destructor | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\tokenize.cpp | 6 132 | Clang.diagnostic.diagnostic.declaration requires a global destructor |
use of old-style cast | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\externals\tinyxml\tinyxml2.cpp | 33 | Clang.diagnostic.diagnostic.use of old-style cast |
use of old-style cast | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\externals\tinyxml\tinyxml2.cpp | 35 | Clang.diagnostic.diagnostic.use of old-style cast |
declaration requires an exit-time destructor | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\check64bit.cpp | 30 | Clang.diagnostic.diagnostic .declaration requires an exit-time destructor |
declaration requires a global destructor | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\check64bit.cpp | 30 | Clang.diagnostic.diagnostic.declaration requires a global destructor |
declaration requires an exit-time destructor | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkassert.cpp | 31 | Clang.diagnostic.diagnostic .declaration requires an exit-time destructor |
declaration requires a global destructor | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkassert.cpp | 31 | Clang.diagnostic.diagnostic.declaration requires a global destructor |
declaration requires an exit-time destructor | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkautovariables.cpp | 33 | Clang.diagnostic.diagnostic .declaration requires an exit-time destructor |
declaration requires a global destructor | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkautovariables.cpp | 33 | Clang.diagnostic.diagnostic.declaration requires a global destructor |
declaration requires an exit-time destructor | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkbool.cpp | 28 | Clang.diagnostic.diagnostic .declaration requires an exit-time destructor |
declaration requires a global destructor | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkbool.cpp | 28 | Clang.diagnostic.diagnostic.declaration requires a global destructor |
declaration requires an exit-time destructor | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkboost.cpp | 24 | Clang.diagnostic.diagnostic .declaration requires an exit-time destructor |
declaration requires a global destructor | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkboost.cpp | 24 | Clang.diagnostic.diagnostic.declaration requires a global destructor |
declaration requires an exit-time destructor | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkbufferoverrun.cpp | 39 | Clang.diagnostic.diagnostic .declaration requires an exit-time destructor |
declaration requires a global destructor | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkbufferoverrun.cpp | 39 | Clang.diagnostic.diagnostic.declaration requires a global destructor |
declaration requires an exit-time destructor | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkclass.cpp | 35 | Clang.diagnostic.diagnostic .declaration requires an exit-time destructor |
declaration requires a global destructor | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkclass.cpp | 35 | Clang.diagnostic.diagnostic.declaration requires a global destructor |
declaration requires an exit-time destructor | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkcondition.cpp | 31 | Clang.diagnostic.diagnostic .declaration requires an exit-time destructor |
declaration requires a global destructor | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkcondition.cpp | 31 | Clang.diagnostic.diagnostic.declaration requires a global destructor |
declaration requires an exit-time destructor | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkstring.cpp | 28 | Clang.diagnostic.diagnostic .declaration requires an exit-time destructor |
declaration requires a global destructor | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkstring.cpp | 28 | Clang.diagnostic.diagnostic.declaration requires a global destructor |
declaration requires an exit-time destructor | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkexceptionsafety.cpp | 27 | Clang.diagnostic.diagnostic .declaration requires an exit-time destructor |
declaration requires a global destructor | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkexceptionsafety.cpp | 27 | Clang.diagnostic.diagnostic.declaration requires a global destructor |
declaration requires an exit-time destructor | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkio.cpp | 32 | Clang.diagnostic.diagnostic .declaration requires an exit-time destructor |
declaration requires a global destructor | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkio.cpp | 32 | Clang.diagnostic.diagnostic.declaration requires a global destructor |
declaration requires an exit-time destructor | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkleakautovar.cpp | 33 | Clang.diagnostic.diagnostic .declaration requires an exit-time destructor |
declaration requires a global destructor | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkleakautovar.cpp | 33 | Clang.diagnostic.diagnostic.declaration requires a global destructor |
declaration requires an exit-time destructor | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkmemoryleak.cpp | 34 | Clang.diagnostic.diagnostic .declaration requires an exit-time destructor |
declaration requires a global destructor | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkmemoryleak.cpp | 34 | Clang.diagnostic.diagnostic.declaration requires a global destructor |
declaration requires an exit-time destructor | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkmemoryleak.cpp | 35 | Clang.diagnostic.diagnostic .declaration requires an exit-time destructor |
declaration requires a global destructor | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkmemoryleak.cpp | 35 | Clang.diagnostic.diagnostic.declaration requires a global destructor |
declaration requires an exit-time destructor | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkmemoryleak.cpp | 36 | Clang.diagnostic.diagnostic .declaration requires an exit-time destructor |
declaration requires a global destructor | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkmemoryleak.cpp | 36 | Clang.diagnostic.diagnostic.declaration requires a global destructor |
declaration requires an exit-time destructor | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkmemoryleak.cpp | 37 | Clang.diagnostic.diagnostic .declaration requires an exit-time destructor |
declaration requires a global destructor | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkmemoryleak.cpp | 37 | Clang.diagnostic.diagnostic.declaration requires a global destructor |
declaration requires an exit-time destructor | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checknonreentrantfunctions.cpp | 31 | Clang.diagnostic.diagnostic .declaration requires an exit-time destructor |
declaration requires a global destructor | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checknonreentrantfunctions.cpp | 31 | Clang.diagnostic.diagnostic.declaration requires a global destructor |
declaration requires an exit-time destructor | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checknullpointer.cpp | 29 | Clang.diagnostic.diagnostic .declaration requires an exit-time destructor |
declaration requires a global destructor | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checknullpointer.cpp | 29 | Clang.diagnostic.diagnostic.declaration requires a global destructor |
declaration requires an exit-time destructor | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkobsolescentfunctions.cpp | 31 | Clang.diagnostic.diagnostic .declaration requires an exit-time destructor |
declaration requires a global destructor | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkobsolescentfunctions.cpp | 31 | Clang.diagnostic.diagnostic.declaration requires a global destructor |
declaration requires an exit-time destructor | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkother.cpp | 32 | Clang.diagnostic.diagnostic .declaration requires an exit-time destructor |
declaration requires a global destructor | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkother.cpp | 32 | Clang.diagnostic.diagnostic.declaration requires a global destructor |
declaration requires an exit-time destructor | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkpostfixoperator.cpp | 32 | Clang.diagnostic.diagnostic .declaration requires an exit-time destructor |
declaration requires a global destructor | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkpostfixoperator.cpp | 32 | Clang.diagnostic.diagnostic.declaration requires a global destructor |
declaration requires an exit-time destructor | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checksizeof.cpp | 29 | Clang.diagnostic.diagnostic .declaration requires an exit-time destructor |
declaration requires a global destructor | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checksizeof.cpp | 29 | Clang.diagnostic.diagnostic.declaration requires a global destructor |
declaration requires an exit-time destructor | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkstl.cpp | 27 | Clang.diagnostic.diagnostic .declaration requires an exit-time destructor |
declaration requires a global destructor | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkstl.cpp | 27 | Clang.diagnostic.diagnostic.declaration requires a global destructor |
declaration requires an exit-time destructor | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checktype.cpp | 30 | Clang.diagnostic.diagnostic .declaration requires an exit-time destructor |
declaration requires a global destructor | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checktype.cpp | 30 | Clang.diagnostic.diagnostic.declaration requires a global destructor |
declaration requires an exit-time destructor | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkuninitvar.cpp | 34 | Clang.diagnostic.diagnostic .declaration requires an exit-time destructor |
declaration requires a global destructor | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkuninitvar.cpp | 34 | Clang.diagnostic.diagnostic.declaration requires a global destructor |
declaration requires an exit-time destructor | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkunusedfunctions.cpp | 31 | Clang.diagnostic.diagnostic .declaration requires an exit-time destructor |
declaration requires a global destructor | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkunusedfunctions.cpp | 31 | Clang.diagnostic.diagnostic.declaration requires a global destructor |
declaration requires an exit-time destructor | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkunusedvar.cpp | 30 | Clang.diagnostic.diagnostic .declaration requires an exit-time destructor |
declaration requires a global destructor | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkunusedvar.cpp | 30 | Clang.diagnostic.diagnostic.declaration requires a global destructor |
declaration requires an exit-time destructor | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkvaarg.cpp | 26 | Clang.diagnostic.diagnostic .declaration requires an exit-time destructor |
declaration requires a global destructor | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkvaarg.cpp | 26 | Clang.diagnostic.diagnostic.declaration requires a global destructor |
declaration requires an exit-time destructor | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\cppcheck.cpp | 41 | Clang.diagnostic.diagnostic .declaration requires an exit-time destructor |
declaration requires a global destructor | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\cppcheck.cpp | 41 | Clang.diagnostic.diagnostic.declaration requires a global destructor |
'nullptr' is incompatible with C++98 | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkautovariables.cpp | 86 | Clang.diagnostic.diagnostic.'nullptr' is incompatible with C++98 |
'nullptr' is incompatible with C++98 | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkbufferoverrun.cpp | 287 | Clang.diagnostic.diagnostic.'nullptr' is incompatible with C++98 |
use of old-style cast | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkbufferoverrun.cpp | 307 | Clang.diagnostic.diagnostic.use of old-style cast |
use of old-style cast | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkbufferoverrun.cpp | 316 | Clang.diagnostic.diagnostic.use of old-style cast |
'nullptr' is incompatible with C++98 | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkbufferoverrun.cpp | 325 | Clang.diagnostic.diagnostic.'nullptr' is incompatible with C++98 |
'nullptr' is incompatible with C++98 | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkbufferoverrun.cpp | 329 | Clang.diagnostic.diagnostic.'nullptr' is incompatible with C++98 |
use of old-style cast | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkcondition.cpp | 557 | Clang.diagnostic.diagnostic.use of old-style cast |
use of old-style cast | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkcondition.cpp | 558 | Clang.diagnostic.diagnostic.use of old-style cast |
use of old-style cast | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkcondition.cpp | 559 | Clang.diagnostic.diagnostic.use of old-style cast |
use of old-style cast | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkcondition.cpp | 560 | Clang.diagnostic.diagnostic.use of old-style cast |
use of old-style cast | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkcondition.cpp | 561 | Clang.diagnostic.diagnostic.use of old-style cast |
use of old-style cast | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkcondition.cpp | 562 | Clang.diagnostic.diagnostic.use of old-style cast |
use of old-style cast | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkcondition.cpp | 568 | Clang.diagnostic.diagnostic.use of old-style cast |
use of old-style cast | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkcondition.cpp | 573 | Clang.diagnostic.diagnostic.use of old-style cast |
use of old-style cast | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkcondition.cpp | 574 | Clang.diagnostic.diagnostic.use of old-style cast |
use of old-style cast | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkcondition.cpp | 575 | Clang.diagnostic.diagnostic.use of old-style cast |
use of old-style cast | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkcondition.cpp | 576 | Clang.diagnostic.diagnostic.use of old-style cast |
use of old-style cast | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkcondition.cpp | 577 | Clang.diagnostic.diagnostic.use of old-style cast |
use of old-style cast | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkcondition.cpp | 578 | Clang.diagnostic.diagnostic.use of old-style cast |
'nullptr' is incompatible with C++98 | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkexceptionsafety.cpp | 194 | Clang.diagnostic.diagnostic.'nullptr' is incompatible with C++98 |
'nullptr' is incompatible with C++98 | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkexceptionsafety.cpp | 197 | Clang.diagnostic.diagnostic.'nullptr' is incompatible with C++98 |
'nullptr' is incompatible with C++98 | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkexceptionsafety.cpp | 221 | Clang.diagnostic.diagnostic.'nullptr' is incompatible with C++98 |
'nullptr' is incompatible with C++98 | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkio.cpp | 491 | Clang.diagnostic.diagnostic.'nullptr' is incompatible with C++98 |
'nullptr' is incompatible with C++98 | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkmemoryleak.cpp | 51 | Clang.diagnostic.diagnostic.'nullptr' is incompatible with C++98 |
'nullptr' is incompatible with C++98 | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkother.cpp | 82 | Clang.diagnostic.diagnostic.'nullptr' is incompatible with C++98 |
'nullptr' is incompatible with C++98 | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkother.cpp | 84 | Clang.diagnostic.diagnostic.'nullptr' is incompatible with C++98 |
'long long' is incompatible with C++98 | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checktype.cpp | 51 | Clang.diagnostic.diagnostic.'long long' is incompatible with C++98 |
use of old-style cast | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\errorlogger.cpp | 240 | Clang.diagnostic.diagnostic.use of old-style cast |
use of old-style cast | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\preprocessor.cpp | 65 | Clang.diagnostic.diagnostic.use of old-style cast |
use of old-style cast | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\preprocessor.cpp | 70 | Clang.diagnostic.diagnostic.use of old-style cast |
use of old-style cast | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\preprocessor.cpp | 72 | Clang.diagnostic.diagnostic.use of old-style cast |
use of old-style cast | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\preprocessor.cpp | 78 | Clang.diagnostic.diagnostic.use of old-style cast |
'nullptr' is incompatible with C++98 | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\preprocessor.cpp | 1 150 | Clang.diagnostic.diagnostic.'nullptr' is incompatible with C++98 |
'nullptr' is incompatible with C++98 | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\preprocessor.cpp | 1 181 | Clang.diagnostic.diagnostic.'nullptr' is incompatible with C++98 |
use of old-style cast | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\preprocessor.cpp | 2 514 | Clang.diagnostic.diagnostic.use of old-style cast |
use of old-style cast | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\preprocessor.cpp | 2 829 | Clang.diagnostic.diagnostic.use of old-style cast |
Statistics
Stat | FilePath | BeginLine |
---|---|---|
Sum: | 0 | 2 096 159 |
Average: | 0 | 1 730 |
Minimum: | 0 | 21 |
Maximum: | 0 | 9 988 |
Standard deviation: | 0 | 1 991 |
Variance: | 0 | 3 965 606 |
Rule warning: Cast issues |
warnif count > 0
from issue in Issues where issue.ToolName=="Clang" && issue.Type.Contains("cast")
select new { issue,issue.FilePath,issue.BeginLine }
293 fields matched
fields | FilePath | BeginLine | Full Name |
---|---|---|---|
use of old-style cast | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\externals\tinyxml\tinyxml2.cpp | 33 | Clang.diagnostic.diagnostic.use of old-style cast |
use of old-style cast | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\externals\tinyxml\tinyxml2.cpp | 35 | Clang.diagnostic.diagnostic.use of old-style cast |
use of old-style cast | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkbufferoverrun.cpp | 307 | Clang.diagnostic.diagnostic.use of old-style cast |
use of old-style cast | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkbufferoverrun.cpp | 316 | Clang.diagnostic.diagnostic.use of old-style cast |
use of old-style cast | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkcondition.cpp | 557 | Clang.diagnostic.diagnostic.use of old-style cast |
use of old-style cast | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkcondition.cpp | 558 | Clang.diagnostic.diagnostic.use of old-style cast |
use of old-style cast | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkcondition.cpp | 559 | Clang.diagnostic.diagnostic.use of old-style cast |
use of old-style cast | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkcondition.cpp | 560 | Clang.diagnostic.diagnostic.use of old-style cast |
use of old-style cast | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkcondition.cpp | 561 | Clang.diagnostic.diagnostic.use of old-style cast |
use of old-style cast | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkcondition.cpp | 562 | Clang.diagnostic.diagnostic.use of old-style cast |
use of old-style cast | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkcondition.cpp | 568 | Clang.diagnostic.diagnostic.use of old-style cast |
use of old-style cast | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkcondition.cpp | 573 | Clang.diagnostic.diagnostic.use of old-style cast |
use of old-style cast | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkcondition.cpp | 574 | Clang.diagnostic.diagnostic.use of old-style cast |
use of old-style cast | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkcondition.cpp | 575 | Clang.diagnostic.diagnostic.use of old-style cast |
use of old-style cast | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkcondition.cpp | 576 | Clang.diagnostic.diagnostic.use of old-style cast |
use of old-style cast | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkcondition.cpp | 577 | Clang.diagnostic.diagnostic.use of old-style cast |
use of old-style cast | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkcondition.cpp | 578 | Clang.diagnostic.diagnostic.use of old-style cast |
use of old-style cast | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\errorlogger.cpp | 240 | Clang.diagnostic.diagnostic.use of old-style cast |
use of old-style cast | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\preprocessor.cpp | 65 | Clang.diagnostic.diagnostic.use of old-style cast |
use of old-style cast | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\preprocessor.cpp | 70 | Clang.diagnostic.diagnostic.use of old-style cast |
use of old-style cast | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\preprocessor.cpp | 72 | Clang.diagnostic.diagnostic.use of old-style cast |
use of old-style cast | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\preprocessor.cpp | 78 | Clang.diagnostic.diagnostic.use of old-style cast |
use of old-style cast | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\preprocessor.cpp | 2 514 | Clang.diagnostic.diagnostic.use of old-style cast |
use of old-style cast | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\preprocessor.cpp | 2 829 | Clang.diagnostic.diagnostic.use of old-style cast |
use of old-style cast | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\preprocessor.cpp | 2 835 | Clang.diagnostic.diagnostic.use of old-style cast |
use of old-style cast | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\preprocessor.cpp | 2 841 | Clang.diagnostic.diagnostic.use of old-style cast |
use of old-style cast | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\valueflow.cpp | 1 433 | Clang.diagnostic.diagnostic.use of old-style cast |
use of old-style cast | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\valueflow.cpp | 1 435 | Clang.diagnostic.diagnostic.use of old-style cast |
implicit conversion loses integer precision: 'MathLib::bigint' (aka 'long long') to 'size_type' (aka 'unsigned int') | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\valueflow.cpp | 1 434 | Clang.diagnostic.diagnostic .implicit conversion loses integer precision: 'MathLib::bigint' (aka 'long long') to 'size_type' (aka 'unsigned int') |
implicit conversion changes signedness: 'unsigned int' to 'int' | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\valueflow.cpp | 78 | Clang.diagnostic.diagnostic .implicit conversion changes signedness: 'unsigned int' to 'int' |
implicit conversion loses integer precision: 'const MathLib::bigint' (aka 'const long long') to 'size_type' (aka 'unsigned int') | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\valueflow.cpp | 391 | Clang.diagnostic.diagnostic .implicit conversion loses integer precision: 'const MathLib::bigint' (aka 'const long long') to 'size_type' (aka 'unsigned int') |
use of old-style cast | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\mathlib.cpp | 95 | Clang.diagnostic.diagnostic.use of old-style cast |
use of old-style cast | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\mathlib.cpp | 124 | Clang.diagnostic.diagnostic.use of old-style cast |
use of old-style cast | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\mathlib.cpp | 126 | Clang.diagnostic.diagnostic.use of old-style cast |
use of old-style cast | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\mathlib.cpp | 41 | Clang.diagnostic.diagnostic.use of old-style cast |
use of old-style cast | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\mathlib.cpp | 70 | Clang.diagnostic.diagnostic.use of old-style cast |
use of old-style cast | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\token.cpp | 66 | Clang.diagnostic.diagnostic.use of old-style cast |
use of old-style cast | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\token.cpp | 71 | Clang.diagnostic.diagnostic.use of old-style cast |
implicit conversion loses integer precision: 'biguint' (aka 'unsigned long long') to 'unsigned int' | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\errorlogger.cpp | 164 | Clang.diagnostic.diagnostic .implicit conversion loses integer precision: 'biguint' (aka 'unsigned long long') to 'unsigned int' |
use of old-style cast | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\errorlogger.cpp | 300 | Clang.diagnostic.diagnostic.use of old-style cast |
implicit conversion changes signedness: 'int' to 'std::string::size_ty pe' (aka 'unsigned int') | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\errorlogger.cpp | 300 | Clang.diagnostic.diagnostic .implicit conversion changes signedness: 'int' to 'std::string::size_t ype' (aka 'unsigned int') |
use of old-style cast | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\tokenlist.cpp | 236 | Clang.diagnostic.diagnostic.use of old-style cast |
use of old-style cast | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\tokenlist.cpp | 268 | Clang.diagnostic.diagnostic.use of old-style cast |
use of old-style cast | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\tokenlist.cpp | 301 | Clang.diagnostic.diagnostic.use of old-style cast |
use of old-style cast | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\tokenlist.cpp | 305 | Clang.diagnostic.diagnostic.use of old-style cast |
use of old-style cast | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\tokenlist.cpp | 310 | Clang.diagnostic.diagnostic.use of old-style cast |
use of old-style cast | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\tokenlist.cpp | 376 | Clang.diagnostic.diagnostic.use of old-style cast |
use of old-style cast | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\tokenlist.cpp | 80 | Clang.diagnostic.diagnostic.use of old-style cast |
use of old-style cast | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\tokenlist.cpp | 406 | Clang.diagnostic.diagnostic.use of old-style cast |
use of old-style cast | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\tokenlist.cpp | 409 | Clang.diagnostic.diagnostic.use of old-style cast |
use of old-style cast | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\tokenize.cpp | 2 106 | Clang.diagnostic.diagnostic.use of old-style cast |
use of old-style cast | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\tokenize.cpp | 2 118 | Clang.diagnostic.diagnostic.use of old-style cast |
implicit conversion loses integer precision: 'long long' to 'std::size _t' (aka 'unsigned int') | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\tokenize.cpp | 3 136 | Clang.diagnostic.diagnostic .implicit conversion loses integer precision: 'long long' to 'std::siz e_t' (aka 'unsigned int') |
use of old-style cast | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\tokenize.cpp | 5 577 | Clang.diagnostic.diagnostic.use of old-style cast |
implicit conversion changes signedness: 'int' to 'size_type' (aka 'unsigned int') | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\tokenize.cpp | 1 129 | Clang.diagnostic.diagnostic .implicit conversion changes signedness: 'int' to 'size_type' (aka 'unsigned int') |
implicit conversion changes signedness: 'size_type' (aka 'unsigned int') to 'std::string::difference_type' (aka 'int') | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\tokenize.cpp | 6 467 | Clang.diagnostic.diagnostic .implicit conversion changes signedness: 'size_type' (aka 'unsigned int') to 'std::string::difference_type' (aka 'int') |
implicit conversion changes signedness: 'std::string::difference_type' (aka 'int') to 'size_type' (aka 'unsigned int') | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\tokenize.cpp | 6 468 | Clang.diagnostic.diagnostic .implicit conversion changes signedness: 'std::string::difference_type ' (aka 'int') to 'size_type' (aka 'unsigned int') |
use of old-style cast | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\tokenize.cpp | 7 181 | Clang.diagnostic.diagnostic.use of old-style cast |
use of old-style cast | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\tokenize.cpp | 7 182 | Clang.diagnostic.diagnostic.use of old-style cast |
use of old-style cast | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\tokenize.cpp | 8 789 | Clang.diagnostic.diagnostic.use of old-style cast |
use of old-style cast | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\tokenize.cpp | 8 801 | Clang.diagnostic.diagnostic.use of old-style cast |
use of old-style cast | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\tokenize.cpp | 8 808 | Clang.diagnostic.diagnostic.use of old-style cast |
implicit conversion changes signedness: 'int' to 'unsigned long' | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\tokenize.cpp | 9 461 | Clang.diagnostic.diagnostic .implicit conversion changes signedness: 'int' to 'unsigned long' |
implicit conversion changes signedness: 'int' to 'unsigned int' | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\library.cpp | 508 | Clang.diagnostic.diagnostic .implicit conversion changes signedness: 'int' to 'unsigned int' |
use of old-style cast | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\timer.cpp | 54 | Clang.diagnostic.diagnostic.use of old-style cast |
use of old-style cast | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\timer.cpp | 95 | Clang.diagnostic.diagnostic.use of old-style cast |
implicit conversion changes signedness: 'std::size_t' (aka 'unsigned int') to 'difference_type' (aka 'int') | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\symboldatabase.cpp | 3 227 | Clang.diagnostic.diagnostic .implicit conversion changes signedness: 'std::size_t' (aka 'unsigned int') to 'difference_type' (aka 'int') |
use of old-style cast | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\symboldatabase.cpp | 1 013 | Clang.diagnostic.diagnostic.use of old-style cast |
implicit conversion changes signedness: 'unsigned long long' to 'MathL ib::bigint' (aka 'long long') | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\symboldatabase.cpp | 1 124 | Clang.diagnostic.diagnostic .implicit conversion changes signedness: 'unsigned long long' to 'Math Lib::bigint' (aka 'long long') |
use of old-style cast | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkbufferoverrun.cpp | 1 461 | Clang.diagnostic.diagnostic.use of old-style cast |
use of old-style cast | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkbufferoverrun.cpp | 1 006 | Clang.diagnostic.diagnostic.use of old-style cast |
implicit conversion changes signedness: 'unsigned int' to 'int' | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkbufferoverrun.cpp | 1 539 | Clang.diagnostic.diagnostic .implicit conversion changes signedness: 'unsigned int' to 'int' |
use of old-style cast | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkbufferoverrun.cpp | 900 | Clang.diagnostic.diagnostic.use of old-style cast |
use of old-style cast | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkbufferoverrun.cpp | 949 | Clang.diagnostic.diagnostic.use of old-style cast |
use of old-style cast | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkbufferoverrun.cpp | 962 | Clang.diagnostic.diagnostic.use of old-style cast |
use of old-style cast | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkbufferoverrun.cpp | 663 | Clang.diagnostic.diagnostic.use of old-style cast |
implicit conversion changes signedness: 'unsigned int' to 'int' | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkbufferoverrun.cpp | 354 | Clang.diagnostic.diagnostic .implicit conversion changes signedness: 'unsigned int' to 'int' |
use of old-style cast | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkbufferoverrun.cpp | 365 | Clang.diagnostic.diagnostic.use of old-style cast |
use of old-style cast | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkclass.cpp | 1 030 | Clang.diagnostic.diagnostic.use of old-style cast |
use of old-style cast | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkstring.cpp | 240 | Clang.diagnostic.diagnostic.use of old-style cast |
use of old-style cast | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkstring.cpp | 245 | Clang.diagnostic.diagnostic.use of old-style cast |
use of old-style cast | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkio.cpp | 407 | Clang.diagnostic.diagnostic.use of old-style cast |
use of old-style cast | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkio.cpp | 632 | Clang.diagnostic.diagnostic.use of old-style cast |
use of old-style cast | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkuninitvar.cpp | 1 307 | Clang.diagnostic.diagnostic.use of old-style cast |
implicit conversion changes signedness: 'unsigned int' to 'mapped_type ' (aka 'int') | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkuninitvar.cpp | 1 312 | Clang.diagnostic.diagnostic .implicit conversion changes signedness: 'unsigned int' to 'mapped_typ e' (aka 'int') |
use of old-style cast | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkuninitvar.cpp | 1 337 | Clang.diagnostic.diagnostic.use of old-style cast |
implicit conversion changes signedness: 'unsigned int' to 'mapped_type ' (aka 'int') | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkuninitvar.cpp | 1 342 | Clang.diagnostic.diagnostic .implicit conversion changes signedness: 'unsigned int' to 'mapped_typ e' (aka 'int') |
implicit conversion changes signedness: 'unsigned int' to 'int' | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkuninitvar.cpp | 1 776 | Clang.diagnostic.diagnostic .implicit conversion changes signedness: 'unsigned int' to 'int' |
implicit conversion changes signedness: 'unsigned int' to 'int' | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkuninitvar.cpp | 1 777 | Clang.diagnostic.diagnostic .implicit conversion changes signedness: 'unsigned int' to 'int' |
implicit conversion changes signedness: 'int' to 'unsigned int' | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checknullpointer.cpp | 68 | Clang.diagnostic.diagnostic .implicit conversion changes signedness: 'int' to 'unsigned int' |
use of old-style cast | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checknullpointer.cpp | 109 | Clang.diagnostic.diagnostic.use of old-style cast |
implicit conversion changes signedness: 'unsigned int' to 'int' | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checktype.cpp | 127 | Clang.diagnostic.diagnostic .implicit conversion changes signedness: 'unsigned int' to 'int' |
use of old-style cast | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\preprocessor.cpp | 179 | Clang.diagnostic.diagnostic.use of old-style cast |
use of old-style cast | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\preprocessor.cpp | 181 | Clang.diagnostic.diagnostic.use of old-style cast |
use of old-style cast | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\preprocessor.cpp | 229 | Clang.diagnostic.diagnostic.use of old-style cast |
use of old-style cast | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\preprocessor.cpp | 2 918 | Clang.diagnostic.diagnostic.use of old-style cast |
use of old-style cast | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\preprocessor.cpp | 2 920 | Clang.diagnostic.diagnostic.use of old-style cast |
use of old-style cast | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\preprocessor.cpp | 3 083 | Clang.diagnostic.diagnostic.use of old-style cast |
use of old-style cast | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\preprocessor.cpp | 3 088 | Clang.diagnostic.diagnostic.use of old-style cast |
use of old-style cast | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\preprocessor.cpp | 3 093 | Clang.diagnostic.diagnostic.use of old-style cast |
Statistics
Stat | FilePath | BeginLine |
---|---|---|
Sum: | 0 | 433 870 |
Average: | 0 | 1 480 |
Minimum: | 0 | 33 |
Maximum: | 0 | 9 461 |
Standard deviation: | 0 | 1 592 |
Variance: | 0 | 2 537 298 |
Rule warning: Conversion Issues |
warnif count > 0
from issue in Issues where issue.ToolName=="Clang" && issue.Type.Contains("conversion")
select new { issue,issue.FilePath,issue.BeginLine }
3 fields matched
fields | FilePath | BeginLine | Full Name |
---|---|---|---|
format specifies type 'void *' but the argument has type 'ULONG_PTR' (aka 'unsigned long') | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\cli\cppcheckexecutor.cpp | 604 | Clang.diagnostic.diagnostic .format specifies type 'void *' but the argument has type 'ULONG_PTR' (aka 'unsigned long') |
format specifies type 'void *' but the argument has type 'ULONG_PTR' (aka 'unsigned long') | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\cli\cppcheckexecutor.cpp | 608 | Clang.diagnostic.diagnostic .format specifies type 'void *' but the argument has type 'ULONG_PTR' (aka 'unsigned long') |
format specifies type 'void *' but the argument has type 'ULONG_PTR' (aka 'unsigned long') | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\cli\cppcheckexecutor.cpp | 612 | Clang.diagnostic.diagnostic .format specifies type 'void *' but the argument has type 'ULONG_PTR' (aka 'unsigned long') |
Statistics
Stat | FilePath | BeginLine |
---|---|---|
Sum: | 0 | 1 824 |
Average: | 0 | 608 |
Minimum: | 0 | 604 |
Maximum: | 0 | 612 |
Standard deviation: | 0 | 3.26 |
Variance: | 0 | 10.66 |
Rule warning: Deprecated Usage |
warnif count > 0
from issue in Issues where issue.ToolName=="Clang" && issue.Type.Contains("deprecated")
select new { issue,issue.FilePath,issue.BeginLine }
1 fields matched
field | FilePath | BeginLine | Full Name |
---|---|---|---|
definition of implicit copy constructor for 'ScopeGuard' is deprecated because it has a user-declared destructor | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkunusedvar.cpp | 91 | Clang.diagnostic.diagnostic .definition of implicit copy constructor for 'ScopeGuard' is deprecate d because it has a user-declared destructor |
Statistics
Stat | FilePath | BeginLine |
---|---|---|
Sum: | 0 | 91 |
Average: | 0 | 91 |
Minimum: | 0 | 91 |
Maximum: | 0 | 91 |
Standard deviation: | 0 | 0 |
Variance: | 0 | 0 |
Rule warning: Switch Issues |
warnif count > 0
from issue in Issues where issue.ToolName=="Clang" && (issue.Type.Contains("switch") || issue.Type.Contains("case"))
select new { issue,issue.FilePath,issue.BeginLine }
3 fields matched
fields | FilePath | BeginLine | Full Name |
---|---|---|---|
enumeration values 'SUFFIX_ULL', 'SUFFIX_LLU' , and 'SUFFIX_I64' not explicitly handled in switch | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\mathlib.cpp | 375 | Clang.diagnostic.diagnostic.enumeration values 'SUFFIX_ULL' , 'SUFFIX_LLU', and 'SUFFIX_I64' not explicitly handled in switch |
11 enumeration values not explicitly handled in switch: 'eFunction' , 'eIf', 'eElse'... | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\symboldatabase.cpp | 2 748 | Clang.diagnostic.diagnostic .11 enumeration values not explicitly handled in switch: 'eFunction' , 'eIf', 'eElse'... |
enumeration value 'NONE' not explicitly handled in switch | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkio.cpp | 261 | Clang.diagnostic.diagnostic .enumeration value 'NONE' not explicitly handled in switch |
Statistics
Stat | FilePath | BeginLine |
---|---|---|
Sum: | 0 | 3 384 |
Average: | 0 | 1 128 |
Minimum: | 0 | 261 |
Maximum: | 0 | 2 748 |
Standard deviation: | 0 | 1 146 |
Variance: | 0 | 1 314 366 |
Dead Code | 210 |
|
Rule warning: Potentially dead Methods |
warnif count > 0
// Filter procedure for methods that should'nt be considered as dead
let canMethodBeConsideredAsDeadProc = new Func<IMethod, bool>(
m => !m.IsPublic && // Public methods might be used by client applications of your Projects.
!m.IsEntryPoint && // Main() method is not used by-design.
!m.IsClassConstructor &&
!m.IsVirtual && // Only check for non virtual method that are not seen as used in IL.
!(m.IsConstructor && // Don't take account of protected ctor that might be call by a derived ctors.
m.IsProtected) &&
!m.NameLike (@"^On") && //Exclude Events like MFC ones
!m.IsGeneratedByCompiler
)
// Get methods unused
let methodsUnused =
from m in JustMyCode.Methods where
m.NbMethodsCallingMe == 0 &&
canMethodBeConsideredAsDeadProc(m)
select m
// Dead methods = methods used only by unused methods (recursive)
let deadMethodsMetric = methodsUnused.FillIterative(
methods => // Unique loop, just to let a chance to build the hashset.
from o in new[] { new object() }
// Use a hashet to make Intersect calls much faster!
let hashset = methods.ToHashSet()
from m in codeBase.Application.Methods.UsedByAny(methods).Except(methods)
where canMethodBeConsideredAsDeadProc(m) &&
// Select methods called only by methods already considered as dead
hashset.Intersect(m.MethodsCallingMe).Count() == m.NbMethodsCallingMe
select m)
from m in JustMyCode.Methods.Intersect(deadMethodsMetric.DefinitionDomain)
select new { m, m.MethodsCallingMe, depth = deadMethodsMetric[m] }
3,134 methods matched
methods | MethodsCallingMe | depth | Full Name |
---|---|---|---|
Token() | 0 method | 0 | Token.Token() |
Token(constToken&) | 0 method | 0 | Token.Token(constToken&) |
operator=(constToken&) | 0 method | 0 | Token.operator=(constToken&) |
TokenList(constTokenList&) | 0 method | 0 | TokenList.TokenList(constTokenList&) |
operator=(constTokenList&) | 0 method | 0 | TokenList.operator=(constTokenList&) |
Tokenizer(constTokenizer&) | 0 method | 0 | Tokenizer.Tokenizer(constTokenizer&) |
operator=(constTokenizer&) | 0 method | 0 | Tokenizer.operator=(constTokenizer&) |
operator=(constTimer&) | 0 method | 0 | Timer.operator=(constTimer&) |
operator=(constCheck&) | 0 method | 0 | Check.operator=(constCheck&) |
Check(constCheck&) | 0 method | 0 | Check.Check(constCheck&) |
getErrorMessages(ErrorLogger*,constSettings*) | 0 method | 0 | Check64BitPortability.getErrorMessages(ErrorLogger*,constSettings*) |
classInfo() | 0 method | 0 | Check64BitPortability.classInfo() |
getErrorMessages(ErrorLogger*,constSettings*) | 0 method | 0 | CheckAssert.getErrorMessages(ErrorLogger*,constSettings*) |
classInfo() | 0 method | 0 | CheckAssert.classInfo() |
getErrorMessages(ErrorLogger*,constSettings*) | 0 method | 0 | CheckAutoVariables.getErrorMessages(ErrorLogger*,constSettings*) |
classInfo() | 0 method | 0 | CheckAutoVariables.classInfo() |
getErrorMessages(ErrorLogger*,constSettings*) | 0 method | 0 | CheckBool.getErrorMessages(ErrorLogger*,constSettings*) |
classInfo() | 0 method | 0 | CheckBool.classInfo() |
getErrorMessages(ErrorLogger*,constSettings*) | 0 method | 0 | CheckBoost.getErrorMessages(ErrorLogger*,constSettings*) |
classInfo() | 0 method | 0 | CheckBoost.classInfo() |
classInfo() | 0 method | 0 | CheckBufferOverrun.classInfo() |
getErrorMessages(ErrorLogger*,constSettings*) | 0 method | 0 | CheckClass.getErrorMessages(ErrorLogger*,constSettings*) |
classInfo() | 0 method | 0 | CheckClass.classInfo() |
getErrorMessages(ErrorLogger*,constSettings*) | 0 method | 0 | CheckCondition.getErrorMessages(ErrorLogger*,constSettings*) |
classInfo() | 0 method | 0 | CheckCondition.classInfo() |
redundantGetAndSetUserIdError(constToken*) | 0 method | 0 | CheckOther.redundantGetAndSetUserIdError(constToken*) |
duplicateIfError(constToken*,constToken*) | 0 method | 0 | CheckOther.duplicateIfError(constToken*,constToken*) |
alwaysTrueFalseStringCompareError(constToken*,conststd::string& ,conststd::string&) | 0 method | 0 | CheckOther.alwaysTrueFalseStringCompareError(constToken* ,conststd::string&,conststd::string&) |
alwaysTrueStringVariableCompareError(constToken*,conststd::string& ,conststd::string&) | 0 method | 0 | CheckOther.alwaysTrueStringVariableCompareError(constToken* ,conststd::string&,conststd::string&) |
getErrorMessages(ErrorLogger*,constSettings*) | 0 method | 0 | CheckOther.getErrorMessages(ErrorLogger*,constSettings*) |
classInfo() | 0 method | 0 | CheckOther.classInfo() |
getErrorMessages(ErrorLogger*,constSettings*) | 0 method | 0 | CheckString.getErrorMessages(ErrorLogger*,constSettings*) |
classInfo() | 0 method | 0 | CheckString.classInfo() |
getErrorMessages(ErrorLogger*,constSettings*) | 0 method | 0 | CheckExceptionSafety.getErrorMessages(ErrorLogger*,constSettings*) |
classInfo() | 0 method | 0 | CheckExceptionSafety.classInfo() |
getErrorMessages(ErrorLogger*,constSettings*) | 0 method | 0 | CheckIO.getErrorMessages(ErrorLogger*,constSettings*) |
classInfo() | 0 method | 0 | CheckIO.classInfo() |
ArgumentInfo(constCheckIO::ArgumentInfo&) | 0 method | 0 | CheckIO+ArgumentInfo.ArgumentInfo(constCheckIO::ArgumentInfo&) |
operator=(constCheckIO::ArgumentInfo&) | 0 method | 0 | CheckIO+ArgumentInfo.operator=(constCheckIO::ArgumentInfo&) |
getErrorMessages(ErrorLogger*,constSettings*) | 0 method | 0 | CheckLeakAutoVar.getErrorMessages(ErrorLogger*,constSettings*) |
classInfo() | 0 method | 0 | CheckLeakAutoVar.classInfo() |
CheckMemoryLeak() | 0 method | 0 | CheckMemoryLeak.CheckMemoryLeak() |
CheckMemoryLeak(constCheckMemoryLeak&) | 0 method | 0 | CheckMemoryLeak.CheckMemoryLeak(constCheckMemoryLeak&) |
operator=(constCheckMemoryLeak&) | 0 method | 0 | CheckMemoryLeak.operator=(constCheckMemoryLeak&) |
getErrorMessages(ErrorLogger*,constSettings*) | 0 method | 0 | CheckMemoryLeakInFunction.getErrorMessages(ErrorLogger*,constSettings* ) |
classInfo() | 0 method | 0 | CheckMemoryLeakInFunction.classInfo() |
getErrorMessages(ErrorLogger*,constSettings*) | 0 method | 0 | CheckMemoryLeakInClass.getErrorMessages(ErrorLogger*,constSettings*) |
classInfo() | 0 method | 0 | CheckMemoryLeakInClass.classInfo() |
getErrorMessages(ErrorLogger*,constSettings*) | 0 method | 0 | CheckMemoryLeakStructMember.getErrorMessages(ErrorLogger* ,constSettings*) |
classInfo() | 0 method | 0 | CheckMemoryLeakStructMember.classInfo() |
getErrorMessages(ErrorLogger*,constSettings*) | 0 method | 0 | CheckMemoryLeakNoVar.getErrorMessages(ErrorLogger*,constSettings*) |
classInfo() | 0 method | 0 | CheckMemoryLeakNoVar.classInfo() |
getErrorMessages(ErrorLogger*,constSettings*) | 0 method | 0 | CheckUninitVar.getErrorMessages(ErrorLogger*,constSettings*) |
classInfo() | 0 method | 0 | CheckUninitVar.classInfo() |
getErrorMessages(ErrorLogger*,constSettings*) | 0 method | 0 | CheckNonReentrantFunctions.getErrorMessages(ErrorLogger* ,constSettings*) |
classInfo() | 0 method | 0 | CheckNonReentrantFunctions.classInfo() |
getErrorMessages(ErrorLogger*,constSettings*) | 0 method | 0 | CheckNullPointer.getErrorMessages(ErrorLogger*,constSettings*) |
classInfo() | 0 method | 0 | CheckNullPointer.classInfo() |
getErrorMessages(ErrorLogger*,constSettings*) | 0 method | 0 | CheckObsoleteFunctions.getErrorMessages(ErrorLogger*,constSettings*) |
classInfo() | 0 method | 0 | CheckObsoleteFunctions.classInfo() |
getErrorMessages(ErrorLogger*,constSettings*) | 0 method | 0 | CheckPostfixOperator.getErrorMessages(ErrorLogger*,constSettings*) |
classInfo() | 0 method | 0 | CheckPostfixOperator.classInfo() |
getErrorMessages(ErrorLogger*,constSettings*) | 0 method | 0 | CheckSizeof.getErrorMessages(ErrorLogger*,constSettings*) |
classInfo() | 0 method | 0 | CheckSizeof.classInfo() |
eraseCheckLoop(constToken*) | 0 method | 0 | CheckStl.eraseCheckLoop(constToken*) |
getErrorMessages(ErrorLogger*,constSettings*) | 0 method | 0 | CheckStl.getErrorMessages(ErrorLogger*,constSettings*) |
classInfo() | 0 method | 0 | CheckStl.classInfo() |
operator=(constExecutionPath&) | 0 method | 0 | ExecutionPath.operator=(constExecutionPath&) |
is_equal(constExecutionPath*) | 0 method | 0 | EraseCheckLoop.is_equal(constExecutionPath*) |
parse(constToken&,std::list<ExecutionPath*>&) | 0 method | 0 | EraseCheckLoop.parse(constToken&,std::list<ExecutionPath*>&) |
parseCondition(constToken&,std::list<ExecutionPath*>&) | 0 method | 0 | EraseCheckLoop.parseCondition(constToken&,std::list<ExecutionPath*>&) |
isUnsigned(constVariable*) | 0 method | 0 | CheckType.isUnsigned(constVariable*) |
isSigned(constVariable*) | 0 method | 0 | CheckType.isSigned(constVariable*) |
getErrorMessages(ErrorLogger*,constSettings*) | 0 method | 0 | CheckType.getErrorMessages(ErrorLogger*,constSettings*) |
classInfo() | 0 method | 0 | CheckType.classInfo() |
copy() | 0 method | 0 | UninitVar.copy() |
UninitVar(Check*,constVariable*,constSymbolDatabase*,constLibrary* ,bool) | 1 method | 2 | UninitVar.UninitVar(Check*,constVariable*,constSymbolDatabase* ,constLibrary*,bool) |
is_equal(constExecutionPath*) | 0 method | 0 | UninitVar.is_equal(constExecutionPath*) |
alloc_pointer(std::list<ExecutionPath*>&,unsignedint) | 1 method | 2 | UninitVar.alloc_pointer(std::list<ExecutionPath*>&,unsignedint) |
init_pointer(std::list<ExecutionPath*>&,constToken*) | 1 method | 2 | UninitVar.init_pointer(std::list<ExecutionPath*>&,constToken*) |
dealloc_pointer(std::list<ExecutionPath*>&,constToken*) | 1 method | 2 | UninitVar.dealloc_pointer(std::list<ExecutionPath*>&,constToken*) |
pointer_assignment(std::list<ExecutionPath*>&,constToken*,constToken*) | 1 method | 2 | UninitVar.pointer_assignment(std::list<ExecutionPath*>&,constToken* ,constToken*) |
init_strncpy(std::list<ExecutionPath*>&,constToken*) | 1 method | 2 | UninitVar.init_strncpy(std::list<ExecutionPath*>&,constToken*) |
init_memset_nonzero(std::list<ExecutionPath*>&,constToken*) | 1 method | 2 | UninitVar.init_memset_nonzero(std::list<ExecutionPath*>&,constToken*) |
use_dead_pointer(std::list<ExecutionPath*>&,constToken*) | 1 method | 2 | UninitVar.use_dead_pointer(std::list<ExecutionPath*>&,constToken*) |
parserhs(constToken*,std::list<ExecutionPath*>&) | 1 method | 2 | UninitVar.parserhs(constToken*,std::list<ExecutionPath*>&) |
parse(constToken&,std::list<ExecutionPath*>&) | 1 method | 1 | UninitVar.parse(constToken&,std::list<ExecutionPath*>&) |
parseCondition(constToken&,std::list<ExecutionPath*>&) | 0 method | 0 | UninitVar.parseCondition(constToken&,std::list<ExecutionPath*>&) |
parseLoopBody(constToken*,std::list<ExecutionPath*>&) | 0 method | 0 | UninitVar.parseLoopBody(constToken*,std::list<ExecutionPath*>&) |
getErrorMessages(ErrorLogger*,constSettings*) | 0 method | 0 | CheckUnusedFunctions.getErrorMessages(ErrorLogger*,constSettings*) |
runSimplifiedChecks(constTokenizer*,constSettings*,ErrorLogger*) | 0 method | 0 | CheckUnusedFunctions.runSimplifiedChecks(constTokenizer* ,constSettings*,ErrorLogger*) |
classInfo() | 0 method | 0 | CheckUnusedFunctions.classInfo() |
getErrorMessages(ErrorLogger*,constSettings*) | 0 method | 0 | CheckUnusedVar.getErrorMessages(ErrorLogger*,constSettings*) |
classInfo() | 0 method | 0 | CheckUnusedVar.classInfo() |
operator=(constVariables::ScopeGuard&) | 0 method | 0 | Variables+ScopeGuard.operator=(constVariables::ScopeGuard&) |
getErrorMessages(ErrorLogger*,constSettings*) | 0 method | 0 | CheckVaarg.getErrorMessages(ErrorLogger*,constSettings*) |
classInfo() | 0 method | 0 | CheckVaarg.classInfo() |
reportProgress(conststd::string&,constchar*,conststd::size_t) | 0 method | 0 | CppCheck.reportProgress(conststd::string&,constchar*,conststd::size_t) |
operator=(constPreprocessorMacro&) | 0 method | 0 | PreprocessorMacro.operator=(constPreprocessorMacro&) |
TemplateSimplifier() | 0 method | 0 | TemplateSimplifier.TemplateSimplifier() |
Statistics
Stat | MethodsCallingMe | depth |
---|---|---|
Sum: | 0 | 3 083 |
Average: | 0 | 0.98 |
Minimum: | 0 | 0 |
Maximum: | 0 | 2 |
Standard deviation: | 0 | 0.31 |
Variance: | 0 | 0.097 |
Visibility | 020 |
|
Rule warning: Fields should be declared as private |
warnif count > 0 from f in Application.Fields where
!f.IsPrivate &&
// These conditions filter cases where fields
// doesn't represent state that should be encapsulated.
!f.IsGeneratedByCompiler &&
!f.IsEnumValue
select new { f }
399 fields matched
fields | Full Name |
---|---|
TIXML2_MAJOR_VERSION | __Globals.TIXML2_MAJOR_VERSION |
TIXML2_MINOR_VERSION | __Globals.TIXML2_MINOR_VERSION |
TIXML2_PATCH_VERSION | __Globals.TIXML2_PATCH_VERSION |
LINE_FEED | __Globals.LINE_FEED |
LF | __Globals.LF |
CARRIAGE_RETURN | __Globals.CARRIAGE_RETURN |
CR | __Globals.CR |
SINGLE_QUOTE | __Globals.SINGLE_QUOTE |
DOUBLE_QUOTE | __Globals.DOUBLE_QUOTE |
TIXML_UTF_LEAD_0 | __Globals.TIXML_UTF_LEAD_0 |
TIXML_UTF_LEAD_1 | __Globals.TIXML_UTF_LEAD_1 |
TIXML_UTF_LEAD_2 | __Globals.TIXML_UTF_LEAD_2 |
emptyString | __Globals.emptyString |
call_func_white_list | __Globals.call_func_white_list |
Version | __Globals.Version |
ExtraVersion | __Globals.ExtraVersion |
S_timerResults | __Globals.S_timerResults |
cAlternativeTokens_ | __Globals.cAlternativeTokens_ |
cAlternativeTokens | __Globals.cAlternativeTokens |
AST_MAX_DEPTH | __Globals.AST_MAX_DEPTH |
values | Token.values |
_function | Token+Anonymous._function |
_variable | Token+Anonymous._variable |
id | Suppressions+SuppressionEntry.id |
file | Suppressions+SuppressionEntry.file |
line | Suppressions+SuppressionEntry.line |
token | InternalError.token |
errorMessage | InternalError.errorMessage |
id | InternalError.id |
_callStack | ErrorLogger+ErrorMessage._callStack |
_id | ErrorLogger+ErrorMessage._id |
file0 | ErrorLogger+ErrorMessage.file0 |
_severity | ErrorLogger+ErrorMessage._severity |
_cwe | ErrorLogger+ErrorMessage._cwe |
_inconclusive | ErrorLogger+ErrorMessage._inconclusive |
line | ErrorLogger+ErrorMessage+FileLocation.line |
list | Tokenizer.list |
use | Library.use |
leakignore | Library.leakignore |
functionconst | Library.functionconst |
functionpure | Library.functionpure |
useretval | Library.useretval |
containers | Library.containers |
argumentChecks | Library.argumentChecks |
returnuninitdata | Library.returnuninitdata |
defines | Library.defines |
errorcode | Library+Error.errorcode |
reason | Library+Error.reason |
startPattern | Library+Container.startPattern |
endPattern | Library+Container.endPattern |
functions | Library+Container.functions |
type_templateArgNo | Library+Container.type_templateArgNo |
size_templateArgNo | Library+Container.size_templateArgNo |
arrayLike_indexOp | Library+Container.arrayLike_indexOp |
stdStringLike | Library+Container.stdStringLike |
action | Library+Container+Function.action |
yield | Library+Container+Function.yield |
notbool | Library+ArgumentChecks.notbool |
notnull | Library+ArgumentChecks.notnull |
notuninit | Library+ArgumentChecks.notuninit |
formatstr | Library+ArgumentChecks.formatstr |
strz | Library+ArgumentChecks.strz |
valid | Library+ArgumentChecks.valid |
minsizes | Library+ArgumentChecks.minsizes |
type | Library+ArgumentChecks+MinSize.type |
arg | Library+ArgumentChecks+MinSize.arg |
arg2 | Library+ArgumentChecks+MinSize.arg2 |
size | Library+PodType.size |
sign | Library+PodType.sign |
_type | Library+PlatformType._type |
_signed | Library+PlatformType._signed |
_unsigned | Library+PlatformType._unsigned |
_long | Library+PlatformType._long |
_pointer | Library+PlatformType._pointer |
_ptr_ptr | Library+PlatformType._ptr_ptr |
_const_ptr | Library+PlatformType._const_ptr |
_platform_types | Library+Platform._platform_types |
_clocks | TimerResultsData._clocks |
_numberOfResults | TimerResultsData._numberOfResults |
debug | Settings.debug |
debugwarnings | Settings.debugwarnings |
debugFalsePositive | Settings.debugFalsePositive |
dump | Settings.dump |
exceptionHandling | Settings.exceptionHandling |
inconclusive | Settings.inconclusive |
jointSuppressionReport | Settings.jointSuppressionReport |
experimental | Settings.experimental |
_errorsOnly | Settings._errorsOnly |
_inlineSuppressions | Settings._inlineSuppressions |
_verbose | Settings._verbose |
_force | Settings._force |
_relativePaths | Settings._relativePaths |
_basePaths | Settings._basePaths |
_xml | Settings._xml |
_xml_version | Settings._xml_version |
_jobs | Settings._jobs |
_loadAverage | Settings._loadAverage |
_exitCode | Settings._exitCode |
_outputFormat | Settings._outputFormat |
_showtime | Settings._showtime |
Statistics
Stat |
---|
Sum: |
Average: |
Minimum: |
Maximum: |
Standard deviation: |
Variance: |
Rule warning: Constructors of abstract classes should be declared as protected or private |
// Constructors of an abstract class can only be accessed from this class and derived class.
// Declaring such a constructor with another visibility level is useless and potentially misleading.
warnif count > 0
from t in Application.Types where
t.IsClass &&
t.IsAbstract
let ctors = t.Constructors.Where(c => !c.IsProtected && !c.IsPrivate)
where ctors.Count() > 0
select new { t, ctors }
// Notice that if a constructor of an abstract class is declared as private,
// it can only be accessed from derived classes nested in the abstract class.
6 types matched
types | ctors | Full Name |
---|---|---|
ErrorLogger | 2 methods | ErrorLogger |
TimerResultsIntf | 2 methods | TimerResultsIntf |
Check | 2 methods | Check |
ExecutionPath | 2 methods | ExecutionPath |
MemPool | 2 methods | tinyxml2.MemPool |
TestFixture | 2 methods | TestFixture |
Statistics
Stat | ctors |
---|---|
Sum: | 0 |
Average: | 0 |
Minimum: | 0 |
Maximum: | 0 |
Standard deviation: | 0 |
Variance: | 0 |
Purity - Immutability - Constness | 230 |
|
Rule warning: Structures should be immutable |
warnif count > 0 from t in Application.Types where
t.IsStructure &&
!t.IsImmutable
let mutableFields = t.Fields.Where(f => !f.IsImmutable)
select new { t, t.NbLinesOfCode, mutableFields }
// It is deemed as a good practice to make
// your structure immutable.
// An object is immutable if its state doesn’t
// change once the object has been created.
// Consequently, a structure is immutable if
// its instances are immutable.
// Immutable types naturally simplify code by
// limiting side-effects.
22 types matched
types | # lines of code (LOC) | mutableFields | Full Name |
---|---|---|---|
Suppressions+SuppressionEntry | 3 | 3 fields | Suppressions+SuppressionEntry |
InternalError | 9 | 3 fields | InternalError |
Library+Container+Function | 0 | 2 fields | Library+Container+Function |
Library+PodType | 0 | 2 fields | Library+PodType |
Library+PlatformType | 8 | 7 fields | Library+PlatformType |
Library+Platform | 2 | 1 field | Library+Platform |
TimerResultsData | 4 | 2 fields | TimerResultsData |
Dimension | 4 | 4 fields | Dimension |
Type+FriendInfo | 3 | 4 fields | Type+FriendInfo |
Scope+UsingInfo | 0 | 2 fields | Scope+UsingInfo |
CheckBufferOverrun+MyFileInfo+ArrayUsage | 0 | 3 fields | CheckBufferOverrun+MyFileInfo+ArrayUsage |
CheckClass+Usage | 2 | 2 fields | CheckClass+Usage |
VarInfo | 2 | 2 fields | VarInfo |
Filepointer | 5 | 5 fields | Filepointer |
VarInfo+AllocInfo | 2 | 2 fields | VarInfo+AllocInfo |
Space | 2 | 3 fields | Space |
AST_state | 3 | 4 fields | AST_state |
MemPoolT<SIZE>+Block | 0 | 1 field | tinyxml2.MemPoolT<SIZE>+Block |
Entity | 0 | 3 fields | tinyxml2.Entity |
scopeStackEntryType | 4 | 2 fields | anonymous_namespace{tokenize.cpp}.scopeStackEntryType |
IMAGEHLP_SYMBOL64_EXT | 0 | 1 field | IMAGEHLP_SYMBOL64_EXT |
IMAGEHLP_SYMBOL64_EXT | 0 | 1 field | IMAGEHLP_SYMBOL64_EXT |
Statistics
Stat | # lines of code (LOC) | mutableFields |
---|---|---|
Sum: | 53 | 0 |
Average: | 2.41 | 0 |
Minimum: | 0 | 0 |
Maximum: | 9 | 0 |
Standard deviation: | 2.5 | 0 |
Variance: | 6.24 | 0 |
Rule warning: Avoid static fields with a mutable field type |
warnif count > 0
from f in Application.Fields
where f.IsStatic && !f.IsEnumValue && !f.IsGeneratedByCompiler
let fieldType = f.FieldType
where fieldType != null &&
!fieldType.IsThirdParty &&
!fieldType.IsInterface &&
!fieldType.IsImmutable
select new { f,
mutableFieldType = fieldType ,
isFieldImmutable = f.IsImmutable }
9 fields matched
fields | mutableFieldType | isFieldImmutable | Full Name |
---|---|---|---|
instance | CheckUnusedFunctions | False | CheckUnusedFunctions.instance |
entities | Entity | False | tinyxml2.__Globals.entities |
instance | CheckAutoVariables | False | anonymous_namespace{checkautovariables.cpp}.__Globals.instance |
testMemleak | TestMemleak | False | __Globals.testMemleak |
testMemleakInFunction | TestMemleakInFunction | False | __Globals.testMemleakInFunction |
testMemleakInClass | TestMemleakInClass | False | __Globals.testMemleakInClass |
testMemleakStructMember | TestMemleakStructMember | False | __Globals.testMemleakStructMember |
testMemleakGLib | TestMemleakGLib | False | __Globals.testMemleakGLib |
testMemleakWindows | TestMemleakWindows | False | __Globals.testMemleakWindows |
Statistics
Stat | mutableFieldType | isFieldImmutable |
---|---|---|
Sum: | 0 | 0 |
Average: | 0 | 0 |
Minimum: | 0 | 0 |
Maximum: | 0 | 0 |
Standard deviation: | 0 | 0 |
Variance: | 0 | 0 |
Rule warning: Use const_cast carrefully |
// <Name>Use const_cast carrefully</Name>
warnif count >0 (from m in Methods where m.IsUsing ("Keywords.const_cast")
select new { m, m.NbLinesOfCode }).Take(10)
10 methods matched
methods | # lines of code (LOC) | Full Name |
---|---|---|
createAstAtToken(Token*,bool) | 69 | __Globals.createAstAtToken(Token*,bool) |
setTokenValue(Token*,constValueFlow::Value&) | 90 | __Globals.setTokenValue(Token*,constValueFlow::Value&) |
valueFlowBeforeCondition(TokenList*,SymbolDatabase*,ErrorLogger* ,constSettings*) | 155 | __Globals.valueFlowBeforeCondition(TokenList*,SymbolDatabase* ,ErrorLogger*,constSettings*) |
valueFlowForward(Token*const,constToken*const,constVariable*const ,constunsignedint,std::list<ValueFlow::Value>,constbool ,TokenList*const,ErrorLogger*const,constSettings*const) | 206 | __Globals.valueFlowForward(Token*const,constToken*const ,constVariable*const,constunsignedint,std::list<ValueFlow::Value> ,constbool,TokenList*const,ErrorLogger*const,constSettings*const) |
valueFlowAfterAssign(TokenList*,SymbolDatabase*,ErrorLogger* ,constSettings*) | 18 | __Globals.valueFlowAfterAssign(TokenList*,SymbolDatabase*,ErrorLogger* ,constSettings*) |
valueFlowAfterCondition(TokenList*,SymbolDatabase*,ErrorLogger* ,constSettings*) | 102 | __Globals.valueFlowAfterCondition(TokenList*,SymbolDatabase* ,ErrorLogger*,constSettings*) |
valueFlowForLoop(TokenList*,SymbolDatabase*,ErrorLogger* ,constSettings*) | 26 | __Globals.valueFlowForLoop(TokenList*,SymbolDatabase*,ErrorLogger* ,constSettings*) |
valueFlowInjectParameter(TokenList*,ErrorLogger*,constSettings* ,constVariable*,constScope*,conststd::list<ValueFlow::Value>&) | 6 | __Globals.valueFlowInjectParameter(TokenList*,ErrorLogger* ,constSettings*,constVariable*,constScope*,conststd::list <ValueFlow::Value>&) |
valueFlowFunctionDefaultParameter(TokenList*,SymbolDatabase* ,ErrorLogger*,constSettings*) | 16 | __Globals.valueFlowFunctionDefaultParameter(TokenList*,SymbolDatabase* ,ErrorLogger*,constSettings*) |
tokAt(int) | 1 | Token.tokAt(int) |
Statistics
Stat | # lines of code (LOC) |
---|---|
Sum: | 689 |
Average: | 68.9 |
Minimum: | 1 |
Maximum: | 206 |
Standard deviation: | 65.99 |
Variance: | 4 354 |
Naming Conventions | 360 |
|
Rule warning: Instance fields should be prefixed with a 'm_' |
warnif count > 0 (from f in Fields where
!f.NameLike (@"^m_") &&
!f.IsStatic
// Don't hesitate to customize the regex of NameLike to your preference.
&& !f.IsGlobal && !f.IsEnumValue && !f.IsThirdParty
select new { f }).Take(10)
10 fields matched
fields | Full Name |
---|---|
tokensBack | Token.tokensBack |
values | Token.values |
_str | Token._str |
_next | Token._next |
_previous | Token._previous |
_link | Token._link |
_scope | Token._scope |
_varId | Token._varId |
_fileIndex | Token._fileIndex |
_linenr | Token._linenr |
Statistics
Stat |
---|
Sum: |
Average: |
Minimum: |
Maximum: |
Standard deviation: |
Variance: |
Rule warning: Static fields should be prefixed with a 's_' |
warnif count > 0 (from f in Fields where
!f.NameLike (@"^s_") &&
f.IsStatic && !f.IsThirdParty
select new { f }).Take(10)
// Don't hesitate to customize the regex of NameLike to your preference.
10 fields matched
fields | Full Name |
---|---|
TIXML2_MAJOR_VERSION | __Globals.TIXML2_MAJOR_VERSION |
TIXML2_MINOR_VERSION | __Globals.TIXML2_MINOR_VERSION |
TIXML2_PATCH_VERSION | __Globals.TIXML2_PATCH_VERSION |
LINE_FEED | __Globals.LINE_FEED |
LF | __Globals.LF |
CARRIAGE_RETURN | __Globals.CARRIAGE_RETURN |
CR | __Globals.CR |
SINGLE_QUOTE | __Globals.SINGLE_QUOTE |
DOUBLE_QUOTE | __Globals.DOUBLE_QUOTE |
TIXML_UTF_LEAD_0 | __Globals.TIXML_UTF_LEAD_0 |
Statistics
Stat |
---|
Sum: |
Average: |
Minimum: |
Maximum: |
Standard deviation: |
Variance: |
Rule warning: Exception class name should be suffixed with 'Exception' |
warnif count > 0 (from t in Types where t.IsExceptionClass && !t.NameLike (@"Exception$") && !t.IsThirdParty
select new { t, t.NbLinesOfCode }).Take(10)
1 types matched
type | # lines of code (LOC) | Full Name |
---|---|---|
InternalError | 9 | InternalError |
Statistics
Stat | # lines of code (LOC) |
---|---|
Sum: | 9 |
Average: | 9 |
Minimum: | 9 |
Maximum: | 9 |
Standard deviation: | 0 |
Variance: | 0 |
Rule warning: Types name should begin with an Upper character |
warnif count > 0 (from t in Types where
!t.NameLike (@"^[A-Z]") // The name of a type should begin with an Upper letter.
&& // Except if it is generated by compiler or ...
!t.IsThirdParty && !t.IsGlobal
select new { t, t.NbLinesOfCode }).Take(10)
3 types matched
types | # lines of code (LOC) | Full Name |
---|---|---|
scopeStackEntryType | 4 | anonymous_namespace{tokenize.cpp}.scopeStackEntryType |
options | 11 | options |
givenACodeSampleToTokenize | 7 | givenACodeSampleToTokenize |
Statistics
Stat | # lines of code (LOC) |
---|---|
Sum: | 22 |
Average: | 7.33 |
Minimum: | 4 |
Maximum: | 11 |
Standard deviation: | 2.87 |
Variance: | 8.22 |
Rule warning: Avoid methods with name too long |
warnif count > 0 from m in Application.Methods where
!m.IsGeneratedByCompiler
&& m.SimpleName.Length > 35 && !m.IsThirdParty
select new { m, m.SimpleName }
// The regex matches methods with name longer
// than 35 characters.
// Method Name doesn't contain the type and namespace
// prefix, FullName does.
// The regex computes the method name length from
// the beginning until the first open parenthesis
// or first lower than (for generic methods).
81 methods matched
methods | SimpleName | Full Name |
---|---|---|
checkNullpointerFunctionCallPlausibility(constFunction*,unsignedint) | checkNullpointerFunctionCallPlausibility | __Globals.checkNullpointerFunctionCallPlausibility(constFunction* ,unsignedint) |
concatenateNegativeNumberAndAnyPositive() | concatenateNegativeNumberAndAnyPositive | Tokenizer.concatenateNegativeNumberAndAnyPositive() |
findComplicatedSyntaxErrorsInTemplates() | findComplicatedSyntaxErrorsInTemplates | Tokenizer.findComplicatedSyntaxErrorsInTemplates() |
errorReturnAddressOfFunctionParameter(constToken*,conststd::string&) | errorReturnAddressOfFunctionParameter | CheckAutoVariables.errorReturnAddressOfFunctionParameter(constToken* ,conststd::string&) |
checkComparisonOfBoolExpressionWithInt() | checkComparisonOfBoolExpressionWithInt | CheckBool.checkComparisonOfBoolExpressionWithInt() |
comparisonOfTwoFuncsReturningBoolError(constToken*,conststd::string& ,conststd::string&) | comparisonOfTwoFuncsReturningBoolError | CheckBool.comparisonOfTwoFuncsReturningBoolError(constToken* ,conststd::string&,conststd::string&) |
comparisonOfBoolWithInvalidComparator(constToken*,conststd::string&) | comparisonOfBoolWithInvalidComparator | CheckBool.comparisonOfBoolWithInvalidComparator(constToken* ,conststd::string&) |
comparisonOfBoolExpressionWithIntError(constToken*,bool) | comparisonOfBoolExpressionWithIntError | CheckBool.comparisonOfBoolExpressionWithIntError(constToken*,bool) |
operatorEqShouldBeLeftUnimplementedError(constToken*) | operatorEqShouldBeLeftUnimplementedError | CheckClass.operatorEqShouldBeLeftUnimplementedError(constToken*) |
operatorEqMissingReturnStatementError(constToken*,bool) | operatorEqMissingReturnStatementError | CheckClass.operatorEqMissingReturnStatementError(constToken*,bool) |
getFirstPureVirtualFunctionCallStack(std::map<constFunction*,std::list <constToken*>>&,constToken&,std::list<constToken*>&) | getFirstPureVirtualFunctionCallStack | CheckClass.getFirstPureVirtualFunctionCallStack(std::map <constFunction*,std::list<constToken*>>&,constToken&,std::list <constToken*>&) |
checkComparisonFunctionIsAlwaysTrueOrFalse() | checkComparisonFunctionIsAlwaysTrueOrFalse | CheckOther.checkComparisonFunctionIsAlwaysTrueOrFalse() |
checkComparisonFunctionIsAlwaysTrueOrFalseError(constToken* ,conststd::string&,conststd::string&,constbool) | checkComparisonFunctionIsAlwaysTrueOrFalseError | CheckOther.checkComparisonFunctionIsAlwaysTrueOrFalseError(constToken* ,conststd::string&,conststd::string&,constbool) |
redundantBitwiseOperationInSwitchError(constToken*,conststd::string&) | redundantBitwiseOperationInSwitchError | CheckOther.redundantBitwiseOperationInSwitchError(constToken* ,conststd::string&) |
alwaysTrueStringVariableCompareError(constToken*,conststd::string& ,conststd::string&) | alwaysTrueStringVariableCompareError | CheckOther.alwaysTrueStringVariableCompareError(constToken* ,conststd::string&,conststd::string&) |
alwaysTrueStringVariableCompareError(constToken*,conststd::string& ,conststd::string&) | alwaysTrueStringVariableCompareError | CheckString.alwaysTrueStringVariableCompareError(constToken* ,conststd::string&,conststd::string&) |
unhandledExceptionSpecificationError(constToken*const,constToken*const ,conststd::string&) | unhandledExceptionSpecificationError | CheckExceptionSafety.unhandledExceptionSpecificationError (constToken*const,constToken*const,conststd::string&) |
wrongPrintfScanfPosixParameterPositionError(constToken* ,conststd::string&,unsignedint,unsignedint) | wrongPrintfScanfPosixParameterPositionError | CheckIO.wrongPrintfScanfPosixParameterPositionError(constToken* ,conststd::string&,unsignedint,unsignedint) |
checkFunctionVariableUsage_iterateScopes(constScope*const,Variables& ,bool) | checkFunctionVariableUsage_iterateScopes | CheckUnusedVar.checkFunctionVariableUsage_iterateScopes (constScope*const,Variables&,bool) |
hasComplicatedSyntaxErrorsInTemplates(Token*) | hasComplicatedSyntaxErrorsInTemplates | TemplateSimplifier.hasComplicatedSyntaxErrorsInTemplates(Token*) |
array_index_same_struct_and_var_name() | array_index_same_struct_and_var_name | TestBufferOverrun.array_index_same_struct_and_var_name() |
buffer_overrun_function_array_argument() | buffer_overrun_function_array_argument | TestBufferOverrun.buffer_overrun_function_array_argument() |
assigningPointerToPointerIsNotAConstOperation() | assigningPointerToPointerIsNotAConstOperation | TestClass.assigningPointerToPointerIsNotAConstOperation() |
assigningArrayElementIsNotAConstOperation() | assigningArrayElementIsNotAConstOperation | TestClass.assigningArrayElementIsNotAConstOperation() |
secondAlwaysTrueFalseWhenFirstTrueError() | secondAlwaysTrueFalseWhenFirstTrueError | TestCondition.secondAlwaysTrueFalseWhenFirstTrueError() |
testPosixPrintfScanfParameterPosition() | testPosixPrintfScanfParameterPosition | TestIO.testPosixPrintfScanfParameterPosition() |
testMisusedScopeObjectDoesNotPickFunction1() | testMisusedScopeObjectDoesNotPickFunction1 | TestOther.testMisusedScopeObjectDoesNotPickFunction1() |
testMisusedScopeObjectDoesNotPickFunction2() | testMisusedScopeObjectDoesNotPickFunction2 | TestOther.testMisusedScopeObjectDoesNotPickFunction2() |
testMisusedScopeObjectDoesNotPickConstructorDeclaration() | testMisusedScopeObjectDoesNotPickConstructorDeclaration | TestOther.testMisusedScopeObjectDoesNotPickConstructorDeclaration() |
testMisusedScopeObjectDoesNotPickFunctor() | testMisusedScopeObjectDoesNotPickFunctor | TestOther.testMisusedScopeObjectDoesNotPickFunctor() |
testMisusedScopeObjectDoesNotPickLocalClassConstructors() | testMisusedScopeObjectDoesNotPickLocalClassConstructors | TestOther.testMisusedScopeObjectDoesNotPickLocalClassConstructors() |
testMisusedScopeObjectDoesNotPickUsedObject() | testMisusedScopeObjectDoesNotPickUsedObject | TestOther.testMisusedScopeObjectDoesNotPickUsedObject() |
testMisusedScopeObjectDoesNotPickPureC() | testMisusedScopeObjectDoesNotPickPureC | TestOther.testMisusedScopeObjectDoesNotPickPureC() |
testMisusedScopeObjectDoesNotPickNestedClass() | testMisusedScopeObjectDoesNotPickNestedClass | TestOther.testMisusedScopeObjectDoesNotPickNestedClass() |
checkComparisonFunctionIsAlwaysTrueOrFalse() | checkComparisonFunctionIsAlwaysTrueOrFalse | TestOther.checkComparisonFunctionIsAlwaysTrueOrFalse() |
inline_suppression_for_missing_include() | inline_suppression_for_missing_include | TestPreprocessor.inline_suppression_for_missing_include() |
test_isVariableDeclarationCanHandleNull() | test_isVariableDeclarationCanHandleNull | TestSymbolDatabase.test_isVariableDeclarationCanHandleNull() |
test_isVariableDeclarationIdentifiesSimpleDeclaration() | test_isVariableDeclarationIdentifiesSimpleDeclaration | TestSymbolDatabase .test_isVariableDeclarationIdentifiesSimpleDeclaration() |
test_isVariableDeclarationIdentifiesInitialization() | test_isVariableDeclarationIdentifiesInitialization | TestSymbolDatabase.test_isVariableDeclarationIdentifiesInitialization( ) |
test_isVariableDeclarationIdentifiesCpp11Initialization() | test_isVariableDeclarationIdentifiesCpp11Initialization | TestSymbolDatabase .test_isVariableDeclarationIdentifiesCpp11Initialization() |
test_isVariableDeclarationIdentifiesScopedDeclaration() | test_isVariableDeclarationIdentifiesScopedDeclaration | TestSymbolDatabase .test_isVariableDeclarationIdentifiesScopedDeclaration() |
test_isVariableDeclarationIdentifiesStdDeclaration() | test_isVariableDeclarationIdentifiesStdDeclaration | TestSymbolDatabase.test_isVariableDeclarationIdentifiesStdDeclaration( ) |
test_isVariableDeclarationIdentifiesScopedStdDeclaration() | test_isVariableDeclarationIdentifiesScopedStdDeclaration | TestSymbolDatabase .test_isVariableDeclarationIdentifiesScopedStdDeclaration() |
test_isVariableDeclarationIdentifiesManyScopes() | test_isVariableDeclarationIdentifiesManyScopes | TestSymbolDatabase.test_isVariableDeclarationIdentifiesManyScopes() |
test_isVariableDeclarationIdentifiesPointers() | test_isVariableDeclarationIdentifiesPointers | TestSymbolDatabase.test_isVariableDeclarationIdentifiesPointers() |
test_isVariableDeclarationDoesNotIdentifyConstness() | test_isVariableDeclarationDoesNotIdentifyConstness | TestSymbolDatabase.test_isVariableDeclarationDoesNotIdentifyConstness( ) |
test_isVariableDeclarationIdentifiesFirstOfManyVariables() | test_isVariableDeclarationIdentifiesFirstOfManyVariables | TestSymbolDatabase .test_isVariableDeclarationIdentifiesFirstOfManyVariables() |
test_isVariableDeclarationIdentifiesScopedPointerDeclaration() | test_isVariableDeclarationIdentifiesScopedPointerDeclaration | TestSymbolDatabase .test_isVariableDeclarationIdentifiesScopedPointerDeclaration() |
test_isVariableDeclarationIdentifiesDeclarationWithIndirection() | test_isVariableDeclarationIdentifiesDeclarationWithIndirection | TestSymbolDatabase .test_isVariableDeclarationIdentifiesDeclarationWithIndirection() |
test_isVariableDeclarationIdentifiesDeclarationWithMultipleIndirection () | test_isVariableDeclarationIdentifiesDeclarationWithMultipleIndirection | TestSymbolDatabase .test_isVariableDeclarationIdentifiesDeclarationWithMultipleIndirectio n() |
test_isVariableDeclarationIdentifiesArray() | test_isVariableDeclarationIdentifiesArray | TestSymbolDatabase.test_isVariableDeclarationIdentifiesArray() |
test_isVariableDeclarationIdentifiesOfArrayPointers() | test_isVariableDeclarationIdentifiesOfArrayPointers | TestSymbolDatabase.test_isVariableDeclarationIdentifiesOfArrayPointers () |
isVariableDeclarationIdentifiesTemplatedPointerVariable() | isVariableDeclarationIdentifiesTemplatedPointerVariable | TestSymbolDatabase .isVariableDeclarationIdentifiesTemplatedPointerVariable() |
isVariableDeclarationIdentifiesTemplatedPointerToPointerVariable() | isVariableDeclarationIdentifiesTemplatedPointerToPointerVariable | TestSymbolDatabase .isVariableDeclarationIdentifiesTemplatedPointerToPointerVariable() |
isVariableDeclarationIdentifiesTemplatedArrayVariable() | isVariableDeclarationIdentifiesTemplatedArrayVariable | TestSymbolDatabase .isVariableDeclarationIdentifiesTemplatedArrayVariable() |
isVariableDeclarationIdentifiesTemplatedVariable() | isVariableDeclarationIdentifiesTemplatedVariable | TestSymbolDatabase.isVariableDeclarationIdentifiesTemplatedVariable() |
isVariableDeclarationIdentifiesTemplatedVariableIterator() | isVariableDeclarationIdentifiesTemplatedVariableIterator | TestSymbolDatabase .isVariableDeclarationIdentifiesTemplatedVariableIterator() |
isVariableDeclarationIdentifiesNestedTemplateVariable() | isVariableDeclarationIdentifiesNestedTemplateVariable | TestSymbolDatabase .isVariableDeclarationIdentifiesNestedTemplateVariable() |
isVariableDeclarationIdentifiesReference() | isVariableDeclarationIdentifiesReference | TestSymbolDatabase.isVariableDeclarationIdentifiesReference() |
isVariableDeclarationDoesNotIdentifyTemplateClass() | isVariableDeclarationDoesNotIdentifyTemplateClass | TestSymbolDatabase.isVariableDeclarationDoesNotIdentifyTemplateClass() |
isVariableDeclarationDoesNotIdentifyCppCast() | isVariableDeclarationDoesNotIdentifyCppCast | TestSymbolDatabase.isVariableDeclarationDoesNotIdentifyCppCast() |
hasRegularFunctionReturningFunctionPointer() | hasRegularFunctionReturningFunctionPointer | TestSymbolDatabase.hasRegularFunctionReturningFunctionPointer() |
hasInlineClassFunctionReturningFunctionPointer() | hasInlineClassFunctionReturningFunctionPointer | TestSymbolDatabase.hasInlineClassFunctionReturningFunctionPointer() |
hasMissingInlineClassFunctionReturningFunctionPointer() | hasMissingInlineClassFunctionReturningFunctionPointer | TestSymbolDatabase .hasMissingInlineClassFunctionReturningFunctionPointer() |
hasClassFunctionReturningFunctionPointer() | hasClassFunctionReturningFunctionPointer | TestSymbolDatabase.hasClassFunctionReturningFunctionPointer() |
canFindMatchingBracketsWithTooManyClosing() | canFindMatchingBracketsWithTooManyClosing | TestToken.canFindMatchingBracketsWithTooManyClosing() |
canFindMatchingBracketsWithTooManyOpening() | canFindMatchingBracketsWithTooManyOpening | TestToken.canFindMatchingBracketsWithTooManyOpening() |
simplifyKnownVariablesBailOutAssign1() | simplifyKnownVariablesBailOutAssign1 | TestTokenizer.simplifyKnownVariablesBailOutAssign1() |
simplifyKnownVariablesBailOutAssign2() | simplifyKnownVariablesBailOutAssign2 | TestTokenizer.simplifyKnownVariablesBailOutAssign2() |
simplifyKnownVariablesBailOutAssign3() | simplifyKnownVariablesBailOutAssign3 | TestTokenizer.simplifyKnownVariablesBailOutAssign3() |
simplifyKnownVariablesBailOutMemberFunction() | simplifyKnownVariablesBailOutMemberFunction | TestTokenizer.simplifyKnownVariablesBailOutMemberFunction() |
simplifyKnownVariablesBailOutConditionalIncrement() | simplifyKnownVariablesBailOutConditionalIncrement | TestTokenizer.simplifyKnownVariablesBailOutConditionalIncrement() |
simplifyKnownVariablesBailOutSwitchBreak() | simplifyKnownVariablesBailOutSwitchBreak | TestTokenizer.simplifyKnownVariablesBailOutSwitchBreak() |
simplifyMathFunctions_isgreaterequal() | simplifyMathFunctions_isgreaterequal | TestTokenizer.simplifyMathFunctions_isgreaterequal() |
testDoesNotIdentifyMethodAsFirstFunctionArgument() | testDoesNotIdentifyMethodAsFirstFunctionArgument | TestUnusedPrivateFunction .testDoesNotIdentifyMethodAsFirstFunctionArgument() |
testDoesNotIdentifyMethodAsMiddleFunctionArgument() | testDoesNotIdentifyMethodAsMiddleFunctionArgument | TestUnusedPrivateFunction .testDoesNotIdentifyMethodAsMiddleFunctionArgument() |
testDoesNotIdentifyMethodAsLastFunctionArgument() | testDoesNotIdentifyMethodAsLastFunctionArgument | TestUnusedPrivateFunction .testDoesNotIdentifyMethodAsLastFunctionArgument() |
valueFlowBeforeConditionAssignIncDec() | valueFlowBeforeConditionAssignIncDec | TestValueFlow.valueFlowBeforeConditionAssignIncDec() |
valueFlowBeforeConditionAndAndOrOrGuard() | valueFlowBeforeConditionAndAndOrOrGuard | TestValueFlow.valueFlowBeforeConditionAndAndOrOrGuard() |
valueFlowBeforeConditionFunctionCall() | valueFlowBeforeConditionFunctionCall | TestValueFlow.valueFlowBeforeConditionFunctionCall() |
valueFlowBeforeConditionGlobalVariables() | valueFlowBeforeConditionGlobalVariables | TestValueFlow.valueFlowBeforeConditionGlobalVariables() |
Statistics
Stat | SimpleName |
---|---|
Sum: | 0 |
Average: | 0 |
Minimum: | 0 |
Maximum: | 0 |
Standard deviation: | 0 |
Variance: | 0 |
Rule warning: Namespace name should correspond to file location |
// For a good code organization,
// do mirror the namespaces hierarchy and the source files directories tree.
warnif count > 0
from n in Application.Namespaces
// Replace dots by spaces in namespace name
let dirCorresponding = n.Name.Replace('.', ' ')
// Look at source file decl of JustMyCode type's declared in n
from t in n.ChildTypes
where JustMyCode.Contains(t)
from decl in t.SourceDecls
let sourceFilePath = decl.SourceFile.FilePath.ToString()
// Replace dots and path separators by spaces in source files names
where !sourceFilePath.Replace('.',' ').Replace('\\',' ').Contains(dirCorresponding) && !t.IsThirdParty
select new { t, dirCorresponding , sourceFilePath }
81 types matched
types | dirCorresponding | sourceFilePath | Full Name |
---|---|---|---|
__Globals | tinyxml2 | c:\GlobalMembers | tinyxml2.__Globals |
Value | ValueFlow | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\valueflow.h | ValueFlow.Value |
__Globals | ValueFlow | c:\GlobalMembers | ValueFlow.__Globals |
__Globals | anonymous_namespace{check64bit cpp} | c:\GlobalMembers | anonymous_namespace{check64bit.cpp}.__Globals |
__Globals | anonymous_namespace{checkassert cpp} | c:\GlobalMembers | anonymous_namespace{checkassert.cpp}.__Globals |
__Globals | anonymous_namespace{checkautovariables cpp} | c:\GlobalMembers | anonymous_namespace{checkautovariables.cpp}.__Globals |
__Globals | anonymous_namespace{checkbool cpp} | c:\GlobalMembers | anonymous_namespace{checkbool.cpp}.__Globals |
__Globals | anonymous_namespace{checkboost cpp} | c:\GlobalMembers | anonymous_namespace{checkboost.cpp}.__Globals |
__Globals | anonymous_namespace{checkbufferoverrun cpp} | c:\GlobalMembers | anonymous_namespace{checkbufferoverrun.cpp}.__Globals |
__Globals | anonymous_namespace{checkclass cpp} | c:\GlobalMembers | anonymous_namespace{checkclass.cpp}.__Globals |
__Globals | anonymous_namespace{checkcondition cpp} | c:\GlobalMembers | anonymous_namespace{checkcondition.cpp}.__Globals |
__Globals | anonymous_namespace{checkstring cpp} | c:\GlobalMembers | anonymous_namespace{checkstring.cpp}.__Globals |
__Globals | anonymous_namespace{checkexceptionsafety cpp} | c:\GlobalMembers | anonymous_namespace{checkexceptionsafety.cpp}.__Globals |
__Globals | anonymous_namespace{checkio cpp} | c:\GlobalMembers | anonymous_namespace{checkio.cpp}.__Globals |
__Globals | anonymous_namespace{checkleakautovar cpp} | c:\GlobalMembers | anonymous_namespace{checkleakautovar.cpp}.__Globals |
__Globals | anonymous_namespace{checkmemoryleak cpp} | c:\GlobalMembers | anonymous_namespace{checkmemoryleak.cpp}.__Globals |
__Globals | anonymous_namespace{checknonreentrantfunctions cpp} | c:\GlobalMembers | anonymous_namespace{checknonreentrantfunctions.cpp}.__Globals |
__Globals | anonymous_namespace{checknullpointer cpp} | c:\GlobalMembers | anonymous_namespace{checknullpointer.cpp}.__Globals |
__Globals | anonymous_namespace{checkobsolescentfunctions cpp} | c:\GlobalMembers | anonymous_namespace{checkobsolescentfunctions.cpp}.__Globals |
__Globals | anonymous_namespace{checkother cpp} | c:\GlobalMembers | anonymous_namespace{checkother.cpp}.__Globals |
__Globals | anonymous_namespace{checkpostfixoperator cpp} | c:\GlobalMembers | anonymous_namespace{checkpostfixoperator.cpp}.__Globals |
__Globals | anonymous_namespace{checksizeof cpp} | c:\GlobalMembers | anonymous_namespace{checksizeof.cpp}.__Globals |
__Globals | anonymous_namespace{checkstl cpp} | c:\GlobalMembers | anonymous_namespace{checkstl.cpp}.__Globals |
__Globals | anonymous_namespace{checktype cpp} | c:\GlobalMembers | anonymous_namespace{checktype.cpp}.__Globals |
__Globals | anonymous_namespace{checkuninitvar cpp} | c:\GlobalMembers | anonymous_namespace{checkuninitvar.cpp}.__Globals |
__Globals | anonymous_namespace{checkunusedvar cpp} | c:\GlobalMembers | anonymous_namespace{checkunusedvar.cpp}.__Globals |
__Globals | anonymous_namespace{checkvaarg cpp} | c:\GlobalMembers | anonymous_namespace{checkvaarg.cpp}.__Globals |
__Globals | anonymous_namespace{timer cpp} | c:\GlobalMembers | anonymous_namespace{timer.cpp}.__Globals |
scopeStackEntryType | anonymous_namespace{tokenize cpp} | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\tokenize.cpp | anonymous_namespace{tokenize.cpp}.scopeStackEntryType |
__Globals | anonymous_namespace{test64bit cpp} | c:\GlobalMembers | anonymous_namespace{test64bit.cpp}.__Globals |
__Globals | anonymous_namespace{testassert cpp} | c:\GlobalMembers | anonymous_namespace{testassert.cpp}.__Globals |
__Globals | anonymous_namespace{testautovariables cpp} | c:\GlobalMembers | anonymous_namespace{testautovariables.cpp}.__Globals |
__Globals | anonymous_namespace{testbool cpp} | c:\GlobalMembers | anonymous_namespace{testbool.cpp}.__Globals |
__Globals | anonymous_namespace{testboost cpp} | c:\GlobalMembers | anonymous_namespace{testboost.cpp}.__Globals |
__Globals | anonymous_namespace{testbufferoverrun cpp} | c:\GlobalMembers | anonymous_namespace{testbufferoverrun.cpp}.__Globals |
__Globals | anonymous_namespace{testcharvar cpp} | c:\GlobalMembers | anonymous_namespace{testcharvar.cpp}.__Globals |
__Globals | anonymous_namespace{testclass cpp} | c:\GlobalMembers | anonymous_namespace{testclass.cpp}.__Globals |
__Globals | anonymous_namespace{testcmdlineparser cpp} | c:\GlobalMembers | anonymous_namespace{testcmdlineparser.cpp}.__Globals |
__Globals | anonymous_namespace{testcondition cpp} | c:\GlobalMembers | anonymous_namespace{testcondition.cpp}.__Globals |
__Globals | anonymous_namespace{testconstructors cpp} | c:\GlobalMembers | anonymous_namespace{testconstructors.cpp}.__Globals |
__Globals | anonymous_namespace{testcppcheck cpp} | c:\GlobalMembers | anonymous_namespace{testcppcheck.cpp}.__Globals |
__Globals | anonymous_namespace{testerrorlogger cpp} | c:\GlobalMembers | anonymous_namespace{testerrorlogger.cpp}.__Globals |
__Globals | anonymous_namespace{testexceptionsafety cpp} | c:\GlobalMembers | anonymous_namespace{testexceptionsafety.cpp}.__Globals |
__Globals | anonymous_namespace{testfilelister cpp} | c:\GlobalMembers | anonymous_namespace{testfilelister.cpp}.__Globals |
__Globals | anonymous_namespace{testgarbage cpp} | c:\GlobalMembers | anonymous_namespace{testgarbage.cpp}.__Globals |
__Globals | anonymous_namespace{testincompletestatement cpp} | c:\GlobalMembers | anonymous_namespace{testincompletestatement.cpp}.__Globals |
__Globals | anonymous_namespace{testio cpp} | c:\GlobalMembers | anonymous_namespace{testio.cpp}.__Globals |
__Globals | anonymous_namespace{testleakautovar cpp} | c:\GlobalMembers | anonymous_namespace{testleakautovar.cpp}.__Globals |
__Globals | anonymous_namespace{testlibrary cpp} | c:\GlobalMembers | anonymous_namespace{testlibrary.cpp}.__Globals |
__Globals | anonymous_namespace{testmathlib cpp} | c:\GlobalMembers | anonymous_namespace{testmathlib.cpp}.__Globals |
__Globals | anonymous_namespace{testmemleak cpp} | c:\GlobalMembers | anonymous_namespace{testmemleak.cpp}.__Globals |
__Globals | anonymous_namespace{testnonreentrantfunctions cpp} | c:\GlobalMembers | anonymous_namespace{testnonreentrantfunctions.cpp}.__Globals |
__Globals | anonymous_namespace{testnullpointer cpp} | c:\GlobalMembers | anonymous_namespace{testnullpointer.cpp}.__Globals |
__Globals | anonymous_namespace{testobsolescentfunctions cpp} | c:\GlobalMembers | anonymous_namespace{testobsolescentfunctions.cpp}.__Globals |
__Globals | anonymous_namespace{testoptions cpp} | c:\GlobalMembers | anonymous_namespace{testoptions.cpp}.__Globals |
__Globals | anonymous_namespace{testother cpp} | c:\GlobalMembers | anonymous_namespace{testother.cpp}.__Globals |
__Globals | anonymous_namespace{testpath cpp} | c:\GlobalMembers | anonymous_namespace{testpath.cpp}.__Globals |
__Globals | anonymous_namespace{testpathmatch cpp} | c:\GlobalMembers | anonymous_namespace{testpathmatch.cpp}.__Globals |
__Globals | anonymous_namespace{testpostfixoperator cpp} | c:\GlobalMembers | anonymous_namespace{testpostfixoperator.cpp}.__Globals |
__Globals | anonymous_namespace{testpreprocessor cpp} | c:\GlobalMembers | anonymous_namespace{testpreprocessor.cpp}.__Globals |
__Globals | anonymous_namespace{testsamples cpp} | c:\GlobalMembers | anonymous_namespace{testsamples.cpp}.__Globals |
__Globals | anonymous_namespace{testsimplifytemplate cpp} | c:\GlobalMembers | anonymous_namespace{testsimplifytemplate.cpp}.__Globals |
__Globals | anonymous_namespace{testsimplifytokens cpp} | c:\GlobalMembers | anonymous_namespace{testsimplifytokens.cpp}.__Globals |
__Globals | anonymous_namespace{testsimplifytypedef cpp} | c:\GlobalMembers | anonymous_namespace{testsimplifytypedef.cpp}.__Globals |
__Globals | anonymous_namespace{testsizeof cpp} | c:\GlobalMembers | anonymous_namespace{testsizeof.cpp}.__Globals |
__Globals | anonymous_namespace{teststl cpp} | c:\GlobalMembers | anonymous_namespace{teststl.cpp}.__Globals |
__Globals | anonymous_namespace{teststring cpp} | c:\GlobalMembers | anonymous_namespace{teststring.cpp}.__Globals |
__Globals | anonymous_namespace{testsuppressions cpp} | c:\GlobalMembers | anonymous_namespace{testsuppressions.cpp}.__Globals |
__Globals | anonymous_namespace{testsymboldatabase cpp} | c:\GlobalMembers | anonymous_namespace{testsymboldatabase.cpp}.__Globals |
__Globals | anonymous_namespace{testthreadexecutor cpp} | c:\GlobalMembers | anonymous_namespace{testthreadexecutor.cpp}.__Globals |
__Globals | anonymous_namespace{testtimer cpp} | c:\GlobalMembers | anonymous_namespace{testtimer.cpp}.__Globals |
__Globals | anonymous_namespace{testtoken cpp} | c:\GlobalMembers | anonymous_namespace{testtoken.cpp}.__Globals |
__Globals | anonymous_namespace{testtokenize cpp} | c:\GlobalMembers | anonymous_namespace{testtokenize.cpp}.__Globals |
__Globals | anonymous_namespace{testtype cpp} | c:\GlobalMembers | anonymous_namespace{testtype.cpp}.__Globals |
__Globals | anonymous_namespace{testuninitvar cpp} | c:\GlobalMembers | anonymous_namespace{testuninitvar.cpp}.__Globals |
__Globals | anonymous_namespace{testunusedfunctions cpp} | c:\GlobalMembers | anonymous_namespace{testunusedfunctions.cpp}.__Globals |
__Globals | anonymous_namespace{testunusedprivfunc cpp} | c:\GlobalMembers | anonymous_namespace{testunusedprivfunc.cpp}.__Globals |
__Globals | anonymous_namespace{testunusedvar cpp} | c:\GlobalMembers | anonymous_namespace{testunusedvar.cpp}.__Globals |
__Globals | anonymous_namespace{testvaarg cpp} | c:\GlobalMembers | anonymous_namespace{testvaarg.cpp}.__Globals |
__Globals | anonymous_namespace{testvalueflow cpp} | c:\GlobalMembers | anonymous_namespace{testvalueflow.cpp}.__Globals |
__Globals | anonymous_namespace{testvarid cpp} | c:\GlobalMembers | anonymous_namespace{testvarid.cpp}.__Globals |
Statistics
Stat | dirCorresponding | sourceFilePath |
---|---|---|
Sum: | 0 | 0 |
Average: | 0 | 0 |
Minimum: | 0 | 0 |
Maximum: | 0 | 0 |
Standard deviation: | 0 | 0 |
Variance: | 0 | 0 |
Source Files Organization | 040 |
|
Rule warning: Avoid defining multiple types in a source file |
warnif count > 0
// Build a lookup indexed by source files, values being a sequence of types defined in the source file.
let lookup = Application.Types.Where(t =>
!t.IsGlobal &&
// except nested types and types generated by compilers!
!t.IsGeneratedByCompiler &&
!t.IsNested)
// It could make sense to not apply this rule for enumerations.
// && !t.IsEnumeration)
// We use multi-key, since a type can be declared in multiple source files.
.ToMultiKeyLookup(t => t.SourceDecls.Select(d => d.SourceFile))
from @group in lookup where @group.Count() > 1
let sourceFile = @group.Key
// CQLinq doesn't let indexing result with sourceFile
// so we choose a typeIndex in types,
// preferably the type that has the file name.
let typeWithSourceFileName = @group.FirstOrDefault(t => t.SimpleName == sourceFile.FileNameWithoutExtension)
let typeIndex = typeWithSourceFileName ?? @group.First()
select new { typeIndex,
types = @group as IEnumerable<IType>,
sourceFile.FilePathString }
16 types matched
types | types | FilePathString | Full Name |
---|---|---|---|
InternalError | 3 types | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\errorlogger.h | InternalError |
SHOWTIME_MODES | 5 types | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\timer.h | SHOWTIME_MODES |
AccessControl | 7 types | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\symboldatabase.h | AccessControl |
OpenMode | 2 types | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkio.cpp | OpenMode |
VarInfo | 2 types | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkleakautovar.h | VarInfo |
CheckMemoryLeak | 5 types | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\checkmemoryleak.h | CheckMemoryLeak |
Space | 3 types | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\tokenize.cpp | Space |
StrPair | 19 types | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\externals\tinyxml\tinyxml2.h | tinyxml2.StrPair |
CmdLineParser | 2 types | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\cli\cmdlineparser.h | CmdLineParser |
CppCheckExecutor | 2 types | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\cli\cppcheckexecutor.h | CppCheckExecutor |
FileLister | 2 types | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\cli\filelister.h | FileLister |
PathMatch | 2 types | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\cli\pathmatch.h | PathMatch |
ThreadExecutor | 2 types | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\cli\threadexecutor.h | ThreadExecutor |
IMAGEHLP_SYMBOL64_EXT | 2 types | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\cli\cppcheckexecutor.cpp | IMAGEHLP_SYMBOL64_EXT |
TestMemleak | 7 types | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\test\testmemleak.cpp | TestMemleak |
givenACodeSampleToTokenize | 2 types | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\test\testutils.h | givenACodeSampleToTokenize |
Statistics
Stat | types | FilePathString |
---|---|---|
Sum: | 0 | 0 |
Average: | 0 | 0 |
Minimum: | 0 | 0 |
Maximum: | 0 | 0 |
Standard deviation: | 0 | 0 |
Variance: | 0 | 0 |
Rule warning: Namespace name should correspond to file location |
// For a good code organization,
// do mirror the namespaces hierarchy and the source files directories tree.
warnif count > 0
from n in Application.Namespaces
// Replace dots by spaces in namespace name
let dirCorresponding = n.Name.Replace('.', ' ')
// Look at source file decl of JustMyCode type's declared in n
from t in n.ChildTypes
where JustMyCode.Contains(t) && !t.IsGlobal
from decl in t.SourceDecls
let sourceFilePath = decl.SourceFile.FilePath.ToString()
// Replace dots and path separators by spaces in source files names
where !sourceFilePath.Replace('.',' ').Replace('\\',' ').Contains(dirCorresponding)
select new { t, dirCorresponding , sourceFilePath }
2 types matched
types | dirCorresponding | sourceFilePath | Full Name |
---|---|---|---|
Value | ValueFlow | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\valueflow.h | ValueFlow.Value |
scopeStackEntryType | anonymous_namespace{tokenize cpp} | C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\lib\tokenize.cpp | anonymous_namespace{tokenize.cpp}.scopeStackEntryType |
Statistics
Stat | dirCorresponding | sourceFilePath |
---|---|---|
Sum: | 0 | 0 |
Average: | 0 | 0 |
Minimum: | 0 | 0 |
Maximum: | 0 | 0 |
Standard deviation: | 0 | 0 |
Variance: | 0 | 0 |
Rule warning: Types with source files stored in the same directory, should be declared in the same namespace |
warnif count > 0
// Group JustMyCode types in a lookup
// where groups are keyed with directories that contain the types' source file(s).
// Note that a type can be contained in several groups
// if it is declared in several source files stored in different directories.
let lookup = JustMyCode.Types.Where(t => !t.IsGlobal)
.ToMultiKeyLookup(
t => t.SourceDecls.Select(
decl => decl.SourceFile.FilePath.ParentDirectoryPath).Distinct()
)
from groupOfTypes in lookup
let parentNamespaces = groupOfTypes.ParentNamespaces()
// Select group of types (with source files stored in the same directory) ...
// ... but contained in several namespaces
where parentNamespaces.Count() > 1
// mainNamespaces is the namespace that contains many types
// declared in the directory groupOfTypes .key
let mainNamespace = groupOfTypes
.ToLookup(t => t.ParentNamespace)
.OrderByDescending(g => g.Count()).First().Key
// Select types with source files stored in the same directory,
// but contained in namespaces different than mainNamespace.
let typesOutOfMainNamespace = groupOfTypes
.Where(t => t.ParentNamespace != mainNamespace )
// Filter types declared on several source files that contain generated methods
// because typically such type contains one or several partial definitions generated.
// These partially generated types would be false positive for the present rule.
.Where(t => t.SourceDecls.Count() == 1 ||
t.Methods.Count(m => JustMyCode.Contains(m)) == 0)
where typesOutOfMainNamespace.Count() > 0
select new { mainNamespace,
// Typically a type in typesOutOfMainNamespace ...
// 1) ... is contained in the wrong namespace but its source file(s) is stored in the right directory.
// --> In such situation the type should be contained in mainNamespace.
// 2) ... is contained in the right namespace but its source file(s) is stored in the wrong directory
// --> In such situation the source file of type must be moved to the parent namespace directory.
// 3) ... is declared in multiple source files, stored in different directories.
// --> It would be preferable that all source files are stored in a single directory.
typesOutOfMainNamespace }
2 namespaces matched
namespaces | typesOutOfMainNamespace | Full Name |
---|---|---|
2 types | ||
7 types |
Statistics
Stat | typesOutOfMainNamespace |
---|---|
Sum: | 0 |
Average: | 0 |
Minimum: | 0 |
Maximum: | 0 |
Standard deviation: | 0 |
Variance: | 0 |
Rule warning: Types declared in the same namespace, should have their source files stored in the same directory |
warnif count > 0
from @namespace in Application.Namespaces
// Group types of @namespace in a lookup
// where groups are keyed with directories that contain the types' source file(s).
// Note that a type can be contained in several groups
// if it is declared in several source files stored in different directories.
let lookup = @namespace.ChildTypes.Where(t => !t.IsGlobal && JustMyCode.Contains(t))
.ToMultiKeyLookup(
t => t.SourceDecls.Select(
decl => decl.SourceFile.FilePath.ParentDirectoryPath).Distinct()
)
// Are types of @namespaces declared in more than one directory?
where lookup.Count > 1
// Infer the main directory, preferably the one that has the same name as the namespace.
let dirs = lookup.Select(types => types.Key)
let mainDirNullable = dirs.Where(d => d.DirectoryName == @namespace.SimpleName).FirstOrDefault()
let mainDir = mainDirNullable ?? dirs.First()
// Types declared out of mainDir, are types in group of types declared in a directory different than mainDir!
let typesDeclaredOutOfMainDir = lookup.Where(types => types.Key != mainDir)
.SelectMany(types => types)
// Filter types declared on several source files that contain generated methods
// because typically such type contains one or several partial definitions generated.
// These partially generated types would be false positive for the present rule.
.Where(t => t.SourceDecls.Count() == 1 ||
t.Methods.Count(m => JustMyCode.Contains(m)) == 0)
where typesDeclaredOutOfMainDir.Count() > 0
select new { @namespace,
// Typically a type in typesDeclaredOutOfMainDir ...
// 1) ... is contained in the wrong namespace but its source file(s) is stored in the right directory.
// --> In such situation the type parent namespace should be the namespace corresponding to the directory.
// 2) ... is contained in the right namespace but its source file(s) is stored in the wrong directory
// --> In such situation the type source file should be moved to mainDir.
// 3) ... is declared in multiple source files, stored in different directories.
// --> It would be preferable that all source files are stored in a single directory.
typesDeclaredOutOfMainDir ,
mainDir = mainDir.ToString() }
3 namespaces matched
namespaces | typesDeclaredOutOfMainDir | mainDir | Full Name |
---|---|---|---|
120 types | c: | ||
7 types | c: | ||
73 types | c: |
Statistics
Stat | typesDeclaredOutOfMainDir | mainDir |
---|---|---|
Sum: | 0 | 0 |
Average: | 0 | 0 |
Minimum: | 0 | 0 |
Maximum: | 0 | 0 |
Standard deviation: | 0 | 0 |
Variance: | 0 | 0 |
Object Oriented Design
• How to Fix Violations: Understand the need for using derivatives, then imagine a new design, and then refactor. Typically an algorithm in the base class needs to access something from derived classes. You can try to encapsulate this access behind an abstract or a virtual method. If you see in the base class some conditions on typeof(DerivedClass) not only urgent refactoring is needed. Such condition can easily be replaced through an abstract or a virtual method. Sometime you'll see a base class that creates instance of some derived classes. In such situation, certainly using the factory method pattern http://en.wikipedia.org/wiki/Factory_method_pattern or the abstract factory pattern http://en.wikipedia.org/wiki/Abstract_factory_pattern will improve the design.
1 types matched
type | derivedClassesUsed | Full Name |
---|---|---|
XMLNode | 6 types | tinyxml2.XMLNode |
Statistics
Stat | derivedClassesUsed |
---|---|
Sum: | 0 |
Average: | 0 |
Minimum: | 0 |
Maximum: | 0 |
Standard deviation: | 0 |
Variance: | 0 |
• How to Fix Violations: In Object-Oriented Programming, a well-known motto is Favor Composition over Inheritance. This is because inheritance comes with pitfalls. In general, the implementation of a derived class is very bound up with the base class implementation. Also a base class exposes implementation details to its derived classes, that's why it's often said that inheritance breaks encapsulation. On the other hands, Composition favors binding with interfaces over binding with implementations. Hence, not only the encapsulation is preserved, but the design is clearer, because interfaces make it explicit and less coupled. Hence, to break a long inheritance chain, Composition is often a powerful way to enhance the design of the refactored underlying logic. You can also read: http://en.wikipedia.org/wiki/Composition_over_inheritance and http://stackoverflow.com/questions/49002/prefer-composition-over-inheritance
No types matched
// Returns constructor of a non-sealed type calling virtual methods.
// In such a situation, if a derived class overrides the method,
// then the override method will be called before the derived constructor.
// This makes the class fragile to derive from.
//
// Violations reported can be solved by re-designing object initialisation
// or by marking the parent class as sealed, if possible.
warnif count > 0
from t in Application.Types where
t.IsClass &&
!t.IsGeneratedByCompiler
from ctor in t.Constructors
let virtualMethodsCalled = from mCalled in ctor.MethodsCalled
where mCalled.IsVirtual &&
(mCalled.ParentType == t ||
t.DeriveFrom(mCalled.ParentType))
select mCalled
where virtualMethodsCalled.Count() > 0
select new { ctor ,
virtualMethodsCalled,
// If there is no derived type, it might be
// an opportunity to mark t as sealed.
t.DerivedTypes }
1 methods matched
method | virtualMethodsCalled | DerivedTypes | Full Name |
---|---|---|---|
SymbolDatabase(constTokenizer*,constSettings*,ErrorLogger*) | 1 method | 0 type | SymbolDatabase.SymbolDatabase(constTokenizer*,constSettings* ,ErrorLogger*) |
Statistics
Stat | virtualMethodsCalled | DerivedTypes |
---|---|---|
Sum: | 0 | 0 |
Average: | 0 | 0 |
Minimum: | 0 | 0 |
Maximum: | 0 | 0 |
Standard deviation: | 0 | 0 |
Variance: | 0 | 0 |
warnif count > 0
from t in Application.Types
where !t.IsStatic && !t.IsAbstract && (t.IsClass || t.IsStructure)
// All ctors of a singleton are private
where t.Constructors.Where(ctor => !ctor.IsPrivate).Count() == 0
// A singleton contains one static field of its parent type, to reference the unique instance
let staticFieldInstances = t.StaticFields.WithFieldType(t)
where staticFieldInstances.Count() == 1
select new { t, staticFieldInstance = staticFieldInstances.First() }
// The Singleton pattern consists in syntactically enforcing that a class
// has just one unique instance.
// At first glance, this pattern looks appealing and it is widely used.
// However, we discourage you from using singleton classes because experience
// shows that singletons often result in less testable and less maintainable code.
// More details available in these discussions:
// http://codebetter.com/patricksmacchia/2011/05/04/back-to-basics-usage-of-static-members/
// http://adamschepis.com/blog/2011/05/02/im-adam-and-im-a-recovering-singleton-addict/
No types matched
• How to Fix Violations: If the static field is just assigned once in the program lifetime, make sure to declare it as readonly and assign it inline, or from the static constructor. In Object-Oriented-Programming the natural artifact to hold states that can be modified is instance fields. Hence to fix violations of this rule, make sure to hold assignable states through instance fields, not through static fields.
3 fields matched
fields | assignedBy | Full Name |
---|---|---|
macroChar | 5 methods | Preprocessor.macroChar |
missingIncludeFlag | 5 methods | Preprocessor.missingIncludeFlag |
missingSystemIncludeFlag | 3 methods | Preprocessor.missingSystemIncludeFlag |
Statistics
Stat | assignedBy |
---|---|
Sum: | 0 |
Average: | 0 |
Minimum: | 0 |
Maximum: | 0 |
Standard deviation: | 0 |
Variance: | 0 |
// An abstract class should abstract a clear and well-defined concept.
// Such concept shoudln't be represented with too many methods and property getter.
warnif count > 0 from t in JustMyCode.Types where
t.IsAbstract
let methodsAndGetters = t.Methods
where methodsAndGetters.Count() > 10
select new { t, methodsAndGetters }
4 types matched
types | methodsAndGetters | Full Name |
---|---|---|
Check | 16 methods | Check |
ExecutionPath | 13 methods | ExecutionPath |
XMLNode | 49 methods | tinyxml2.XMLNode |
TestFixture | 23 methods | TestFixture |
Statistics
Stat | methodsAndGetters |
---|---|
Sum: | 0 |
Average: | 0 |
Minimum: | 0 |
Maximum: | 0 |
Standard deviation: | 0 |
Variance: | 0 |
API Breaking Changes
|
// This rule warns if a publicly visible type is
// not publicly visible anymore or if it has been removed.
// Such type can break the code of your clients.
warnif count > 0 from t in codeBase.OlderVersion().Application.Types
where t.IsPublic &&
// The type has been removed and its parent project hasn't been removed ...
( (t.WasRemoved() && !t.ParentProject.WasRemoved()) ||
// ... or the type is not publicly visible anymore
!t.WasRemoved() && !t.NewerVersion().IsPublic)
select new { t,
NewVisibility = (t.WasRemoved() ? " " : t.NewerVersion().Visibility.ToString()) }
No types matched
// This rule warns if a publicly visible method is
// not publicly visible anymore or if it has been removed.
// Such method can break the code of your clients.
warnif count > 0 from m in codeBase.OlderVersion().Application.Methods
where m.IsPublic &&
// The method has been removed and its parent type hasn't been removed ...
( (m.WasRemoved() && !m.ParentType.WasRemoved()) ||
// ... or the method is not publicly visible anymore
!m.WasRemoved() && !m.NewerVersion().IsPublic)
select new { m,
NewVisibility = (m.WasRemoved() ? " " : m.NewerVersion().Visibility.ToString()) }
No methods matched
// This rule warns if a publicly visible field is
// not publicly visible anymore or if it has been removed.
// Such field can break the code of your clients.
warnif count > 0 from f in codeBase.OlderVersion().Application.Fields
where f.IsPublic &&
// The field has been removed and its parent type hasn't been removed ...
( (f.WasRemoved() && !f.ParentType.WasRemoved()) ||
// ... or the field is not publicly visible anymore
!f.WasRemoved() && !f.NewerVersion().IsPublic)
select new { f,
NewVisibility = (f.WasRemoved() ? " " : f.NewerVersion().Visibility.ToString()) }
No fields matched
// This rule warns if a publicly visible interface or abstract class
// has been changed and contains new abstract methods or
// if some abstract methods have been removed.
// This can break the code of clients
// that implement such interface or derive from such abstract class.
warnif count > 0 from tNewer in Application.Types where
(tNewer.IsInterface || tNewer.IsClass && tNewer.IsAbstract) &&
tNewer.IsPublic &&
tNewer.IsPresentInBothBuilds()
let tOlder = tNewer.OlderVersion() where tOlder.IsPublic
let methodsRemoved = tOlder.Methods.Where(m => m.IsAbstract && m.WasRemoved())
let methodsAdded = tNewer.Methods.Where(m => m.IsAbstract && m.WasAdded())
where methodsAdded.Count() > 0 || methodsRemoved.Count() > 0
select new { tNewer, methodsAdded, methodsRemoved }
No types matched
// Immutability is a strong property on a type.
// Breaking immutability can result in serious problem for an algorithm consummer
// that has been written taking account of the type immutability.
// To visualize changes in code, right-click a matched type and select:
// - Compare older and newer versions of source file
// - Compare older and newer versions disassembled with Reflector
warnif count > 0
from t in Application.Types where
t.IsPresentInBothBuilds() &&
!t.IsStatic &&
!t.IsImmutable &&
t.OlderVersion().IsImmutable
let mutableFields = from f in t.InstanceFields where !f.IsImmutable select f
select new { t, mutableFields }
No types matched
// List types that are new in the public surface of your Projects
from t in Application.Types
where t.IsPublic &&
// The type has been removed and its parent project hasn't been removed ...
( (t.WasAdded() && !t.ParentProject.WasAdded()) ||
// ... or the type existed but was not publicly visible
!t.WasAdded() && !t.OlderVersion().IsPublic)
select new { t,
OldVisibility = (t.WasAdded() ? " " : t.OlderVersion().Visibility.ToString()) }
No types matched
// List methods that are new in the public surface of your Projects
from m in Application.Methods
where m.IsPublic &&
// The method has been removed and its parent project hasn'm been removed ...
( (m.WasAdded() && !m.ParentType.WasAdded()) ||
// ... or the t existed but was not publicly visible
!m.WasAdded() && !m.OlderVersion().IsPublic)
select new { m,
OldVisibility = (m.WasAdded() ? " " : m.OlderVersion().Visibility.ToString()) }
No methods matched
// List fields that are new in the public surface of your Projects
from f in Application.Fields
where f.IsPublic &&
// The method has been removed and its parent project hasn'f been removed ...
( (f.WasAdded() && !f.ParentType.WasAdded()) ||
// ... or the t existed but was not publicly visible
!f.WasAdded() && !f.OlderVersion().IsPublic)
select new { f,
OldVisibility = (f.WasAdded() ? " " : f.OlderVersion().Visibility.ToString()) }
No fields matched
Code Diff Summary
|
from a in Application.Projects where a.WasAdded()
select new { a, a.NbLinesOfCode }
No projects matched
from a in codeBase.OlderVersion().Application.Projects where a.WasRemoved()
select new { a, a.NbLinesOfCode }
No projects matched
from a in Application.Projects where a.CodeWasChanged()
select new { a, a.NbLinesOfCode,
oldNbLinesOfCode = a.OlderVersion().NbLinesOfCode ,
delta = (int) a.NbLinesOfCode - a.OlderVersion().NbLinesOfCode }
No projects matched
from n in Application.Namespaces where
!n.ParentProject.WasAdded() &&
n.WasAdded()
select new { n, n.NbLinesOfCode }
No namespaces matched
from n in codeBase.OlderVersion().Application.Namespaces where
!n.ParentProject.WasRemoved() &&
n.WasRemoved()
select new { n, n.NbLinesOfCode }
No namespaces matched
from n in Application.Namespaces where n.CodeWasChanged()
select new { n, n.NbLinesOfCode,
oldNbLinesOfCode = n.OlderVersion().NbLinesOfCode ,
delta = (int) n.NbLinesOfCode - n.OlderVersion().NbLinesOfCode }
No namespaces matched
from t in Application.Types where
!t.ParentNamespace.WasAdded() &&
t.WasAdded()
select new { t, t.NbLinesOfCode }
No types matched
from t in codeBase.OlderVersion().Application.Types where
!t.ParentNamespace.WasRemoved() &&
t.WasRemoved()
select new { t, t.NbLinesOfCode }
No types matched
// To visualize changes in code, right-click a matched type and select:
// - Compare older and newer versions of source file
// - Compare older and newer versions disassembled with Reflector
from t in Application.Types where t.CodeWasChanged()
//select new { t, t.NbLinesOfCode }
select new { t, t.NbLinesOfCode,
oldNbLinesOfCode = t.OlderVersion().NbLinesOfCode ,
delta = (int?) t.NbLinesOfCode - t.OlderVersion().NbLinesOfCode }
/*from t in Application.Types where t.CodeWasChanged() && t.IsPresentInBothBuild
select new { t, t.NbLinesOfCode,
oldNbLinesOfCode = t.OlderVersion().NbLinesOfCode ,
delta = (int) t.NbLinesOfCode - t.OlderVersion().NbLinesOfCode }*/
No types matched
let typesRemoved = codeBase.OlderVersion().Types.Where(t => t.WasRemoved())
let typesAdded = Types.Where(t => t.WasAdded())
from tMoved in typesAdded.Join(
typesRemoved,
t => t.Name,
t => t.Name,
(tNewer, tOlder) => new { tNewer,
OlderParentNamespace = tOlder.ParentNamespace,
OlderParentproject = tOlder.ParentProject } )
select tMoved
No types matched
let typesChanged = Application.Types.Where(t => t.CodeWasChanged()).ToHashSet()
from t in JustMyCode.Types.UsingAny(typesChanged) where
!t.CodeWasChanged() &&
!t.WasAdded()
let typesChangedUsed = t.TypesUsed.Intersect(typesChanged)
select new { t, typesChangedUsed }
No types matched
let typesChanged = Application.Types.Where(t => t.CodeWasChanged()).ToHashSet()
// 'depth' represents a code metric defined on types using
// directly or indirectly any type where code was changed.
let depth = JustMyCode.Types.DepthOfIsUsingAny(typesChanged)
from t in depth.DefinitionDomain where
!t.CodeWasChanged() &&
!t.WasAdded()
let typesChangedDirectlyUsed = t.TypesUsed.Intersect(typesChanged)
let depthOfUsingTypesChanged = depth[t]
orderby depthOfUsingTypesChanged
select new { t, depthOfUsingTypesChanged, typesChangedDirectlyUsed }
No types matched
from m in Application.Methods where
!m.ParentType.WasAdded() &&
m.WasAdded()
select new { m, m.NbLinesOfCode }
No methods matched
from m in codeBase.OlderVersion().Application.Methods where
!m.ParentType.WasRemoved() &&
m.WasRemoved()
select new { m, m.NbLinesOfCode }
No methods matched
// To visualize changes in code, right-click a matched method and select:
// - Compare older and newer versions of source file
// - Compare older and newer versions disassembled with Reflector
from m in Application.Methods where m.CodeWasChanged()
select new { m, m.NbLinesOfCode,
oldNbLinesOfCode = m.OlderVersion().NbLinesOfCode ,
delta = (int?) m.NbLinesOfCode - m.OlderVersion().NbLinesOfCode }
No methods matched
let methodsChanged = Application.Methods.Where(m => m.CodeWasChanged()).ToHashSet()
from m in JustMyCode.Methods.UsingAny(methodsChanged ) where
!m.CodeWasChanged() &&
!m.WasAdded()
let methodsChangedCalled = m.MethodsCalled.Intersect(methodsChanged)
select new { m, methodsChangedCalled }
No methods matched
let methodsChanged = Application.Methods.Where(m => m.CodeWasChanged()).ToHashSet()
// 'depth' represents a code metric defined on methods using
// directly or indirectly any method where code was changed.
let depth = JustMyCode.Methods.DepthOfIsUsingAny(methodsChanged)
from m in depth.DefinitionDomain where
!m.CodeWasChanged() &&
!m.WasAdded()
let methodsChangedDirectlyUsed = m.MethodsCalled.Intersect(methodsChanged)
let depthOfUsingMethodsChanged = depth[m]
orderby depthOfUsingMethodsChanged
select new { m, depthOfUsingMethodsChanged, methodsChangedDirectlyUsed }
No methods matched
from f in Application.Fields where
!f.ParentType.WasAdded() &&
f.WasAdded()
select new { f }
No fields matched
from f in codeBase.OlderVersion().Application.Fields where
!f.ParentType.WasRemoved() &&
f.WasRemoved()
select new { f }
No fields matched
from t in ThirdParty.Types where t.IsUsedRecently()
select new { t, t.Methods, t.Fields }
No types matched
from t in codeBase.OlderVersion().Types where t.IsNotUsedAnymore()
select new { t, t.Methods, t.Fields }
No types matched
from m in ThirdParty.Methods where
m.IsUsedRecently() &&
!m.ParentType.IsUsedRecently()
select m
No methods matched
from m in codeBase.OlderVersion().Methods where
m.IsNotUsedAnymore() &&
!m.ParentType.IsNotUsedAnymore()
select m
No methods matched
from f in ThirdParty.Fields where
f.IsUsedRecently() &&
!f.ParentType.IsUsedRecently()
select f
No fields matched
from f in codeBase.OlderVersion().Fields where
f.IsNotUsedAnymore() &&
!f.ParentType.IsNotUsedAnymore()
select f
No fields matched
Test and Code Coverage
|
• How to Fix Violations: In such situation, it is recommended to both refactor the complex method logic into several smaller and less complex methods (that might belong to some new types especially created), and also write unit-tests to full cover the refactored logic. You'll find code impossible to cover by unit-tests, like calls to MessageBox.Show(). An infrastructure must be defined to be able to mock such code at test-time.
No methods matched
• How to Fix Violations: In such situation, it is recommended to both: • refactor the complex method logic into several smaller and less complex methods (that might belong to some new types especially created), • and also write more unit-tests to full cover the refactored logic. You'll find code impossible to cover by unit-tests, like calls to MessageBox.Show(). An infrastructure must be defined to be able to mock such code at test-time.
No methods matched
• How to Fix Violations: Write unit-tests to cover the code of most methods and classes refactored.
No methods matched
• How to Fix Violations: Write unit-tests to cover the code of most methods and classes added.
No methods matched
• How to Fix Violations: Write more unit-tests dedicated to cover code not covered yet. If you find some hard-to-test code, it is certainly a sign that this code is not well designed and hence, needs refactoring.
No types matched
• How to Fix Violations: Write more unit-tests dedicated to cover code not covered yet in the namespace. If you find some hard-to-test code, it is certainly a sign that this code is not well designed and hence, needs refactoring.
No namespaces matched
No types matched
No namespaces matched
No methods matched
No methods matched
No methods matched
Dead Code
|
warnif count > 0
let tt=Types.UsedByAny(Application.Methods).ToHashSet()
// Select types unused
let typesUnused =
from t in JustMyCode.Types where
t.NbTypesUsingMe == 0 && !t.IsGlobal select t
from t in typesUnused where !tt.Contains(t)
select new { t }
No types matched
warnif count > 0
// Filter procedure for methods that should'nt be considered as dead
let canMethodBeConsideredAsDeadProc = new Func<IMethod, bool>(
m => !m.IsPublic && // Public methods might be used by client applications of your Projects.
!m.IsEntryPoint && // Main() method is not used by-design.
!m.IsClassConstructor &&
!m.IsVirtual && // Only check for non virtual method that are not seen as used in IL.
!(m.IsConstructor && // Don't take account of protected ctor that might be call by a derived ctors.
m.IsProtected) &&
!m.NameLike (@"^On") && //Exclude Events like MFC ones
!m.IsGeneratedByCompiler
)
// Get methods unused
let methodsUnused =
from m in JustMyCode.Methods where
m.NbMethodsCallingMe == 0 &&
canMethodBeConsideredAsDeadProc(m)
select m
// Dead methods = methods used only by unused methods (recursive)
let deadMethodsMetric = methodsUnused.FillIterative(
methods => // Unique loop, just to let a chance to build the hashset.
from o in new[] { new object() }
// Use a hashet to make Intersect calls much faster!
let hashset = methods.ToHashSet()
from m in codeBase.Application.Methods.UsedByAny(methods).Except(methods)
where canMethodBeConsideredAsDeadProc(m) &&
// Select methods called only by methods already considered as dead
hashset.Intersect(m.MethodsCallingMe).Count() == m.NbMethodsCallingMe
select m)
from m in JustMyCode.Methods.Intersect(deadMethodsMetric.DefinitionDomain)
select new { m, m.MethodsCallingMe, depth = deadMethodsMetric[m] }
3,134 methods matched
methods | MethodsCallingMe | depth | Full Name |
---|---|---|---|
Token() | 0 method | 0 | Token.Token() |
Token(constToken&) | 0 method | 0 | Token.Token(constToken&) |
operator=(constToken&) | 0 method | 0 | Token.operator=(constToken&) |
TokenList(constTokenList&) | 0 method | 0 | TokenList.TokenList(constTokenList&) |
operator=(constTokenList&) | 0 method | 0 | TokenList.operator=(constTokenList&) |
Tokenizer(constTokenizer&) | 0 method | 0 | Tokenizer.Tokenizer(constTokenizer&) |
operator=(constTokenizer&) | 0 method | 0 | Tokenizer.operator=(constTokenizer&) |
operator=(constTimer&) | 0 method | 0 | Timer.operator=(constTimer&) |
operator=(constCheck&) | 0 method | 0 | Check.operator=(constCheck&) |
Check(constCheck&) | 0 method | 0 | Check.Check(constCheck&) |
getErrorMessages(ErrorLogger*,constSettings*) | 0 method | 0 | Check64BitPortability.getErrorMessages(ErrorLogger*,constSettings*) |
classInfo() | 0 method | 0 | Check64BitPortability.classInfo() |
getErrorMessages(ErrorLogger*,constSettings*) | 0 method | 0 | CheckAssert.getErrorMessages(ErrorLogger*,constSettings*) |
classInfo() | 0 method | 0 | CheckAssert.classInfo() |
getErrorMessages(ErrorLogger*,constSettings*) | 0 method | 0 | CheckAutoVariables.getErrorMessages(ErrorLogger*,constSettings*) |
classInfo() | 0 method | 0 | CheckAutoVariables.classInfo() |
getErrorMessages(ErrorLogger*,constSettings*) | 0 method | 0 | CheckBool.getErrorMessages(ErrorLogger*,constSettings*) |
classInfo() | 0 method | 0 | CheckBool.classInfo() |
getErrorMessages(ErrorLogger*,constSettings*) | 0 method | 0 | CheckBoost.getErrorMessages(ErrorLogger*,constSettings*) |
classInfo() | 0 method | 0 | CheckBoost.classInfo() |
classInfo() | 0 method | 0 | CheckBufferOverrun.classInfo() |
getErrorMessages(ErrorLogger*,constSettings*) | 0 method | 0 | CheckClass.getErrorMessages(ErrorLogger*,constSettings*) |
classInfo() | 0 method | 0 | CheckClass.classInfo() |
getErrorMessages(ErrorLogger*,constSettings*) | 0 method | 0 | CheckCondition.getErrorMessages(ErrorLogger*,constSettings*) |
classInfo() | 0 method | 0 | CheckCondition.classInfo() |
redundantGetAndSetUserIdError(constToken*) | 0 method | 0 | CheckOther.redundantGetAndSetUserIdError(constToken*) |
duplicateIfError(constToken*,constToken*) | 0 method | 0 | CheckOther.duplicateIfError(constToken*,constToken*) |
alwaysTrueFalseStringCompareError(constToken*,conststd::string& ,conststd::string&) | 0 method | 0 | CheckOther.alwaysTrueFalseStringCompareError(constToken* ,conststd::string&,conststd::string&) |
alwaysTrueStringVariableCompareError(constToken*,conststd::string& ,conststd::string&) | 0 method | 0 | CheckOther.alwaysTrueStringVariableCompareError(constToken* ,conststd::string&,conststd::string&) |
getErrorMessages(ErrorLogger*,constSettings*) | 0 method | 0 | CheckOther.getErrorMessages(ErrorLogger*,constSettings*) |
classInfo() | 0 method | 0 | CheckOther.classInfo() |
getErrorMessages(ErrorLogger*,constSettings*) | 0 method | 0 | CheckString.getErrorMessages(ErrorLogger*,constSettings*) |
classInfo() | 0 method | 0 | CheckString.classInfo() |
getErrorMessages(ErrorLogger*,constSettings*) | 0 method | 0 | CheckExceptionSafety.getErrorMessages(ErrorLogger*,constSettings*) |
classInfo() | 0 method | 0 | CheckExceptionSafety.classInfo() |
getErrorMessages(ErrorLogger*,constSettings*) | 0 method | 0 | CheckIO.getErrorMessages(ErrorLogger*,constSettings*) |
classInfo() | 0 method | 0 | CheckIO.classInfo() |
ArgumentInfo(constCheckIO::ArgumentInfo&) | 0 method | 0 | CheckIO+ArgumentInfo.ArgumentInfo(constCheckIO::ArgumentInfo&) |
operator=(constCheckIO::ArgumentInfo&) | 0 method | 0 | CheckIO+ArgumentInfo.operator=(constCheckIO::ArgumentInfo&) |
getErrorMessages(ErrorLogger*,constSettings*) | 0 method | 0 | CheckLeakAutoVar.getErrorMessages(ErrorLogger*,constSettings*) |
classInfo() | 0 method | 0 | CheckLeakAutoVar.classInfo() |
CheckMemoryLeak() | 0 method | 0 | CheckMemoryLeak.CheckMemoryLeak() |
CheckMemoryLeak(constCheckMemoryLeak&) | 0 method | 0 | CheckMemoryLeak.CheckMemoryLeak(constCheckMemoryLeak&) |
operator=(constCheckMemoryLeak&) | 0 method | 0 | CheckMemoryLeak.operator=(constCheckMemoryLeak&) |
getErrorMessages(ErrorLogger*,constSettings*) | 0 method | 0 | CheckMemoryLeakInFunction.getErrorMessages(ErrorLogger*,constSettings* ) |
classInfo() | 0 method | 0 | CheckMemoryLeakInFunction.classInfo() |
getErrorMessages(ErrorLogger*,constSettings*) | 0 method | 0 | CheckMemoryLeakInClass.getErrorMessages(ErrorLogger*,constSettings*) |
classInfo() | 0 method | 0 | CheckMemoryLeakInClass.classInfo() |
getErrorMessages(ErrorLogger*,constSettings*) | 0 method | 0 | CheckMemoryLeakStructMember.getErrorMessages(ErrorLogger* ,constSettings*) |
classInfo() | 0 method | 0 | CheckMemoryLeakStructMember.classInfo() |
getErrorMessages(ErrorLogger*,constSettings*) | 0 method | 0 | CheckMemoryLeakNoVar.getErrorMessages(ErrorLogger*,constSettings*) |
classInfo() | 0 method | 0 | CheckMemoryLeakNoVar.classInfo() |
getErrorMessages(ErrorLogger*,constSettings*) | 0 method | 0 | CheckUninitVar.getErrorMessages(ErrorLogger*,constSettings*) |
classInfo() | 0 method | 0 | CheckUninitVar.classInfo() |
getErrorMessages(ErrorLogger*,constSettings*) | 0 method | 0 | CheckNonReentrantFunctions.getErrorMessages(ErrorLogger* ,constSettings*) |
classInfo() | 0 method | 0 | CheckNonReentrantFunctions.classInfo() |
getErrorMessages(ErrorLogger*,constSettings*) | 0 method | 0 | CheckNullPointer.getErrorMessages(ErrorLogger*,constSettings*) |
classInfo() | 0 method | 0 | CheckNullPointer.classInfo() |
getErrorMessages(ErrorLogger*,constSettings*) | 0 method | 0 | CheckObsoleteFunctions.getErrorMessages(ErrorLogger*,constSettings*) |
classInfo() | 0 method | 0 | CheckObsoleteFunctions.classInfo() |
getErrorMessages(ErrorLogger*,constSettings*) | 0 method | 0 | CheckPostfixOperator.getErrorMessages(ErrorLogger*,constSettings*) |
classInfo() | 0 method | 0 | CheckPostfixOperator.classInfo() |
getErrorMessages(ErrorLogger*,constSettings*) | 0 method | 0 | CheckSizeof.getErrorMessages(ErrorLogger*,constSettings*) |
classInfo() | 0 method | 0 | CheckSizeof.classInfo() |
eraseCheckLoop(constToken*) | 0 method | 0 | CheckStl.eraseCheckLoop(constToken*) |
getErrorMessages(ErrorLogger*,constSettings*) | 0 method | 0 | CheckStl.getErrorMessages(ErrorLogger*,constSettings*) |
classInfo() | 0 method | 0 | CheckStl.classInfo() |
operator=(constExecutionPath&) | 0 method | 0 | ExecutionPath.operator=(constExecutionPath&) |
is_equal(constExecutionPath*) | 0 method | 0 | EraseCheckLoop.is_equal(constExecutionPath*) |
parse(constToken&,std::list<ExecutionPath*>&) | 0 method | 0 | EraseCheckLoop.parse(constToken&,std::list<ExecutionPath*>&) |
parseCondition(constToken&,std::list<ExecutionPath*>&) | 0 method | 0 | EraseCheckLoop.parseCondition(constToken&,std::list<ExecutionPath*>&) |
isUnsigned(constVariable*) | 0 method | 0 | CheckType.isUnsigned(constVariable*) |
isSigned(constVariable*) | 0 method | 0 | CheckType.isSigned(constVariable*) |
getErrorMessages(ErrorLogger*,constSettings*) | 0 method | 0 | CheckType.getErrorMessages(ErrorLogger*,constSettings*) |
classInfo() | 0 method | 0 | CheckType.classInfo() |
copy() | 0 method | 0 | UninitVar.copy() |
UninitVar(Check*,constVariable*,constSymbolDatabase*,constLibrary* ,bool) | 1 method | 2 | UninitVar.UninitVar(Check*,constVariable*,constSymbolDatabase* ,constLibrary*,bool) |
is_equal(constExecutionPath*) | 0 method | 0 | UninitVar.is_equal(constExecutionPath*) |
alloc_pointer(std::list<ExecutionPath*>&,unsignedint) | 1 method | 2 | UninitVar.alloc_pointer(std::list<ExecutionPath*>&,unsignedint) |
init_pointer(std::list<ExecutionPath*>&,constToken*) | 1 method | 2 | UninitVar.init_pointer(std::list<ExecutionPath*>&,constToken*) |
dealloc_pointer(std::list<ExecutionPath*>&,constToken*) | 1 method | 2 | UninitVar.dealloc_pointer(std::list<ExecutionPath*>&,constToken*) |
pointer_assignment(std::list<ExecutionPath*>&,constToken*,constToken*) | 1 method | 2 | UninitVar.pointer_assignment(std::list<ExecutionPath*>&,constToken* ,constToken*) |
init_strncpy(std::list<ExecutionPath*>&,constToken*) | 1 method | 2 | UninitVar.init_strncpy(std::list<ExecutionPath*>&,constToken*) |
init_memset_nonzero(std::list<ExecutionPath*>&,constToken*) | 1 method | 2 | UninitVar.init_memset_nonzero(std::list<ExecutionPath*>&,constToken*) |
use_dead_pointer(std::list<ExecutionPath*>&,constToken*) | 1 method | 2 | UninitVar.use_dead_pointer(std::list<ExecutionPath*>&,constToken*) |
parserhs(constToken*,std::list<ExecutionPath*>&) | 1 method | 2 | UninitVar.parserhs(constToken*,std::list<ExecutionPath*>&) |
parse(constToken&,std::list<ExecutionPath*>&) | 1 method | 1 | UninitVar.parse(constToken&,std::list<ExecutionPath*>&) |
parseCondition(constToken&,std::list<ExecutionPath*>&) | 0 method | 0 | UninitVar.parseCondition(constToken&,std::list<ExecutionPath*>&) |
parseLoopBody(constToken*,std::list<ExecutionPath*>&) | 0 method | 0 | UninitVar.parseLoopBody(constToken*,std::list<ExecutionPath*>&) |
getErrorMessages(ErrorLogger*,constSettings*) | 0 method | 0 | CheckUnusedFunctions.getErrorMessages(ErrorLogger*,constSettings*) |
runSimplifiedChecks(constTokenizer*,constSettings*,ErrorLogger*) | 0 method | 0 | CheckUnusedFunctions.runSimplifiedChecks(constTokenizer* ,constSettings*,ErrorLogger*) |
classInfo() | 0 method | 0 | CheckUnusedFunctions.classInfo() |
getErrorMessages(ErrorLogger*,constSettings*) | 0 method | 0 | CheckUnusedVar.getErrorMessages(ErrorLogger*,constSettings*) |
classInfo() | 0 method | 0 | CheckUnusedVar.classInfo() |
operator=(constVariables::ScopeGuard&) | 0 method | 0 | Variables+ScopeGuard.operator=(constVariables::ScopeGuard&) |
getErrorMessages(ErrorLogger*,constSettings*) | 0 method | 0 | CheckVaarg.getErrorMessages(ErrorLogger*,constSettings*) |
classInfo() | 0 method | 0 | CheckVaarg.classInfo() |
reportProgress(conststd::string&,constchar*,conststd::size_t) | 0 method | 0 | CppCheck.reportProgress(conststd::string&,constchar*,conststd::size_t) |
operator=(constPreprocessorMacro&) | 0 method | 0 | PreprocessorMacro.operator=(constPreprocessorMacro&) |
TemplateSimplifier() | 0 method | 0 | TemplateSimplifier.TemplateSimplifier() |
Statistics
Stat | MethodsCallingMe | depth |
---|---|---|
Sum: | 0 | 3 083 |
Average: | 0 | 0.98 |
Minimum: | 0 | 0 |
Maximum: | 0 | 2 |
Standard deviation: | 0 | 0.31 |
Variance: | 0 | 0.097 |
warnif count > 0
from f in JustMyCode.Fields where
f.NbMethodsUsingMe == 0 &&
!f.IsPublic && // Although not recommended, public fields might be used by client applications of your Projects.
!f.IsEnumValue
// If you don't want to link CppDepend.API.dll, you can use your own IsNotDeadCodeAttribute and adapt this rule.
select f
No fields matched
Trend Charts
Lines of Code
Rules Violated
Rules Violations
Max
Average
Third-Party Usage
Projects Dependencies
Assembly | Depends on | Is referenced by |
---|---|---|
WindowsAPI v1.0.0.0 | - | cli v1.0.0.0 ; testrunner v1.0.0.0 ; cppcheck v1.0.0.0 ; |
Externals v1.0.0.0 | - | cli v1.0.0.0 ; testrunner v1.0.0.0 ; cppcheck v1.0.0.0 ; |
cppcheck v1.0.0.0 | WindowsAPI v1.0.0.0 ; Externals v1.0.0.0 ; | cli v1.0.0.0 ; testrunner v1.0.0.0 ; |
cli v1.0.0.0 | cppcheck v1.0.0.0 ; WindowsAPI v1.0.0.0 ; Externals v1.0.0.0 ; | - |
testrunner v1.0.0.0 | cppcheck v1.0.0.0 ; WindowsAPI v1.0.0.0 ; Externals v1.0.0.0 ; | - |
Projects Build Order
- cppcheck
- cli
- testrunner
Projects Build Order
- cppcheck
- cli
- testrunner
Analysis Log : Information and Warnings
The Warnings can reveal potential flaws concerning the health of the build process.
A particular warn can be disabled through the CppDepend interactive UI, panel Error List, tick the checkbox Disabled corresponding to the warn to disable.
Kind | Message |
---|---|
Info | Begin full analysis with CppDepend v6.0.0.8890 |
Info | No Baseline for Comparison loaded. |
Info | The parser used is Clang |
Info | 2 Cores are used, you can change this value from the menu Tools->Options->Parser Configuration |
Info | CppCheck is enabled.You can disable it from 'Project Properties=>Plugins Tab' |
Info | Vera++ is not enabled.You can enable it from 'Project Properties=>Plugins Tab' if you are interested to have style diagnostics |
Warning | Project:cli=>expected unqualified-id at C:\Users\MacBook Pro\Downloads\cppcheck-1.69\cppcheck-1.69\cli\version.rc:4:1 |
Warning | The project cli contains 1 Clang errors, to see them you can activate the Clang parsing errors tab. |
Warning | Project:testrunner=>'testsuite.h' file not found at <command line>:11:10 |
Warning | Project:testrunner=>'testsuite.h' file not found at <command line>:11:10 |
Warning | Project:testrunner=>'testsuite.h' file not found at <command line>:11:10 |
Warning | Project:testrunner=>'testsuite.h' file not found at <command line>:11:10 |
Warning | Project:testrunner=>'testsuite.h' file not found at <command line>:11:10 |
Warning | The project testrunner contains 5 Clang errors, to see them you can activate the Clang parsing errors tab. |
Info | No dependency cycle detected in Projects referencement graph. |
Info | Analyse dependencies of your application. |
Info | Log trend metrics values. |
Info | Execute queries and rules |
Warning | 3 critical rules are violated. - Types too big - critical - Methods too complex - critical - Methods with too many parameters - critical |
Info | CppDepend analysis done. Duration: 03:58 |
Info | Building the report (standard). |