Files
noteflow/.claude/hookify.warn-baselines-edit-bash.local.md

1.4 KiB

name, enabled, event, action, pattern
name enabled event action pattern
warn-baselines-edit-bash true bash warn (sed|awk|echo|cat|tee|>|>>|cp|mv).*tests/quality/baselines.json

⚠️ Warning: Editing Quality Baselines via Bash

You are about to modify tests/quality/baselines.json using a bash command.

Before You Run This Command

Ask yourself: Am I lowering baselines because I fixed the root cause, or because I want to bypass the quality check?

Legitimate Reasons to Edit

  • You fixed violations in source code and baselines now need updating to reflect lower counts
  • You added new checks and need to establish initial baselines
  • A false positive was identified and documented

Signs You Should Write Better Tests Instead

  • Editing baselines to make a failing test pass without fixing the underlying code
  • Increasing violation counts to "allow" more issues
  • Avoiding the effort of fixing actual code quality problems

What You Should Do Instead

  1. Run /test-extender to write better tests that satisfy the quality gates
  2. Fix the actual violations in source code (the quality checks exist for a reason)
  3. Only then update baselines.json to reflect the improved state

Remember

The quality gate exists to maintain code health. Editing baselines to bypass checks is cheating the system and will accumulate technical debt.

If you proceed, be prepared to justify why this baseline change is legitimate.