- Run `Invoke-ScriptAnalyzer -Path ./src -Recurse` in CI and fail the pipeline on any `Error` or `Warning` severity finding.
- Fix `PSAvoidUsingCmdletAliases` violations by replacing aliases (`ls`, `gc`, `%`, `?`) with full cmdlet names (`Get-ChildItem`, `Get-Content`, `ForEach-Object`, `Where-Object`).
- Address `PSUseDeclaredVarsMoreThanAssignments` warnings by removing unused variables — they indicate dead code or logic errors.
- Use `Invoke-Formatter -ScriptDefinition $code -Settings CodeFormattingOTBS` (or `Allman`) to enforce consistent brace style automatically.
- Suppress individual rules inline only when absolutely necessary: `[Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingWriteHost','')]` with a justification comment.
- Configure a `.PSScriptAnalyzerSettings.psd1` file in the project root to pin rule severity levels and exclude generated or vendored files.
- Enable `PSUseConsistentIndentation` and `PSAlignAssignmentStatement` formatting rules to enforce 4-space indentation and aligned hashtable assignment.