PowerShell / PowerShell/PSScriptAnalyzer

Definitions for Information, Warning, and Error Severities

Open
#467 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Area - Documentation Issue - Enhancement
Dominant language
C#
Stars
2.2k
Forks
414
Avg merge
13h 1m
Merged PRs (30d)
2

Description

In the code comments for the RuleSeverity enum, a warning does not follow PowerShell's "recommended" guidelines and Errors do not conform to PowerShell's "required" guidelines. Information rules are "recommended by PowerShell best practice".

I just posted #466 and now that I am thinking about it, I am not sure what the specific criteria is that would differentiate Warnings from Errors. For my team, at my company, we cannot have any hard coded passwords in a script, so this would definitely be an Error. However, that might not be the case for everyone everywhere.

The definitions of Warning and Error severity should be clearly defined in the documentation. I have some ideas and opinions here, as I am sure everyone in the PS community does. Would it make sense to use https://github.com/PoshCode/PowerShellPracticeAndStyle as a starting point for best practices and guidelines?

I am also wondering if it would make sense to have the ability to override severity levels for built in rules.

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 with the RuleSeverity enum comments and compare their current wording with the PowerShellPracticeAndStyle guidance linked in the issue. Define and document criteria that distinguish Information, Warning, and Error severities, and clarify whether built-in severity overrides are in scope.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell
Domain
documentation
Issue type
Documentation
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.