Skip to content

Latest commit

 

History

History
30 lines (24 loc) · 1.65 KB

File metadata and controls

30 lines (24 loc) · 1.65 KB

← Back to Backlog

[SC-009] ✅ DONE - PowerShell Lint Guard (skill + pre-commit hook)

Status: Done (2026-03-02) Priority: High Component: .claude/skills/powershell-dev/SKILL.md, tools/githooks/pre-commit, tools/githooks/install-hooks.ps1

Summary: As a contributor, I want PSScriptAnalyzer errors (especially missing UTF-8 BOM) caught immediately — both during Claude-assisted editing and at commit time — so that lint failures never reach CI.

Workflow:

  1. Update powershell-dev skill to instruct Claude to lint .ps1 files immediately after editing
  2. Create a git pre-commit hook that checks BOM and runs PSScriptAnalyzer on staged .ps1 files
  3. Register the hook in install-hooks.ps1

Acceptance Criteria:

  • powershell-dev skill has a "Post-Edit Lint Check" section with PSScriptAnalyzer + BOM fix instructions
  • Pre-commit checklist in skill updated to emphasize lint is mandatory
  • tools/githooks/pre-commit exists and checks BOM + PSScriptAnalyzer on staged .ps1 files
  • tools/githooks/install-hooks.ps1 installs pre-commit alongside commit-msg
  • Hook blocks commits when a staged .ps1 file is missing BOM
  • Hook blocks commits when PSScriptAnalyzer reports Warning/Error
  • Hook passes cleanly when all staged .ps1 files are lint-clean
  • testrunner.ps1 -LintOnly runs only linter.Tests.ps1 (no test files)
  • -LintOnly composes with -Unit, -Integration, and -TestPath
  • Pre-commit hook uses testrunner -LintOnly instead of direct PSScriptAnalyzer
  • powershell-dev skill uses testrunner -LintOnly for post-edit lint

← Back to Backlog