makefile: use revive for style checking

Switch use of style checker from golint to revive for both the makefile
and travis configuration.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
This commit is contained in:
John Mulligan 2019-12-11 21:04:19 -05:00 committed by John Mulligan
parent 75fdc694be
commit b3deb28b94
2 changed files with 5 additions and 5 deletions

View File

@ -20,11 +20,10 @@ before_install: |
docker build --build-arg CEPH_REPO_URL="${CEPH_REPO_URL}" -t ceph-golang-ci .
before_script:
- go get golang.org/x/lint/golint
- go get github.com/mgechev/revive
# cephfs (fuse) requires: --device /dev/fuse --cap-add SYS_ADMIN --security-opt apparmor:unconfined
script:
- docker run --device /dev/fuse --cap-add SYS_ADMIN --security-opt apparmor:unconfined --rm -it -v ${PWD}:/go/src/github.com/ceph/go-ceph:z ceph-golang-ci
# run golint and other style checks
- go get golang.org/x/lint/golint
# run style checks
- make check

View File

@ -23,5 +23,6 @@ test-docker: .build-docker
@$(CONTAINER_CMD) inspect -f '{{.Id}}' $(DOCKER_CI_IMAGE) > .build-docker
check:
# TODO: add this when golint is fixed @for d in $$(go list ./... | grep -v /vendor/); do golint -set_exit_status $${d}; done
@for d in $$(go list ./... | grep -v /vendor/); do golint $${d}; done
# Configure project's revive checks using .revive.toml
# See: https://github.com/mgechev/revive
@for d in $$(go list ./... | grep -v /vendor/); do revive -config .revive.toml $${d}; done