mirror of
https://github.com/codeflash-ai/codeflash.git
synced 2026-05-04 18:25:17 +00:00
chore: add pre-push prek rule to match CI behavior
This commit is contained in:
parent
3e072a7ad0
commit
c2fe5261a3
1 changed files with 1 additions and 0 deletions
|
|
@ -10,3 +10,4 @@
|
|||
- **Paths**: Always use absolute paths
|
||||
- **Encoding**: Always pass `encoding="utf-8"` to `open()`, `read_text()`, `write_text()`, etc. in new or changed code — Windows defaults to `cp1252` which breaks on non-ASCII content. Don't flag pre-existing code that lacks it unless you're already modifying that line.
|
||||
- **Pre-commit**: Run `uv run prek` before committing — fix any issues before creating the commit
|
||||
- **Pre-push**: Before pushing, run `uv run prek run --from-ref origin/<base>` to check all changed files against the PR base — this matches CI behavior and catches issues that per-commit prek misses. To detect the base branch: `gh pr view --json baseRefName -q .baseRefName 2>/dev/null || echo main`
|
||||
|
|
|
|||
Loading…
Reference in a new issue