-
Notifications
You must be signed in to change notification settings - Fork 250
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a pre-commit setup to the repository.
This will allow us to run some checks before committing. Signed-off-by: Vincent Demeester <[email protected]>
- Loading branch information
1 parent
057b1ec
commit 6a8e0db
Showing
2 changed files
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# See https://pre-commit.com for more information | ||
# See https://pre-commit.com/hooks.html for more hooks | ||
default_install_hook_types: ["pre-push"] | ||
exclude: '(^vendor|.*golden$)' | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.2.0 | ||
hooks: | ||
- id: check-added-large-files | ||
- id: check-toml | ||
- id: check-shebang-scripts-are-executable | ||
- id: check-json | ||
- id: check-vcs-permalinks | ||
- id: detect-private-key | ||
exclude: ".*_test.go" | ||
- repo: local | ||
hooks: | ||
- id: lint-go | ||
name: "Lint GO" | ||
entry: make | ||
args: ["lint-go"] | ||
language: system | ||
types: [go] | ||
pass_filenames: false | ||
- id: test | ||
name: "Unit testing" | ||
entry: make | ||
args: ["test"] | ||
language: system | ||
types: [go] | ||
pass_filenames: false | ||
- id: lint-yaml | ||
name: "Lint YAML" | ||
entry: make | ||
args: ["lint-yaml"] | ||
language: system | ||
types: [yaml] | ||
pass_filenames: false |