Skip to content

Commit

Permalink
add cppcheck and clang-tidy checks
Browse files Browse the repository at this point in the history
  • Loading branch information
gamesh411 committed Nov 22, 2024
1 parent 9c74782 commit 09fb4bd
Show file tree
Hide file tree
Showing 2 changed files with 77 additions and 0 deletions.
62 changes: 62 additions & 0 deletions config/labels/analyzers/clang-tidy.json
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,10 @@
"doc_url:https://clang.llvm.org/extra/clang-tidy/checks/android/comparison-in-temp-failure-retry.html",
"severity:MEDIUM"
],
"boost-use-ranges": [
"doc_url:https://clang.llvm.org/extra/clang-tidy/checks/boost/use-ranges.html",
"severity:LOW"
],
"boost-use-to-string": [
"doc_url:https://clang.llvm.org/extra/clang-tidy/checks/boost/use-to-string.html",
"profile:extreme",
Expand Down Expand Up @@ -194,6 +198,10 @@
"sei-cert:pos44-c",
"severity:MEDIUM"
],
"bugprone-bitwise-pointer-cast": [
"doc_url:https://clang.llvm.org/extra/clang-tidy/checks/bugprone/bitwise-pointer-cast.html",
"severity:MEDIUM"
],
"bugprone-bool-pointer-implicit-conversion": [
"doc_url:https://clang.llvm.org/extra/clang-tidy/checks/bugprone/bool-pointer-implicit-conversion.html",
"profile:default",
Expand Down Expand Up @@ -453,6 +461,10 @@
"profile:sensitive",
"severity:MEDIUM"
],
"bugprone-nondeterministic-pointer-iteration-order": [
"doc_url:https://clang.llvm.org/extra/clang-tidy/checks/bugprone/nondeterministic-pointer-iteration-order.html",
"severity:MEDIUM"
],
"bugprone-optional-value-conversion": [
"doc_url:https://clang.llvm.org/extra/clang-tidy/checks/bugprone/optional-value-conversion.html",
"profile:default",
Expand All @@ -466,6 +478,10 @@
"profile:sensitive",
"severity:MEDIUM"
],
"bugprone-pointer-arithmetic-on-polymorphic-object": [
"doc_url:https://clang.llvm.org/extra/clang-tidy/checks/bugprone/pointer-arithmetic-on-polymorphic-object.html",
"severity:HIGH"
],
"bugprone-posix-return": [
"doc_url:https://clang.llvm.org/extra/clang-tidy/checks/bugprone/posix-return.html",
"profile:extreme",
Expand All @@ -487,6 +503,10 @@
"sei-cert:dcl51-cpp",
"severity:LOW"
],
"bugprone-return-const-ref-from-parameter": [
"doc_url:https://clang.llvm.org/extra/clang-tidy/checks/bugprone/return-const-ref-from-parameter.html",
"severity:MEDIUM"
],
"bugprone-shared-ptr-array-mismatch": [
"doc_url:https://clang.llvm.org/extra/clang-tidy/checks/bugprone/shared-ptr-array-mismatch.html",
"guideline:sei-cert",
Expand Down Expand Up @@ -643,6 +663,10 @@
"profile:sensitive",
"severity:MEDIUM"
],
"bugprone-tagged-union-member-count": [
"doc_url:https://clang.llvm.org/extra/clang-tidy/checks/bugprone/tagged-union-member-count.html",
"severity:MEDIUM"
],
"bugprone-suspicious-stringview-data-usage": [
"doc_url:https://clang.llvm.org/extra/clang-tidy/checks/bugprone/suspicious-stringview-data-usage.html",
"profile:default",
Expand Down Expand Up @@ -788,6 +812,13 @@
"profile:sensitive",
"severity:MEDIUM"
],
"cert-arr39-c": [
"doc_url:https://clang.llvm.org/extra/clang-tidy/checks/cert/arr39-c.html",
"guideline:sei-cert",
"profile:security",
"sei-cert:arr39-c",
"severity:HIGH"
],
"cert-con36-c": [
"doc_url:https://clang.llvm.org/extra/clang-tidy/checks/cert/con36-c.html",
"severity:MEDIUM"
Expand All @@ -796,6 +827,13 @@
"doc_url:https://clang.llvm.org/extra/clang-tidy/checks/cert/con54-cpp.html",
"severity:MEDIUM"
],
"cert-ctr56-cpp": [
"doc_url:https://clang.llvm.org/extra/clang-tidy/checks/cert/ctr56-cpp.html",
"guideline:sei-cert",
"profile:security",
"sei-cert:ctr56-cpp",
"severity:MEDIUM"
],
"cert-dcl03-c": [
"doc_url:https://clang.llvm.org/extra/clang-tidy/checks/cert/dcl03-c.html",
"guideline:sei-cert",
Expand Down Expand Up @@ -6732,6 +6770,10 @@
"profile:sensitive",
"severity:LOW"
],
"misc-use-internal-linkage": [
"doc_url:https://clang.llvm.org/extra/clang-tidy/checks/misc/use-internal-linkage.html",
"severity:LOW"
],
"misc-virtual-near-miss": [
"doc_url:https://releases.llvm.org/6.0.1/tools/clang/tools/extra/docs/clang-tidy/checks/misc-virtual-near-miss.html",
"profile:default",
Expand Down Expand Up @@ -6785,6 +6827,10 @@
"profile:extreme",
"severity:LOW"
],
"modernize-min-max-use-initializer-list": [
"doc_url:https://clang.llvm.org/extra/clang-tidy/checks/modernize/min-max-use-initializer-list.html",
"severity:LOW"
],
"modernize-pass-by-value": [
"doc_url:https://clang.llvm.org/extra/clang-tidy/checks/modernize/pass-by-value.html",
"profile:extreme",
Expand Down Expand Up @@ -6897,11 +6943,19 @@
"profile:extreme",
"severity:LOW"
],
"modernize-use-ranges": [
"doc_url:https://clang.llvm.org/extra/clang-tidy/checks/modernize/use-ranges.html",
"severity:LOW"
],
"modernize-use-starts-ends-with": [
"doc_url:https://clang.llvm.org/extra/clang-tidy/checks/modernize/use-starts-ends-with.html",
"profile:extreme",
"severity:LOW"
],
"modernize-use-std-format": [
"doc_url:https://clang.llvm.org/extra/clang-tidy/checks/modernize/use-std-format.html",
"severity:LOW"
],
"modernize-use-std-numbers": [
"doc_url:https://clang.llvm.org/extra/clang-tidy/checks/modernize/use-std-numbers.html",
"profile:extreme",
Expand Down Expand Up @@ -7117,6 +7171,14 @@
"doc_url:https://clang.llvm.org/extra/clang-tidy/checks/portability/std-allocator-const.html",
"severity:STYLE"
],
"portability-template-virtual-member-function": [
"doc_url:https://clang.llvm.org/extra/clang-tidy/checks/portability/template-virtual-member-function.html",
"severity:MEDIUM"
],
"readability-math-missing-parentheses": [
"doc_url:https://clang.llvm.org/extra/clang-tidy/checks/readability/math-missing-parentheses.html",
"severity:LOW"
],
"readability-avoid-const-params-in-decls": [
"doc_url:https://clang.llvm.org/extra/clang-tidy/checks/readability/avoid-const-params-in-decls.html",
"severity:STYLE"
Expand Down
15 changes: 15 additions & 0 deletions config/labels/analyzers/cppcheck.json
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,12 @@
"profile:sensitive",
"severity:HIGH"
],
"cppcheck-eraseIteratorOutOfBounds": [
"severity:HIGH"
],
"cppcheck-eraseIteratorOutOfBoundsCond": [
"severity:HIGH"
],
"cppcheck-exceptDeallocThrow": [
"profile:default",
"profile:extreme",
Expand Down Expand Up @@ -1484,6 +1490,15 @@
"cppcheck-uselessCallsSwap": [
"severity:LOW"
],
"cppcheck-uselessOverride": [
"severity:STYLE"
],
"cppcheck-returnByReference": [
"severity:LOW"
],
"cppcheck-suspiciousFloatingPointCast": [
"severity:STYLE"
],
"cppcheck-va_end_missing": [
"profile:default",
"profile:extreme",
Expand Down

0 comments on commit 09fb4bd

Please sign in to comment.