File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change 1
1
OUT_DIR := ./out
2
2
GO_FILES := $(shell find . -type f \( -iname '* .go' \) )
3
+ GO_MODULE := github.com/pushbits/cli
3
4
4
5
.PHONY : build
5
6
build :
@@ -12,17 +13,18 @@ clean:
12
13
13
14
.PHONY : test
14
15
test :
15
- stdout=$$(gofumpt -l . 2>&1 ) ; if [ " $$ stdout" ]; then exit 1; fi
16
+ if [ -n " $$ (gofumpt -l $( GO_FILES) )" ]; then echo " Code is not properly formatted" ; exit 1; fi
17
+ if [ -n " $$ (goimports -l -local $( GO_MODULE) $( GO_FILES) )" ]; then echo " Imports are not properly formatted" ; exit 1; fi
16
18
go vet ./...
17
19
misspell -error $(GO_FILES )
18
20
gocyclo -over 10 $(GO_FILES )
19
21
staticcheck ./...
20
- errcheck ./...
22
+ errcheck -ignoregenerated ./...
21
23
gocritic check -disable=
' #experimental,#opinionated' [email protected] 3 ./...
22
24
revive -set_exit_status ./...
23
25
nilaway ./...
24
26
go test -v -cover ./...
25
- gosec -exclude-dir=tests ./...
27
+ gosec -exclude-generated ./...
26
28
govulncheck ./...
27
29
@printf ' \n%s\n' " > Test successful"
28
30
35
37
go install github.com/mgechev/revive@latest
36
38
go install github.com/securego/gosec/v2/cmd/gosec@latest
37
39
go install go.uber.org/nilaway/cmd/nilaway@latest
40
+ go install golang.org/x/tools/cmd/goimports@latest
38
41
go install golang.org/x/vuln/cmd/govulncheck@latest
39
42
go install honnef.co/go/tools/cmd/staticcheck@latest
40
43
go install mvdan.cc/gofumpt@latest
Original file line number Diff line number Diff line change 9
9
"net/url"
10
10
"strings"
11
11
12
- "github.com/pushbits/cli/internal/handling"
13
12
log "github.com/sirupsen/logrus"
13
+
14
+ "github.com/pushbits/cli/internal/handling"
14
15
)
15
16
16
17
func buildURL (baseStr string , endpoint string ) * url.URL {
You can’t perform that action at this time.
0 commit comments