-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
69 lines (69 loc) · 2.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
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
69
repos:
#########################################
# General
#########################################
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
hooks:
- id: check-added-large-files
- id: check-yaml
exclude: infrastructure/ansible/roles/game-server/templates/docker-compose.yml
- id: end-of-file-fixer
- id: trailing-whitespace
#########################################
# Backend
#########################################
- repo: local
hooks:
- id: eslint:async-server-provisioner
name: Eslint Async Server Provisioner
language: script
pass_filenames: false
files: ^async-server-provisioner/
entry: ./bin/execute-npm.sh
args: ["async-server-provisioner", "eslint:fix"]
#########################################
# React Frontend
#########################################
- repo: local
hooks:
- id: eslint:react
name: Eslint React Frontend
language: script
pass_filenames: false
files: ^react-frontend/
entry: ./bin/execute-npm.sh
args: ["react-frontend", "eslint:fix"]
#########################################
# Infrastructure
#########################################
- repo: https://github.com/antonbabenko/pre-commit-terraform
rev: v1.45.0
hooks:
- id: terraform_fmt
files: ^infrastructure/terraform
- id: terraform_validate
files: ^infrastructure/terraform
- id: terragrunt_fmt
files: ^infrastructure/terragrunt
- id: terragrunt_validate
files: ^infrastructure/terragrunt/.*/terragrunt.hcl
#########################################
# Game Server Watcher
#########################################
- repo: local
hooks:
- id: go:fmt
name: Go fmt
language: script
pass_filenames: false
files: ^game-server-watcher/
entry: ./bin/execute-go.sh
args: ["game-server-watcher", "fmt", "./..."]
- id: go:vet
name: Go Vet
language: script
pass_filenames: false
files: ^game-server-watcher/
entry: ./bin/execute-go.sh
args: ["game-server-watcher", "vet", "./..."]