Skip to content

Commit b586112

Browse files
committed
Modified module hooks to trigger on go.mod changes
1 parent 7a9cc10 commit b586112

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

.pre-commit-hooks.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
- id: go-build-mod
88
name: 'go-build-mod'
99
entry: go-build-mod.sh
10-
types: [go]
10+
files: '(\.go$)|(\bgo\.mod$)'
1111
language: 'script'
1212
description: "Run 'cd $(mod_root $FILE); go build ./...' for each staged .go file"
1313
pass_filenames: true
@@ -91,7 +91,7 @@
9191
- id: go-test-mod
9292
name: 'go-test-mod'
9393
entry: go-test-mod.sh
94-
types: [go]
94+
files: '(\.go$)|(\bgo\.mod$)'
9595
language: 'script'
9696
description: "Run 'cd $(mod_root $FILE); go test ./...' for each staged .go file"
9797
pass_filenames: true
@@ -189,7 +189,7 @@
189189
- id: go-vet-mod
190190
name: 'go-vet-mod'
191191
entry: go-vet-mod.sh
192-
types: [go]
192+
files: '(\.go$)|(\bgo\.mod$)'
193193
language: 'script'
194194
description: "Run 'cd $(mod_root $FILE); go vet ./...' for each staged .go file"
195195
pass_filenames: true
@@ -371,7 +371,7 @@
371371
- id: golangci-lint-mod
372372
name: 'golangci-lint-mod'
373373
entry: golangci-lint-mod.sh
374-
types: [go]
374+
files: '(\.go$)|(\bgo\.mod$)'
375375
language: 'script'
376376
description: "Run 'cd $(mod_root $FILE); golangci-lint run ./...' for each staged .go file"
377377
pass_filenames: true
@@ -387,7 +387,7 @@
387387
- id: golangci-lint-mod-fix
388388
name: 'golangci-lint-mod-fix'
389389
entry: golangci-lint-mod-fix.sh
390-
types: [go]
390+
files: '(\.go$)|(\bgo\.mod$)'
391391
language: 'script'
392392
description: "Run 'cd $(mod_root $FILE); golangci-lint run --fix ./...' for each staged .go file"
393393
pass_filenames: true

0 commit comments

Comments
 (0)