-
Notifications
You must be signed in to change notification settings - Fork 59
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
A1-1-2
: does not understand -Wno-* flags
#689
Labels
Difficulty-Low
A false positive or false negative report which is expected to take <1 day effort to address
false positive/false negative
An issue related to observed false positives or false negatives.
Impact-Medium
Standard-AUTOSAR
Comments
MichaelRFairhurst
added
the
false positive/false negative
An issue related to observed false positives or false negatives.
label
Sep 17, 2024
lcartey
added
Difficulty-Low
A false positive or false negative report which is expected to take <1 day effort to address
Impact-Medium
labels
Sep 17, 2024
github-project-automation
bot
moved this to Reported
in Coding Standards Public Development Board
Sep 17, 2024
lcartey
moved this from Reported
to Ready for review
in Coding Standards Public Development Board
Sep 17, 2024
30 tasks
30 tasks
lcartey
moved this from Ready for review
to Assigned
in Coding Standards Public Development Board
Sep 17, 2024
lcartey
moved this from Assigned
to Triaged
in Coding Standards Public Development Board
Sep 17, 2024
It looks like we'll have the same false negative in the case of |
MichaelRFairhurst
added a commit
that referenced
this issue
Sep 18, 2024
The presence of -Wno-foo should not mark the compilation compliant with A1-1-2, nor should the presence of -Wfoo=0. Easily check for all -Wfoo=bar flags, that foo is not no-baz, and bar is not 0. Also check there is no -Wno-foo flag overruling it. Otherwise the query functionality remains the same. Add test cases for non-compliant scenarios -Wfoo=0 and -Wno-foo, and for the compliant scenario -Wall -Wno-foo. This will have some compatibility issues with PR #688, after one is merged the other will need some small updates before this can be merged.
MichaelRFairhurst
added a commit
that referenced
this issue
Oct 2, 2024
The presence of -Wno-foo should not mark the compilation compliant with A1-1-2, nor should the presence of -Wfoo=0. Easily check for all -Wfoo=bar flags, that foo is not no-baz, and bar is not 0. Also check there is no -Wno-foo flag overruling it. Otherwise the query functionality remains the same. Add test cases for non-compliant scenarios -Wfoo=0 and -Wno-foo, and for the compliant scenario -Wall -Wno-foo. This will have some compatibility issues with PR #688, after one is merged the other will need some small updates before this can be merged.
github-merge-queue bot
pushed a commit
that referenced
this issue
Oct 4, 2024
…ress-individual-warnings-flag Fix #689, false negatives for A1-1-2 thinking -Wno-foo is compliant.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Difficulty-Low
A false positive or false negative report which is expected to take <1 day effort to address
false positive/false negative
An issue related to observed false positives or false negatives.
Impact-Medium
Standard-AUTOSAR
Affected rules
A1-1-2
Description
This rule looks for compilations with no warning flags. However, it will falsely detect
-Wno-*
flags as if they are warning flags.Notably, gcc is often built with
-Wformat
enabled by default. This can be suppressed with-Wno-format
, which would cause the false negative.Note the same issue exists with
-w
which suppresses all-W*
flags, which is failing linux/gcc tests, and I created #688 to fix. However, this issue is, philosophically, one step further yet than that PR in terms of altering current behavior.Example
The text was updated successfully, but these errors were encountered: