Skip to content

Commit

Permalink
Improve pre-commit UX
Browse files Browse the repository at this point in the history
- run go test race in pre push stage
- lint the code at pre-push stage
  • Loading branch information
nawazkh committed Dec 10, 2024
1 parent 4b18ac2 commit 5348dcc
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
17 changes: 11 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,24 +43,29 @@ repos:
name: Run make verify-gen
entry: make verify-gen
language: system
stages: [pre-push]
stages: [ pre-push ]
- id: make-spellcheck
name: Run make verify-shellcheck
entry: make verify-shellcheck
language: system
stages: [ pre-push ]
stages: [pre-push]
- id: make-conversions
name: Run make verify-conversions
entry: make verify-conversions
language: system
stages: [ pre-push ]
stages: [pre-push]
- id: make-tiltfile
name: Run make verify-tiltfile
entry: make verify-tiltfile
language: system
stages: [ pre-push ]
stages: [pre-push]
- id: make-test
name: Run make test
entry: make test
name: Run make go-test-race
entry: make go-test-race
language: system
stages: [pre-push]
- id: make-lint
name: Run make lint
entry: make lint
language: system
stages: [ pre-push ]
1 change: 1 addition & 0 deletions docs/book/src/developers/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
10. Install [pre-commit framework](https://pre-commit.com/#installation)
- `brew install pre-commit` Or `pip install pre-commit`. Installs pre-commit globally.
- run `pre-commit install` at the root of the project to install pre-commit hooks to read `.pre-commit-config.yaml`
- run `pre-commit install --hook-type pre-push` to install pre-push hooks.
- *Note*: use `git commit --no-verify` to skip running pre-commit workflow as and when needed.

When developing on Windows, it is suggested to set up the project on Windows + WSL2 and the file should be checked out on as wsl file system for better results.
Expand Down

0 comments on commit 5348dcc

Please sign in to comment.