PowerShell / PowerShell/PSScriptAnalyzer

Improved rule suppression

Open
#1,483 2 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Consider - 2.0
Dominant language
C#
Stars
2.2k
Forks
414
Avg merge
13h 1m
Merged PRs (30d)
2

Description

PSSA2 should allow the suppression of rules:

  • Current suppression attributes should be supported
  • Comment-based suppression should also be supported and work based on token reading
  • Ideally suppression should occur before rules create or emit a record to minimise overhead. This is most like easiest by making diagnostic emission use a method that can filter out diagnostics
  • In particular, it may be useful to pre-process input and find excluded extents rather than each rule performing the same suppression discovery over and over

Another suppression scenario is being able to suppress groups of rules (possibly wildcarded) over a list of files (also possibly wildcarded).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the existing suppression attributes, comment and token-reading behavior, and the diagnostic emission path described in the issue. Define how rule and wildcarded file-group suppression should work, then verify that diagnostics are filtered before emission and that all listed suppression scenarios are covered.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, powershell
Domain
devtools, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.