Combine multiple suppressions applied to the same diagnostic by rjmholt · Pull Request #1699 · PowerShell/PSScriptAnalyzer
-
Notifications
You must be signed in to change notification settings - Fork 409
Merged
Conversation
PR Summary
Fixes #1691.
Instead of emitting a suppressed record for each suppression on a diagnostic, we combine all suppressions that apply to a diagnostic into a single object.
This partially reimplements #1694.
/cc @t-lipingma
PR Checklist
- PR has a meaningful title
- Use the present tense and imperative mood when describing your changes
- Summarized changes
- Change is not breaking
- Make sure all
.cs,.ps1and.psm1files have the correct copyright header - Make sure you've added a new test if existing tests do not effectively test the code changed and/or updated documentation
- This PR is ready to merge and is not Work in Progress.
- If the PR is work in progress, please add the prefix
WIP:to the beginning of the title and remove the prefix when the PR is ready.
- If the PR is work in progress, please add the prefix
|
|
||
| for (int i = 0; i < suppressed.Length; i += 1) | ||
|
|
||
| // Do any error reporting for misused RuleSuppressionIDs here. |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
string may change to String
Our preferred style is to use the language aliases over the full type names. For example string instead of String and int instead of Int32.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good from a high level. I agree this PR is probably preferential to the original one.
Note that suppression attributes didn't seem to work in PSv4 until I made the change in 498a8c9
rjmholt
deleted the
merge-suppressions
branch