mirror of https://github.com/ceph/go-ceph
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:
parent
75fdc694be
commit
b3deb28b94
|
@ -20,11 +20,10 @@ before_install: |
|
||||||
docker build --build-arg CEPH_REPO_URL="${CEPH_REPO_URL}" -t ceph-golang-ci .
|
docker build --build-arg CEPH_REPO_URL="${CEPH_REPO_URL}" -t ceph-golang-ci .
|
||||||
|
|
||||||
before_script:
|
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
|
# cephfs (fuse) requires: --device /dev/fuse --cap-add SYS_ADMIN --security-opt apparmor:unconfined
|
||||||
script:
|
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
|
- 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
|
# run style checks
|
||||||
- go get golang.org/x/lint/golint
|
|
||||||
- make check
|
- make check
|
||||||
|
|
5
Makefile
5
Makefile
|
@ -23,5 +23,6 @@ test-docker: .build-docker
|
||||||
@$(CONTAINER_CMD) inspect -f '{{.Id}}' $(DOCKER_CI_IMAGE) > .build-docker
|
@$(CONTAINER_CMD) inspect -f '{{.Id}}' $(DOCKER_CI_IMAGE) > .build-docker
|
||||||
|
|
||||||
check:
|
check:
|
||||||
# TODO: add this when golint is fixed @for d in $$(go list ./... | grep -v /vendor/); do golint -set_exit_status $${d}; done
|
# Configure project's revive checks using .revive.toml
|
||||||
@for d in $$(go list ./... | grep -v /vendor/); do golint $${d}; done
|
# See: https://github.com/mgechev/revive
|
||||||
|
@for d in $$(go list ./... | grep -v /vendor/); do revive -config .revive.toml $${d}; done
|
||||||
|
|
Loading…
Reference in New Issue