Add linting
This commit is contained in:
parent
2053dea3ac
commit
76ddad34b8
9
Makefile
9
Makefile
|
@ -1,14 +1,17 @@
|
|||
export GOOS=windows
|
||||
|
||||
fmt:
|
||||
gofmt -l -w -s .
|
||||
|
||||
build:
|
||||
promu build -v
|
||||
|
||||
test:
|
||||
go test -v ./...
|
||||
|
||||
lint:
|
||||
gometalinter --vendor --config gometalinter.config ./...
|
||||
|
||||
fmt:
|
||||
gofmt -l -w -s .
|
||||
|
||||
crossbuild:
|
||||
# The prometheus/golang-builder image for promu crossbuild doesn't exist
|
||||
# on Windows, so for now, we'll just build twice
|
||||
|
|
|
@ -12,11 +12,15 @@ clone_folder: c:\gopath\src\github.com\martinlindhe\wmi_exporter
|
|||
install:
|
||||
- set PATH=%GOPATH%\bin;%PATH%
|
||||
- go get -u github.com/prometheus/promu
|
||||
- go get -u github.com/alecthomas/gometalinter && gometalinter --install
|
||||
- choco install gitversion.portable make -y
|
||||
|
||||
test_script:
|
||||
- make test
|
||||
|
||||
after_test:
|
||||
- make lint
|
||||
|
||||
build_script:
|
||||
- ps: |
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
{}
|
Loading…
Reference in New Issue