File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ import (
1313
1414var (
1515 // Store the number of validation errors
16- validationErrorCount uint = 0
16+ errCount uint = 0
1717)
1818
1919func main () {
@@ -30,15 +30,18 @@ func main() {
3030 if subcommand == "lint" {
3131 lintPackage (flag .Arg (1 ))
3232
33- if validationErrorCount > 0 {
34- fmt .Printf ("%d linting error(s)\n " , validationErrorCount )
33+ if errCount > 0 {
3534 os .Exit (1 )
3635 }
3736 return
3837 }
3938
4039 if subcommand == "show-files" {
4140 showFiles (flag .Arg (1 ))
41+
42+ if errCount > 0 {
43+ os .Exit (1 )
44+ }
4245 return
4346 }
4447
@@ -128,7 +131,7 @@ func lintPackage(path string) {
128131
129132func err (ctx context.Context , s string ) {
130133 util .Printf (ctx , "error: " + s )
131- validationErrorCount += 1
134+ errCount += 1
132135}
133136
134137func warn (ctx context.Context , s string ) {
You can’t perform that action at this time.
0 commit comments