File tree 1 file changed +0
-9
lines changed
1 file changed +0
-9
lines changed Original file line number Diff line number Diff line change @@ -317,15 +317,6 @@ and the [`entry`](#hooks-entry) should match an executable which will get instal
317
317
This language supports `additional_dependencies` and will pass any of the values directly to `go
318
318
install`. It can be used as a `repo: local` hook.
319
319
320
- Note that Go tooling often works with packages, not individual files. Many Go tools even refuse to
321
- work on multiple files, (possibly from separate packages) passed as positional arguments. A solution
322
- for small or medium sized repositories is to configure Go hooks with `pass_filenames: false` and
323
- `args: [./...]` or `args: [.]`, to always lint the entire repository. However, this requires fixing
324
- any existing issues when enabling new hooks, and fails to leverage `pre-commit`' s fine grained file
325
- focus. [revgrep](https://pkg.go.dev/github.com/golangci/revgrep) can be used to address parts of
326
- this, but large repositories with Go hooks might need additional sophistication to ensure responsive
327
- hook execution times.
328
-
329
320
_changed in 2.17.0_: previously `go get ./...` was used
330
321
331
322
_new in 3.0.0_: pre-commit will bootstrap `go` if it is not present. `language: golang`
You can’t perform that action at this time.
0 commit comments