-
Notifications
You must be signed in to change notification settings - Fork 22
/
.pre-commit-config.yaml
61 lines (60 loc) · 1.83 KB
/
.pre-commit-config.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# See instructions in CONTRIBUTING.md
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
# Commitizen runs in commit-msg stage
# but we don't want to run the other hooks on commit messages
default_stages: [commit]
exclude: \.pb.go$
repos:
# Locally-authored hooks for better hermeticity
- repo: local
hooks:
- id: go-fmt
name: go fmt
description: Runs `go fmt` and asserts no changes are needed.
entry: ./hooks/go-fmt.sh
language: script
files: \.go$
- repo: https://github.com/syntaqx/git-hooks
rev: v0.0.18
hooks:
# Requires that shellcheck is already installed
- id: shellcheck
- repo: https://github.com/commitizen-tools/commitizen
rev: v3.13.0
hooks:
# Requires that commitizen is already installed
- id: commitizen
stages: [commit-msg]
- repo: https://github.com/keith/pre-commit-buildifier
rev: 6.4.0
hooks:
# Requires that buildifier is already installed
- id: buildifier
args: &args
- --warnings=all
- id: buildifier-lint
args: *args
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.1.0
hooks:
- id: prettier
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.5.0
hooks:
- id: insert-license
files: \.go$
args:
# Note: when changing the license_header file, use this to replace existing headers
# https://github.com/Lucas-C/pre-commit-hooks#removing-old-license-and-replacing-it-with-a-new-one
- --license-filepath
- hooks/license_header
- --comment-style
- /*| *| */
- repo: local
hooks:
- id: aspect_rules_lint
name: Format
language: system
entry: bazel run //:format
files: .*