Skip to content

Take control over your live stream video by running it yourself. Streaming + chat out of the box.

fix: scope pre-commit golangci-lint to packages of staged files

Gabe Kangas6e6914ca27bd
diff --git a/lefthook.yml b/lefthook.yml
index bffc929001..56330a6a63 100644
--- a/lefthook.yml
+++ b/lefthook.yml
@@ -46,7 +46,7 @@ pre-commit:
stage_fixed: true
golangci-lint:
glob: '*.go'
- run: ./bin/golangci-lint run ./...
+ run: ./bin/golangci-lint run $(echo {staged_files} | tr ' ' '\n' | xargs -n1 dirname | sort -u)
go-test:
glob: '*.go'
run: go test ./... > /dev/null