-
Notifications
You must be signed in to change notification settings - Fork 383
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
[fix] Resolve checker enable/disable ambiguity #4392
Conversation
ee96319
to
e428702
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Please update the help of CodeChecker analyze --help and mention the :checker prefix option
- Update the analyzer user guide https://github.com/Ericsson/codechecker/blob/master/docs/analyzer/user_guide.md#toggling-checkers
and remove any -Wwarning syntax suggestion. Describe the new "checker:" and "prefix:" syntax. Describe the name clash resolution logic
These are the direct remarks. More comments will come soon.
e428702
to
e6a8c5d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please also fix this section
https://github.com/Ericsson/codechecker/blob/master/docs/analyzer/user_guide.md#toggling-checkers
"
Command line --enable/--disable flags.
Their arguments may start with profile: of guideline: prefix which makes the choice explicit.
Without prefix it means a profile name, a guideline name or a checker group/name in this priority order."
Describe the checker:, prefix: and describe that priority order does not matter, an ambiguity causes error.
- remove all old --enable W* warning enable syntax from
https://github.com/Ericsson/codechecker/blob/master/docs/analyzer/user_guide.md#toggling-compiler-warnings
section
ba26d93
to
eaf043f
Compare
This PR fixes the enabling and disabling checker options, focusing on resolving ambiguities in option processing. Key updates: Ambiguity handling: When ambiguous checker options are provided with `-e` or `-d` flags, an error is now raised. The user receives suggestions for specifying the option by using namespaces (checker, prefix, guideline, etc.). If a checker name matches multiple checkers as a prefix, it triggers an ambiguity error. Suggestions are provided to help users choose between the checker name or the prefix. Additional namespaces: A new `checker` namespace is created. All label types can be a namespace as well, specified with a `:` separator before the checker option. Default profile settings improvements: Only those checkers enabled that has profile:default label in the label files. Prefix-based configuration is no longer applied for the default profile, ensuring precise and predictable behavior. Getting rid of `W` prefix: It is no longer available to enable or disable a warrning with W.
eaf043f
to
fe19dc0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
I found 1 problem though:
CodeChecker analyze -e checker:nonextisting-checker
should give an error, but it accepts a non existing checker name.
This PR fixes the enabling and disabling checker options, focusing on resolving ambiguities in option processing.
Key updates:
Ambiguity handling:
Additional namespaces:
Default profile settings improvements:
Getting rid of
W
prefix: