-
Notifications
You must be signed in to change notification settings - Fork 7
/
.pre-commit-config.yaml
39 lines (39 loc) · 1.2 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
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-json
exclude: vscode/launch.json
- id: check-yaml
exclude: deployment/.*
- id: check-added-large-files
- repo: https://github.com/dnephin/pre-commit-golang
rev: v0.5.1
hooks:
- id: go-fmt
- id: go-imports
- repo: local
hooks:
- id: regen-protobuf
name: Regenerate protobuf files
files: server/api/
entry: bash server/api/generate.bash
language: system
pass_filenames: false
stages: [commit]
- id: go-mod-tidy-server
name: Check if go.mod and go.sum are up to date for server
files: server/
entry: sh -c "(cd server && go mod tidy)"
language: system
pass_filenames: false
stages: [commit]
#- id: go-mod-tidy-client
# name: Check if go.mod and go.sum are up to date for client
# files: server/
# entry: sh -c "(cd client && go get github.com/TUM-Dev/Campus-Backend/server && go mod tidy)"
# language: system
# pass_filenames: false
# stages: [commit]