Skip to content

Commit

Permalink
Merge pull request #3724 from nawazkh/update_pre-commit-config
Browse files Browse the repository at this point in the history
Run local verifying targets too before git commit
  • Loading branch information
k8s-ci-robot authored Aug 11, 2023
2 parents a0dcdea + e54d5f4 commit a784ef1
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 1 deletion.
35 changes: 35 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,38 @@ repos:
rev: v2.17.2
hooks:
- id: pylint
- repo: local
hooks:
- id: make-verify-boilerplate
name: Run make verify-boilerplate
description: Runs `make verify-boilerplate` to check for boilerplate headers.
entry: make verify-boilerplate
language: system
- repo: local
hooks:
- id: make-verify-modules
name: Run make verify-modules
description: Runs `make verify-modules` to verify go.sum go.mod are the latest.
entry: make verify-modules
language: system
- repo: local
hooks:
- id: make-verify-shellcheck
name: Run make verify-shellcheck
description: Runs `make verify-shellcheck` to verify shell files are passing lint.
entry: make verify-shellcheck
language: system
- repo: local
hooks:
- id: make-verify-tiltfile
name: Run make verify-tiltfile
description: Runs `make verify-tiltfile` to verify Tiltfile format.
entry: make verify-tiltfile
language: system
- repo: local
hooks:
- id: make-codespell
name: Run make verify-codespell
description: Runs `make verify-codespell` to verify codespell format.
entry: make verify-codespell
language: system
3 changes: 2 additions & 1 deletion docs/book/src/developers/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,10 @@
- `sudo apt install make` on Linux.
9. Install [timeout][timeout]
- `brew install coreutils` on macOS.
9. Install [pre-commit framework](https://pre-commit.com/#installation)
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`
- *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 a784ef1

Please sign in to comment.