Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[cmd] Checker name prefixes are meant along separator characters #4311

Merged
merged 1 commit into from
Aug 15, 2024

Conversation

bruntib
Copy link
Contributor

@bruntib bruntib commented Aug 14, 2024

Checkers can be enabled by groups, e.g. unix.cstring enables all checkers starting with this prefix. However, unix.cs is not a checker group so this shouldn't be allowed. In this case an error message is printed and analysis doesn't start.

@bruntib bruntib added CLI 💻 Related to the command-line interface, such as the cmd, store, etc. commands bugfix 🔨 labels Aug 14, 2024
@bruntib bruntib added this to the release 6.24.1 milestone Aug 14, 2024
@bruntib bruntib requested a review from vodorok as a code owner August 14, 2024 07:10
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.

Please add another testcase for testing enabling checker groups.

@@ -264,6 +264,18 @@ def f(checks, checkers):
self.assertTrue(all_with_status(CheckerState.ENABLED)
(cfg_handler.checks(), low_severity))

# Enable checkers with a checker group prefix.
Copy link
Member

Choose a reason for hiding this comment

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

this test is enabling one concrete checker alpha.security.ArrayBound and tests that alpha.security.ArrayBoundv2 should not be enabled. It is not testing "checker group prefix"

Could you please add another test case which enables "alpha.security" group. Then alpha.security.ArrayBound and also alpha.security.ArrayBoundv2 should be enabled.

@NagyDonat
Copy link

NagyDonat commented Aug 14, 2024

Instead of alpha.security.ArrayBound and alpha.security.ArrayBoundV2, consider using the checkers cplusplus.NewDelete and cplusplus.NewDeleteLeaks in the test because their names are more stable. We will hopefully rename/rearrange the bounds checkers within a year, while these are already stable checkers and their names won't change.

Checkers can be enabled by groups, e.g. unix.cstring enables all
checkers starting with this prefix. However, unix.cs is not a checker
group so this shouldn't be allowed. In this case an error message is
printed and analysis doesn't start.
@bruntib
Copy link
Contributor Author

bruntib commented Aug 14, 2024

@dkrupp, @NagyDonat Thanks for the comments! I fixed the tests accordingly.

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

@dkrupp dkrupp merged commit a4b25f9 into Ericsson:master Aug 15, 2024
7 of 8 checks passed
@bruntib bruntib deleted the checker_name_prefix branch August 16, 2024 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix 🔨 CLI 💻 Related to the command-line interface, such as the cmd, store, etc. commands
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants