mirror of
https://github.com/ceph/go-ceph
synced 2025-02-02 03:22:13 +00:00
Enable golint in travis and Makefile
This commit is contained in:
parent
b8f75ed68d
commit
157d0c73b3
@ -1,4 +1,7 @@
|
||||
sudo: required
|
||||
language: go
|
||||
dist: trusty
|
||||
|
||||
services:
|
||||
- docker
|
||||
|
||||
@ -21,6 +24,12 @@ before_install: |
|
||||
exit 1
|
||||
fi
|
||||
|
||||
before_script:
|
||||
- go get golang.org/x/lint/golint
|
||||
|
||||
# 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
|
||||
- make check
|
||||
|
4
Makefile
4
Makefile
@ -12,3 +12,7 @@ test-docker: .build-docker
|
||||
.build-docker:
|
||||
docker build -t $(DOCKER_CI_IMAGE) .
|
||||
@docker 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
|
||||
|
Loading…
Reference in New Issue
Block a user