refactor(lint): replace tool

This commit is contained in:
Bo-Yi Wu
2019-01-18 22:58:17 +08:00
parent 75d2ee1e10
commit b3f09b7592
2 changed files with 7 additions and 20 deletions
+4 -5
View File
@@ -16,34 +16,33 @@ pipeline:
commands:
- make ssh-server
- make vet
- make lint
- make fmt-check
- coverage all
- make coverage
build_linux_amd64:
image: appleboy/golang-testing:1.10.0
image: golang:1.11
pull: true
group: build
commands:
- make build_linux_amd64
build_linux_arm64:
image: appleboy/golang-testing:1.10.0
image: golang:1.11
pull: true
group: build
commands:
- make build_linux_arm64
build_linux_arm:
image: appleboy/golang-testing:1.10.0
image: golang:1.11
pull: true
group: build
commands:
- make build_linux_arm
release:
image: appleboy/golang-testing:1.10.0
image: golang:1.11
pull: true
commands:
- make release
+3 -15
View File
@@ -35,23 +35,11 @@ fmt:
vet:
go vet $(PACKAGES)
errcheck:
@hash errcheck > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
go get -u github.com/kisielk/errcheck; \
fi
errcheck $(PACKAGES)
lint:
@hash golint > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
go get -u github.com/golang/lint/golint; \
@hash revive > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
$(GO) get -u github.com/mgechev/revive; \
fi
for PKG in $(PACKAGES); do golint -set_exit_status $$PKG || exit 1; done;
unconvert:
@hash unconvert > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
go get -u github.com/mdempsky/unconvert; \
fi
for PKG in $(PACKAGES); do unconvert -v $$PKG || exit 1; done;
revive -config .revive.toml -exclude=./vendor/... ./... || exit 1
.PHONY: fmt-check
fmt-check: