-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.pre-commit-config.yaml
68 lines (59 loc) · 1.92 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
62
63
64
65
66
67
68
default_stages: [pre-commit]
repos:
- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
rev: v9.22.0
hooks:
- id: commitlint
stages: [commit-msg]
additional_dependencies: ["@commitlint/config-conventional"]
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.9.0.5
hooks:
- id: shellcheck
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.1.0
hooks:
- id: prettier
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: end-of-file-fixer
exclude: ^api
- id: trailing-whitespace
- repo: local
hooks:
- id: swag fmt
name: Format swag comments
language: system
pass_filenames: false
entry: swag fmt
files: ^(pkg|internal)/.*
- id: swag init
name: Create swagger docs.go
language: system
pass_filenames: false
entry: swag init --parseDependency --output ./api
files: ^(pkg|internal)/.*
- id: go mod tidy
name: go mod tidy
language: system
pass_filenames: false
entry: go mod tidy
files: ^go\.(mod|sum)$
- id: golangci-lint
name: golangci-lint
language: system
pass_filenames: false
entry: golangci-lint run
files: ^.*\.go$
# Taken from https://github.com/rstcheck/rstcheck/blob/178e8c1001aebe2dcbf006e7e6980246704d2315/.pre-commit-config.yaml#L141
#
# Find FIXME:|BUG: comments in all files
# Inline skip: `#i#` directly after the colon after the tag-word
- id: find-todos
name: "Find FIXME:|BUG: comments"
description: "Check for FIXME:|BUG: comments in all files"
language: pygrep
# This contains "FIMXE" because I often mistype it
entry: '(^|//!?|#|<!--|;|/\*(\*|!)?|\.\.)\s*(FIXME:|FIMXE:|BUG:)(?!#i#)'
exclude: CONTRIBUTING.md