mirror of
https://github.com/appleboy/drone-scp.git
synced 2026-06-04 18:23:59 +08:00
refactor(lint): replace tool
This commit is contained in:
+4
-5
@@ -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
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user