mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-13 01:50:55 +00:00
Fix go lint error and add golint checks to a pre-commit hook
This commit is contained in:
@@ -35,6 +35,10 @@ function testGoImports {
|
||||
diff -u <(echo -n) <(go_dirs | xargs -0 goimports -l)
|
||||
}
|
||||
|
||||
function testGoLint {
|
||||
diff -u <(echo -n) <(go_dirs | xargs -0 golint --min_confidence 0.85 )
|
||||
}
|
||||
|
||||
function testGoVet {
|
||||
go vet -all ./...
|
||||
}
|
||||
@@ -49,6 +53,7 @@ function testExamples {
|
||||
|
||||
runTest testGoFmt
|
||||
runTest testGoImports
|
||||
runTest testGoLint
|
||||
runTest testGoVet
|
||||
runTest testGoTest
|
||||
runTest testExamples
|
||||
|
||||
Reference in New Issue
Block a user