Skip to content

Commit 3c34799

Browse files
authored
Add a pre-commit hook to check all files (#4046)
1 parent b673fb7 commit 3c34799

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

.pre-commit-hooks.yaml

+9-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
11
- id: golangci-lint
22
name: golangci-lint
3-
description: Fast linters runner for Go.
3+
description: Fast linters runner for Go. Note that only modified files are linted, so linters like 'unused' that need to scan all files won't work as expected.
44
entry: golangci-lint run --new-from-rev HEAD --fix
55
types: [go]
66
language: golang
77
require_serial: true
88
pass_filenames: false
9+
- id: golangci-lint-full
10+
name: golangci-lint-full
11+
description: Fast linters runner for Go. Runs on all files in the repo. Use this hook if you use pre-commit in CI.
12+
entry: golangci-lint run --fix
13+
types: [go]
14+
language: golang
15+
require_serial: true
16+
pass_filenames: false

0 commit comments

Comments
 (0)