Add golangci-lint to lefthook workflow
This commit is contained in:
parent
bab3200b6c
commit
a6ce0b7e67
2 changed files with 5 additions and 0 deletions
|
|
@ -34,6 +34,7 @@
|
||||||
pkgs.esbuild
|
pkgs.esbuild
|
||||||
pkgs.go
|
pkgs.go
|
||||||
pkgs.go-jet
|
pkgs.go-jet
|
||||||
|
pkgs.golangci-lint
|
||||||
pkgs.goose
|
pkgs.goose
|
||||||
pkgs.gotools
|
pkgs.gotools
|
||||||
pkgs.lefthook
|
pkgs.lefthook
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,10 @@ pre-commit:
|
||||||
glob: "*.go"
|
glob: "*.go"
|
||||||
run: gofmt -w {staged_files}
|
run: gofmt -w {staged_files}
|
||||||
stage_fixed: true
|
stage_fixed: true
|
||||||
|
lint:
|
||||||
|
glob: "*.go"
|
||||||
|
run: golangci-lint run --fix
|
||||||
|
stage_fixed: true
|
||||||
prettier:
|
prettier:
|
||||||
glob: "*.{html,js,ts,vue,scss}"
|
glob: "*.{html,js,ts,vue,scss}"
|
||||||
run: prettier -w {staged_files}
|
run: prettier -w {staged_files}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue