- Notifications
You must be signed in to change notification settings - Fork70
Add support for deviations on next line and multiple lines#807
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
Uh oh!
There was an error while loading.Please reload this page.
Merged
Changes fromall commits
Commits
Show all changes
23 commits Select commitHold shift + click to select a range
f3a6c3f Deviations: remove no longer required query
lcartey7b2a2e0 Add library for more complex code identifier deviations
lcarteyf173072 Deviations: Integrate extended code-identifier deviations
lcarteye36828d Deviations: Add test cases for new code-identifier deviations
lcarteye077935 Update user manual for new code identifier deviations
lcartey6e68fb8 Deviations: Support an attribute like comment syntax
lcartey1a24541 Deviations: Support C/C++ attributes
lcartey4283652 Deviations: Switch to new deviations format
lcarteyc65f635 Remove deviation suppression query tests
lcarteyf56fa0f Detect invalid deviation markers
lcarteybf62d9a Merge branch 'main' into lcartey/extend-deviations
lcartey5a6d7ca Deviations: Support attribute inheritence
lcarteye38e416 Reformatting test file
lcartey9f35565 Add change note, update manual.
lcarteyd2f8670 Reformat file
lcartey0de32d3 Update expected results
lcartey029537d Fix typos
lcartey3f1997b Deviations: Highlight invalid starts
lcartey665a7d1 Improve documentation
lcartey8437c7c Deviation: Refactor begin/end for clarity.
lcartey20669c7 Deviation: Clarification in user manual.
lcartey9e35e59 Deviations: use getADeviationRecord
lcarteyb273d0f Deviations: Update expected tests
lcarteyFile filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
13 changes: 13 additions & 0 deletionschange_notes/2025-02-13-deviations.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| - A new in code deviation format has been introduced, using the C/C++ attribute syntax: | ||
| ``` | ||
| [[codeql::<standard>_deviation("<code-identifier>")]] | ||
| ``` | ||
| This can be applied to functions, statements and variables to apply a deviation from the Coding Standards configuration file. The user manual has been updated to describe the new format. | ||
| - For those codebases that cannot use standard attributes, we have also introduced a comment based syntax | ||
| ``` | ||
| // codeql::<standard>_deviation(<code-identifier>) | ||
| // codeql::<standard>_deviation_next_line(<code-identifier>) | ||
| // codeql::<standard>_deviation_begin(<code-identifier>) | ||
| // codeql::<standard>_deviation_end(<code-identifier>) | ||
| ``` | ||
| Further information is available in the user manual. |
21 changes: 8 additions & 13 deletionscpp/common/src/codingstandards/cpp/Exclusions.qll
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Oops, something went wrong.
Uh oh!
There was an error while loading.Please reload this page.
Oops, something went wrong.
Uh oh!
There was an error while loading.Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.