-
Notifications
You must be signed in to change notification settings - Fork 1.7k
C#: Support suppression comments in XML files #4948
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
base: main
Are you sure you want to change the base?
C#: Support suppression comments in XML files #4948
Conversation
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.
LGTM, except I think we should move the logic to the shared XML.qll
library.
csharp/ql/src/XMLAlertSuppression.ql
Outdated
/** | ||
* An alert suppression comment. | ||
*/ | ||
class SuppressionComment extends XMLComment { |
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.
It feels like this class and SuppressionScope
should be in XML.qll
, so it can be reused by other languages.
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.
Python part 👍
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.
C++ 👍
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.
Auto-format check fails.
Should this change be documented in a change-note? |
It probably should, yes. |
This one seems to have fallen through the cracks. Should it be resurrected, or is it no longer relevant? |
Probably worth resurrecting at some point - I think C# is still the only language where our queries report results in XML files, but it's still possible for custom queries to report results in XML for other languages. |
Is this still live or can it be closed/drafted? |
This adds a new
@kind alert-suppression
query which handles XML comments and accepts the same format as the existing query for C# comments.