Skip to content

Commit 4730dfb

Browse files
vdemeestertekton-robot
authored andcommitted
Add a pre-commit setup to the repository.
This will allow us to run some checks before committing. Signed-off-by: Vincent Demeester <vdemeest@redhat.com>
1 parent 193b54a commit 4730dfb

1 file changed

Lines changed: 38 additions & 0 deletions

File tree

.pre-commit-config.yaml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# See https://pre-commit.com for more information
2+
# See https://pre-commit.com/hooks.html for more hooks
3+
default_install_hook_types: ["pre-push"]
4+
exclude: '(^vendor|.*golden$)'
5+
repos:
6+
- repo: https://github.com/pre-commit/pre-commit-hooks
7+
rev: v4.2.0
8+
hooks:
9+
- id: check-added-large-files
10+
- id: check-toml
11+
- id: check-shebang-scripts-are-executable
12+
- id: check-json
13+
- id: check-vcs-permalinks
14+
- id: detect-private-key
15+
exclude: ".*_test.go"
16+
- repo: local
17+
hooks:
18+
- id: lint-go
19+
name: "Lint GO"
20+
entry: make
21+
args: ["lint-go"]
22+
language: system
23+
types: [go]
24+
pass_filenames: false
25+
- id: test
26+
name: "Unit testing"
27+
entry: make
28+
args: ["test"]
29+
language: system
30+
types: [go]
31+
pass_filenames: false
32+
- id: lint-yaml
33+
name: "Lint YAML"
34+
entry: make
35+
args: ["lint-yaml"]
36+
language: system
37+
types: [yaml]
38+
pass_filenames: false

0 commit comments

Comments
 (0)