◐ Shell
clean mode source ↗

Combine multiple suppressions applied to the same diagnostic by rjmholt · Pull Request #1699 · PowerShell/PSScriptAnalyzer

Skip to content

Navigation Menu

Provide feedback

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

Merged

rjmholt

merged 16 commits into

Jul 23, 2021

Conversation

@rjmholt

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

JamesWTruher

rjmholt


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.

@t-lipingma

This comment has been minimized.

@rjmholt

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.

bergmeister

bergmeister

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.

@rjmholt

Note that suppression attributes didn't seem to work in PSv4 until I made the change in 498a8c9

@rjmholt rjmholt deleted the merge-suppressions branch

July 23, 2021 21:54