mirror of
https://github.com/prometheus/node_exporter.git
synced 2024-12-26 22:19:44 -08:00
Enable golint (#1623)
* Enable golint in golangci-lint tests. * Fix up minor linting issues. Signed-off-by: Ben Kochie <superq@gmail.com>
This commit is contained in:
parent
ef7c05816a
commit
a7c31ff7ed
|
@ -1,6 +1,10 @@
|
||||||
run:
|
run:
|
||||||
modules-download-mode: vendor
|
modules-download-mode: vendor
|
||||||
|
|
||||||
|
linters:
|
||||||
|
enable:
|
||||||
|
- golint
|
||||||
|
|
||||||
issues:
|
issues:
|
||||||
exclude-rules:
|
exclude-rules:
|
||||||
- path: _test.go
|
- path: _test.go
|
||||||
|
|
|
@ -213,13 +213,13 @@ func TestConfigReloading(t *testing.T) {
|
||||||
|
|
||||||
err := TestClientConnection()
|
err := TestClientConnection()
|
||||||
if err == nil {
|
if err == nil {
|
||||||
recordConnectionError(errors.New("Connection accepted but should have failed."))
|
recordConnectionError(errors.New("connection accepted but should have failed"))
|
||||||
} else {
|
} else {
|
||||||
swapFileContents(goodYAMLPath, badYAMLPath)
|
swapFileContents(goodYAMLPath, badYAMLPath)
|
||||||
defer swapFileContents(goodYAMLPath, badYAMLPath)
|
defer swapFileContents(goodYAMLPath, badYAMLPath)
|
||||||
err = TestClientConnection()
|
err = TestClientConnection()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
recordConnectionError(errors.New("Connection failed but should have been accepted."))
|
recordConnectionError(errors.New("connection failed but should have been accepted"))
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
recordConnectionError(nil)
|
recordConnectionError(nil)
|
||||||
|
|
Loading…
Reference in a new issue