-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
CodeQL should respect Java's @SuppressWarnings("all") annotation #7294
Comments
It should be easy to extend AlertSuppressionAnnotations.ql that was introduced in |
@oleschoenburg are you using code scanning, LGTM or the CLI to run your analysis? |
@smowton We are using the CodeQL Github Workflow |
GitHub CodeScanning does not support alert suppression comments and annotations at the moment. Please file a feature request in https://github.com/github/codeql/discussion . As a workaround you might want to use https://github.com/zbazztian/filter-sarif . This is an Action that can be used to filter results by file path . You can use it to remove results from the "SARIF" file containing the alerts before it is uploaded to the CodeScanning API. As a quick way to get a list of file paths you could run |
Okay, thanks for the clarification! Still would be a useful improvement I think 🙂 |
Just for reference: The |
It has been a year now. Where is this issue of being able to suppress codeQL errors and warnings that are determined to be false positives? |
Description of the issue
Similar to #2076, it'd be nice to respect
@SuppressWarnings(all)
by supressing all lgtm warnings. This is often used by generated code, for example code generated by SBE:https://github.com/real-logic/simple-binary-encoding/blob/44ca92f152cbfaaaf0b72bc9ee08e2f2c345b303/sbe-tool/src/main/java/uk/co/real_logic/sbe/generation/java/JavaGenerator.java#L1664
The text was updated successfully, but these errors were encountered: