From b3deb28b9485247479e35da7a0c89ae0d54d79d3 Mon Sep 17 00:00:00 2001 From: John Mulligan Date: Wed, 11 Dec 2019 21:04:19 -0500 Subject: [PATCH] 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 --- .travis.yml | 5 ++--- Makefile | 5 +++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index cd61feb..bd44fc0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 diff --git a/Makefile b/Makefile index e302858..1873c3c 100644 --- a/Makefile +++ b/Makefile @@ -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