PSScriptAnalyzer: A Second Pair of Eyes

Invoke-ScriptAnalyzer reads a script or a whole module without running it and lists every likely problem with its rule, severity, line and message; the rules worth knowing ask for full command names, approved verbs, singular nouns, -WhatIf on commands that change things, results instead of Write-Host and no unused variables, and a settings file or SuppressMessageAttribute sets one aside on purpose.

Updated

Cheat sheet for the lesson PSScriptAnalyzer: A Second Pair of Eyes: Invoke-ScriptAnalyzer reads a script or a whole module without running it and lists every likely problem with its rule, severity, line and message; the rules worth knowing ask for full command names, approved verbs, singular…
Category
PowerShell
Level
Journeyman
Tags
approved-verb, invoke-scriptanalyzer, Linter, powershell, psscriptanalyzer, suppressmessageattribute