Test StaticAnalysis action#3
Conversation
12d18a8 to
3dce763
Compare
7ebe9e7 to
1caaa8e
Compare
ae5b3da to
5796ae7
Compare
15b37e9 to
e9dffd3
Compare
2b67b3f to
3f61b8c
Compare
7185a50 to
38c0425
Compare
bf90efc to
0eec13d
Compare
4601a38 to
e0bd5ec
Compare
|
⚡ Python ⚡ 🔴 PyLint found 6 issues! Click here to see details.Lines 42 to 47 in 1b5cf6b !Line: 42 - E0001: Parsing failed: 'Missing parentheses in call to 'print'. Did you mean print(...)? (source, line 42)' (syntax-error)Lines 31 to 35 in 1b5cf6b !Line: 31 - C0301: Line too long (182/100) (line-too-long)Lines 1 to 6 in 1b5cf6b !Line: 1 - C0114: Missing module docstring (missing-module-docstring)Lines 1 to 6 in 1b5cf6b !Line: 1 - C0116: Missing function or method docstring (missing-function-docstring)Lines 1 to 6 in 1b5cf6b !Line: 1 - W0621: Redefining name 'patch' from outer scope (line 29) (redefined-outer-name)Lines 29 to 34 in 1b5cf6b !Line: 29 - C0103: Constant name "patch" doesn't conform to UPPER_CASE naming style (invalid-name) |
|
⚡ SA CMake output ⚡ 🔴 cppcheck found 6 issues! Click here to see details.Lines 9 to 14 in 1b5cf6b !Line: 9 - warning: Class 'Example' does not have a copy constructor which is recommended since it has dynamic memory/resource management. [noCopyConstructor]
Lines 9 to 14 in 1b5cf6b !Line: 9 - warning: Class 'Example' does not have a operator= which is recommended since it has dynamic memory/resource management. [noOperatorEq]
Lines 36 to 41 in 1b5cf6b !Line: 36 - error: Null pointer dereference: ptr [nullPointer]
!Line: 35 - note: Assignment 'ptr=nullptr', assigned value is 0
!Line: 36 - note: Null pointer dereferenceLines 35 to 40 in 1b5cf6b !Line: 35 - style: Variable 'ptr' can be declared as pointer to const [constVariablePointer]
Lines 39 to 44 in 1b5cf6b !Line: 39 - error: Out of bounds access in expression 'vec[10]' because 'vec' is empty. [containerOutOfBounds]
Lines 41 to 44 in 1b5cf6b !Line: 41 - style: Unused variable: unusedvec [unusedVariable]
🔴 clang-tidy found 24 issues! Click here to see details.Lines 1 to 3 in 1b5cf6b !Line: 1 - error: function 'do_nothing' can be made static or moved into an anonymous namespace to enforce internal linkage [misc-use-internal-linkage,-warnings-as-errors]
Lines 2 to 7 in 1b5cf6b !Line: 2 - error: included header string is not used directly [misc-include-cleaner,-warnings-as-errors]
Lines 5 to 10 in 1b5cf6b !Line: 5 - error: class 'Example' can be moved into an anonymous namespace to enforce internal linkage [misc-use-internal-linkage,-warnings-as-errors]
Lines 5 to 10 in 1b5cf6b !Line: 5 - error: class 'Example' defines a non-default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,hicpp-special-member-functions,-warnings-as-errors]
Lines 9 to 14 in 1b5cf6b !Line: 9 - error: 42 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers,readability-magic-numbers,-warnings-as-errors]
Lines 11 to 16 in 1b5cf6b !Line: 11 - error: parameter name 'p' is too short, expected at least 3 characters [readability-identifier-length,-warnings-as-errors]
Lines 21 to 26 in 1b5cf6b !Line: 21 - error: function 'divide' can be made static or moved into an anonymous namespace to enforce internal linkage [misc-use-internal-linkage,-warnings-as-errors]
Lines 21 to 26 in 1b5cf6b !Line: 21 - error: parameter name 'a' is too short, expected at least 3 characters [readability-identifier-length,-warnings-as-errors]
Lines 21 to 26 in 1b5cf6b !Line: 21 - error: parameter name 'b' is too short, expected at least 3 characters [readability-identifier-length,-warnings-as-errors]
Lines 23 to 28 in 1b5cf6b !Line: 23 - error: do not use 'std::endl' with streams; use '\n' instead [performance-avoid-endl,-warnings-as-errors]
Lines 30 to 35 in 1b5cf6b !Line: 30 - error: variable 'ex' of type 'Example' can be declared 'const' [misc-const-correctness,-warnings-as-errors]
Lines 30 to 35 in 1b5cf6b !Line: 30 - error: variable name 'ex' is too short, expected at least 3 characters [readability-identifier-length,-warnings-as-errors]
Lines 31 to 36 in 1b5cf6b !Line: 31 - error: variable 'x' of type 'int' can be declared 'const' [misc-const-correctness,-warnings-as-errors]
Lines 31 to 36 in 1b5cf6b !Line: 31 - error: variable name 'x' is too short, expected at least 3 characters [readability-identifier-length,-warnings-as-errors]
Lines 31 to 36 in 1b5cf6b !Line: 31 - error: 10 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers,readability-magic-numbers,-warnings-as-errors]
Lines 32 to 37 in 1b5cf6b !Line: 32 - error: variable 'y' of type 'int' can be declared 'const' [misc-const-correctness,-warnings-as-errors]
Lines 32 to 37 in 1b5cf6b !Line: 32 - error: variable name 'y' is too short, expected at least 3 characters [readability-identifier-length,-warnings-as-errors]
Lines 33 to 38 in 1b5cf6b !Line: 33 - error: do not use 'std::endl' with streams; use '\n' instead [performance-avoid-endl,-warnings-as-errors]
Lines 35 to 40 in 1b5cf6b !Line: 35 - error: pointee of variable 'ptr' of type 'int *' can be declared 'const' [misc-const-correctness,-warnings-as-errors]
Lines 36 to 41 in 1b5cf6b !Line: 36 - error: do not use 'std::endl' with streams; use '\n' instead [performance-avoid-endl,-warnings-as-errors]
Lines 39 to 44 in 1b5cf6b !Line: 39 - error: possibly unsafe 'operator[]', consider bounds-safe alternatives [cppcoreguidelines-pro-bounds-avoid-unchecked-container-access,-warnings-as-errors]
Lines 39 to 44 in 1b5cf6b !Line: 39 - error: 10 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers,readability-magic-numbers,-warnings-as-errors]
Lines 39 to 44 in 1b5cf6b !Line: 39 - error: do not use 'std::endl' with streams; use '\n' instead [performance-avoid-endl,-warnings-as-errors]
Lines 41 to 44 in 1b5cf6b !Line: 41 - error: variable 'unusedvec' of type 'std::vector<int>' can be declared 'const' [misc-const-correctness,-warnings-as-errors]
|
|
⚡ SA non-CMake output ⚡ 🔴 cppcheck found 6 issues! Click here to see details.Lines 9 to 14 in 1b5cf6b !Line: 9 - warning: Class 'Example' does not have a copy constructor which is recommended since it has dynamic memory/resource management. [noCopyConstructor]
Lines 9 to 14 in 1b5cf6b !Line: 9 - warning: Class 'Example' does not have a operator= which is recommended since it has dynamic memory/resource management. [noOperatorEq]
Lines 36 to 41 in 1b5cf6b !Line: 36 - error: Null pointer dereference: ptr [nullPointer]
!Line: 35 - note: Assignment 'ptr=nullptr', assigned value is 0
!Line: 36 - note: Null pointer dereferenceLines 35 to 40 in 1b5cf6b !Line: 35 - style: Variable 'ptr' can be declared as pointer to const [constVariablePointer]
Lines 39 to 44 in 1b5cf6b !Line: 39 - error: Out of bounds access in expression 'vec[10]' because 'vec' is empty. [containerOutOfBounds]
Lines 41 to 44 in 1b5cf6b !Line: 41 - style: Unused variable: unusedvec [unusedVariable]
🔴 clang-tidy found 23 issues! Click here to see details.Lines 2 to 7 in 1b5cf6b !Line: 2 - error: included header string is not used directly [misc-include-cleaner,-warnings-as-errors]
Lines 5 to 10 in 1b5cf6b !Line: 5 - error: class 'Example' can be moved into an anonymous namespace to enforce internal linkage [misc-use-internal-linkage,-warnings-as-errors]
Lines 5 to 10 in 1b5cf6b !Line: 5 - error: class 'Example' defines a non-default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,hicpp-special-member-functions,-warnings-as-errors]
Lines 9 to 14 in 1b5cf6b !Line: 9 - error: 42 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers,readability-magic-numbers,-warnings-as-errors]
Lines 11 to 16 in 1b5cf6b !Line: 11 - error: parameter name 'p' is too short, expected at least 3 characters [readability-identifier-length,-warnings-as-errors]
Lines 21 to 26 in 1b5cf6b !Line: 21 - error: function 'divide' can be made static or moved into an anonymous namespace to enforce internal linkage [misc-use-internal-linkage,-warnings-as-errors]
Lines 21 to 26 in 1b5cf6b !Line: 21 - error: parameter name 'a' is too short, expected at least 3 characters [readability-identifier-length,-warnings-as-errors]
Lines 21 to 26 in 1b5cf6b !Line: 21 - error: parameter name 'b' is too short, expected at least 3 characters [readability-identifier-length,-warnings-as-errors]
Lines 23 to 28 in 1b5cf6b !Line: 23 - error: do not use 'std::endl' with streams; use '\n' instead [performance-avoid-endl,-warnings-as-errors]
Lines 30 to 35 in 1b5cf6b !Line: 30 - error: variable 'ex' of type 'Example' can be declared 'const' [misc-const-correctness,-warnings-as-errors]
Lines 30 to 35 in 1b5cf6b !Line: 30 - error: variable name 'ex' is too short, expected at least 3 characters [readability-identifier-length,-warnings-as-errors]
Lines 31 to 36 in 1b5cf6b !Line: 31 - error: variable 'x' of type 'int' can be declared 'const' [misc-const-correctness,-warnings-as-errors]
Lines 31 to 36 in 1b5cf6b !Line: 31 - error: variable name 'x' is too short, expected at least 3 characters [readability-identifier-length,-warnings-as-errors]
Lines 31 to 36 in 1b5cf6b !Line: 31 - error: 10 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers,readability-magic-numbers,-warnings-as-errors]
Lines 32 to 37 in 1b5cf6b !Line: 32 - error: variable 'y' of type 'int' can be declared 'const' [misc-const-correctness,-warnings-as-errors]
Lines 32 to 37 in 1b5cf6b !Line: 32 - error: variable name 'y' is too short, expected at least 3 characters [readability-identifier-length,-warnings-as-errors]
Lines 33 to 38 in 1b5cf6b !Line: 33 - error: do not use 'std::endl' with streams; use '\n' instead [performance-avoid-endl,-warnings-as-errors]
Lines 35 to 40 in 1b5cf6b !Line: 35 - error: pointee of variable 'ptr' of type 'int *' can be declared 'const' [misc-const-correctness,-warnings-as-errors]
Lines 36 to 41 in 1b5cf6b !Line: 36 - error: do not use 'std::endl' with streams; use '\n' instead [performance-avoid-endl,-warnings-as-errors]
Lines 39 to 44 in 1b5cf6b !Line: 39 - error: possibly unsafe 'operator[]', consider bounds-safe alternatives [cppcoreguidelines-pro-bounds-avoid-unchecked-container-access,-warnings-as-errors]
Lines 39 to 44 in 1b5cf6b !Line: 39 - error: 10 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers,readability-magic-numbers,-warnings-as-errors]
Lines 39 to 44 in 1b5cf6b !Line: 39 - error: do not use 'std::endl' with streams; use '\n' instead [performance-avoid-endl,-warnings-as-errors]
Lines 41 to 44 in 1b5cf6b !Line: 41 - error: variable 'unusedvec' of type 'std::vector<int>' can be declared 'const' [misc-const-correctness,-warnings-as-errors]
|
Signed-off-by: JacobDomagala <domagala.jacob@gmail.com>
Test PR for https://github.com/JacobDomagala/StaticAnalysis