mirror of
https://github.com/prometheus/node_exporter.git
synced 2024-11-09 23:24:09 -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:
|
||||
modules-download-mode: vendor
|
||||
|
||||
linters:
|
||||
enable:
|
||||
- golint
|
||||
|
||||
issues:
|
||||
exclude-rules:
|
||||
- path: _test.go
|
||||
|
|
|
@ -213,13 +213,13 @@ func TestConfigReloading(t *testing.T) {
|
|||
|
||||
err := TestClientConnection()
|
||||
if err == nil {
|
||||
recordConnectionError(errors.New("Connection accepted but should have failed."))
|
||||
recordConnectionError(errors.New("connection accepted but should have failed"))
|
||||
} else {
|
||||
swapFileContents(goodYAMLPath, badYAMLPath)
|
||||
defer swapFileContents(goodYAMLPath, badYAMLPath)
|
||||
err = TestClientConnection()
|
||||
if err != nil {
|
||||
recordConnectionError(errors.New("Connection failed but should have been accepted."))
|
||||
recordConnectionError(errors.New("connection failed but should have been accepted"))
|
||||
} else {
|
||||
|
||||
recordConnectionError(nil)
|
||||
|
|
Loading…
Reference in a new issue