Skip to content

fix(pre-commit): show dotnet format output on failure

d1f2687
Select commit
Loading
Failed to load commit list.
Open

Add optional pre-commit hook for code formatting #5178

fix(pre-commit): show dotnet format output on failure
d1f2687
Select commit
Loading
Failed to load commit list.
@sentry/warden / warden: code-review completed May 6, 2026 in 31s

1 issue

code-review: Found 1 issue (1 low)

Low

remove-hooks fails if core.hooksPath was never set - `dev.cs:117`

git config --unset core.hooksPath exits with code 5 when the key does not exist, which RunStepAsync will surface as a non-zero failure. A developer who runs remove-hooks without first running setup-hooks (or after the config has already been cleared) will see a confusing failure even though the desired end-state is achieved. Consider using git config --unset --local core.hooksPath || true-style handling, or checking existence first.


Duration: 30.2s · Tokens: 90.8k in / 1.0k out · Cost: $0.36