Skip to content

Conversation

@gamesh411
Copy link
Collaborator

No description provided.

@gamesh411
Copy link
Collaborator Author

My suggestion for this categorisation takes the following result-counts into account.
These are on our test OpenSource projects:

{
    "alpha.core.StoreToImmutable": 1037,
    "security.VAList": 1,
    "bugprone-command-processor": 0,
    "bugprone-derived-method-shadowing-base-method": 0,
    "bugprone-invalid-enum-default-initialization": 792,
    "bugprone-throwing-static-initialization": 0,
    "bugprone-unchecked-string-to-number-conversion": 0,
    "cppcoreguidelines-pro-bounds-avoid-unchecked-container-access": 8400,
    "cppcoreguidelines-use-enum-class": 2810,
    "fuchsia-temporary-objects": 0,
    "google-runtime-float": 0,
    "llvm-prefer-static-over-anonymous-namespace": 1840,
    "llvm-use-new-mlir-op-builder": 0,
    "llvm-use-ranges": 0,
    "misc-override-with-different-visibility": 434,
    "modernize-avoid-setjmp-longjmp": 0,
    "modernize-avoid-variadic-functions": 0,
    "modernize-use-scoped-lock": 7,
    "portability-avoid-pragma-once": 213,
    "readability-redundant-parentheses": 0,
    "readability-use-concise-preprocessor-directives": 3352,
    "clang-diagnostic-uninitialized-const-pointer": 5,
    "clang-diagnostic-TU-local-entity-exposure": 0,
    "clang-diagnostic-alloc-size": 0,
    "clang-diagnostic-c-attribute-extension": 0,
    "clang-diagnostic-cfi-unchecked-callee": 0,
    "clang-diagnostic-deprecated-declarations-switch-case": 0,
    "clang-diagnostic-experimental-lifetime-safety": 0,
    "clang-diagnostic-experimental-lifetime-safety-permissive": 0,
    "clang-diagnostic-experimental-lifetime-safety-strict": 0,
    "clang-diagnostic-ext-cxx-type-aware-allocators": 0,
    "clang-diagnostic-function-effect-redeclarations": 0,
    "clang-diagnostic-gcc-install-dir-libstdcxx": 0,
    "clang-diagnostic-invalid-version-availability": 0,
    "clang-diagnostic-main-attached-to-named-module": 0,
    "clang-diagnostic-module-validation": 0,
    "clang-diagnostic-modules-driver": 0,
    "clang-diagnostic-ms-bitfield-padding": 13,
    "clang-diagnostic-multilib-not-found": 0,
    "clang-diagnostic-character-conversion": 113,
    "clang-diagnostic-implicit-int-conversion-on-negation": 147,
    "clang-diagnostic-nrvo": 377,
    "clang-diagnostic-openacc-cache-var-inside-loop": 0,
    "clang-diagnostic-openacc-extension": 0,
    "clang-diagnostic-openacc-var-lacks-operation": 0,
    "clang-diagnostic-openacc-var-non-const-array": 0,
    "clang-diagnostic-openmp-future": 0,
    "clang-diagnostic-overriding-complex-range": 0,
    "clang-diagnostic-overriding-deployment-version": 0,
    "clang-diagnostic-attribute-preprocessor-tokens": 0,
    "clang-diagnostic-reference-tu-local-entity-in-other-tu": 0,
    "clang-diagnostic-underlying-atomic-qualifier-ignored": 0,
    "clang-diagnostic-underlying-cv-qualifier-ignored": 0,
    "clang-diagnostic-unknown-acc-extension-clause": 0,
    "clang-diagnostic-unsafe-buffer-usage-in-unique-ptr-array-access": 0
}

@gamesh411
Copy link
Collaborator Author

Note, that I have not considered which checkers are related to SEI-Cert rules.
So the absence of a rule suggestion does not mean it is unrelated.

@gamesh411 gamesh411 requested a review from dkrupp November 10, 2025 20:48
Copy link
Member

@dkrupp dkrupp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR.

I am leaning to enable more checks by default.
I would enable for example almost all compiler warnings that are enabled by default anyway.

Please don't forget to include the checker in the sensitive profile too if you add it to the default profile (as sensitive includes default).

"google-runtime-float": [
"doc_url:https://clang.llvm.org/extra/clang-tidy/checks/google/runtime-float.html",
"profile:extreme",
"severity:MEDIUM"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably low. a portability check

@bruntib bruntib added this to the release 6.27.0 milestone Nov 18, 2025
Copy link
Member

@dkrupp dkrupp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@gamesh411
Copy link
Collaborator Author

I have updated all the checkers in the default profile to also be included in the sensitive and extreme.
This could be part of the sanity check of the script as well (if it isn't already).
Here is how I have used to check this (maybe the label check tool has this implemented. I'll check the GH actions why the checker-config-coverage is failing.)

jq -r '
  .labels
  | to_entries[]
  | select(.value | index("profile:default"))
  | select((.value | index("profile:sensitive")|not) or (.value | index("profile:extreme")|not))
  | (.value as $v
     | "\(.key): missing "
       + (["profile:sensitive","profile:extreme"]
          | map(select($v | index(.)|not))
          | join(", ")))
' config/labels/analyzers/clangsa.json

@dkrupp dkrupp merged commit 7a974c9 into Ericsson:master Nov 21, 2025
8 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants