mirror of
https://github.com/rishikanthc/Scriberr.git
synced 2026-06-28 06:46:25 +00:00
fix: configure lefthook for go lint checks
This commit is contained in:
committed by
Rishikanth Chandrasekaran
parent
658a1a5c49
commit
9146fa075f
2
go.mod
2
go.mod
@@ -18,6 +18,7 @@ require (
|
||||
github.com/swaggo/swag v1.16.6
|
||||
golang.org/x/crypto v0.41.0
|
||||
golang.org/x/sync v0.17.0
|
||||
golang.org/x/text v0.29.0
|
||||
gorm.io/gorm v1.30.1
|
||||
)
|
||||
|
||||
@@ -72,7 +73,6 @@ require (
|
||||
golang.org/x/mod v0.27.0 // indirect
|
||||
golang.org/x/net v0.43.0 // indirect
|
||||
golang.org/x/sys v0.35.0 // indirect
|
||||
golang.org/x/text v0.29.0 // indirect
|
||||
golang.org/x/tools v0.36.0 // indirect
|
||||
google.golang.org/protobuf v1.34.1 // indirect
|
||||
gopkg.in/yaml.v2 v2.4.0 // indirect
|
||||
|
||||
10
lefthook.yml
10
lefthook.yml
@@ -1,13 +1,11 @@
|
||||
# lefthook.yml
|
||||
|
||||
pre-commit:
|
||||
parallel: true
|
||||
commands:
|
||||
# We run this first so the linter checks the final code structure.
|
||||
frontend-format:
|
||||
root: "web/frontend/" # REPLACE with your actual folder name
|
||||
glob: "**/*.{js,jsx,ts,tsx,json,css,scss,md}"
|
||||
run: npx prettier --write {staged_files}
|
||||
stage_fixed: true
|
||||
go-lint:
|
||||
glob: "**/*.go"
|
||||
run: golangci-lint run --new-from-rev=HEAD~ {staged_files}
|
||||
|
||||
frontend-lint:
|
||||
root: "web/frontend/"
|
||||
|
||||
Reference in New Issue
Block a user