forked from superfly/flyctl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
28 lines (26 loc) · 955 Bytes
/
.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
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- repo: https://github.com/tekwizely/pre-commit-golang
rev: v1.0.0-rc.1
hooks:
- id: go-mod-tidy
# NOTE: This pre-commit hook is ignored when running on Github Workflow
# because goalngci-lint github action is much more useful than the pre-commit action.
# The trick is to run github action only for "manual" hook stage
- repo: https://github.com/golangci/golangci-lint
rev: v1.54.2
hooks:
- id: golangci-lint
stages: [commit]
- id: golangci-lint
name: "golangci-lint api"
stages: [commit]
entry: bash -c "cd api && exec golangci-lint run --new-from-rev HEAD --fix"