Fix go lint error and add golint checks to a pre-commit hook

This commit is contained in:
Oleg Atamanenko
2018-06-09 23:05:26 -04:00
parent 2b05d39067
commit c994130005
18 changed files with 58 additions and 24 deletions

View File

@@ -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