mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-03-04 17:46:36 +00:00
Add linting
This commit is contained in:
committed by
Calle Pettersson
parent
2053dea3ac
commit
76ddad34b8
9
Makefile
9
Makefile
@@ -1,14 +1,17 @@
|
|||||||
export GOOS=windows
|
export GOOS=windows
|
||||||
|
|
||||||
fmt:
|
|
||||||
gofmt -l -w -s .
|
|
||||||
|
|
||||||
build:
|
build:
|
||||||
promu build -v
|
promu build -v
|
||||||
|
|
||||||
test:
|
test:
|
||||||
go test -v ./...
|
go test -v ./...
|
||||||
|
|
||||||
|
lint:
|
||||||
|
gometalinter --vendor --config gometalinter.config ./...
|
||||||
|
|
||||||
|
fmt:
|
||||||
|
gofmt -l -w -s .
|
||||||
|
|
||||||
crossbuild:
|
crossbuild:
|
||||||
# The prometheus/golang-builder image for promu crossbuild doesn't exist
|
# The prometheus/golang-builder image for promu crossbuild doesn't exist
|
||||||
# on Windows, so for now, we'll just build twice
|
# 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:
|
install:
|
||||||
- set PATH=%GOPATH%\bin;%PATH%
|
- set PATH=%GOPATH%\bin;%PATH%
|
||||||
- go get -u github.com/prometheus/promu
|
- go get -u github.com/prometheus/promu
|
||||||
|
- go get -u github.com/alecthomas/gometalinter && gometalinter --install
|
||||||
- choco install gitversion.portable make -y
|
- choco install gitversion.portable make -y
|
||||||
|
|
||||||
test_script:
|
test_script:
|
||||||
- make test
|
- make test
|
||||||
|
|
||||||
|
after_test:
|
||||||
|
- make lint
|
||||||
|
|
||||||
build_script:
|
build_script:
|
||||||
- ps: |
|
- ps: |
|
||||||
$ErrorActionPreference = "Stop"
|
$ErrorActionPreference = "Stop"
|
||||||
|
|||||||
1
gometalinter.config
Normal file
1
gometalinter.config
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{}
|
||||||
Reference in New Issue
Block a user