Skip to content

Latest commit

 

History

History
42 lines (31 loc) · 781 Bytes

File metadata and controls

42 lines (31 loc) · 781 Bytes

Module API

Exports

  • Invoke-PoshGuard — main entry point to analyze and auto-fix PowerShell code

Signature

Invoke-PoshGuard `
  -Path <string> `
  [-DryRun] `
  [-ShowDiff] `
  [-Recurse] `
  [-Skip <string[]>] `
  [-ExportSarif] `
  [-SarifOutputPath <string>]

Examples

# Preview changes
Invoke-PoshGuard -Path ./script.ps1 -DryRun -ShowDiff

# Apply fixes recursively
Invoke-PoshGuard -Path ./src -Recurse

# Export SARIF
Invoke-PoshGuard -Path . -DryRun -ExportSarif -SarifOutputPath ./poshguard-results.sarif

Notes

  • For repo usage without installing the module, call ./tools/Apply-AutoFix.ps1 directly.
  • PSScriptAnalyzer settings and quality gates load from config/ by default.