diff options
author | Ben Kochie <superq@gmail.com> | 2020-02-27 11:59:02 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-27 11:59:02 +0100 |
commit | a7c31ff7ed0990545ed4cc62690fc53563ee8860 (patch) | |
tree | 79d5a7cab59cf8e1c5d2ebd2a60bd8a4c22b2c2c | |
parent | ef7c05816adcb0e8923defe34e97f6afcce0a939 (diff) | |
download | prometheus_node_collector-a7c31ff7ed0990545ed4cc62690fc53563ee8860.tar.bz2 prometheus_node_collector-a7c31ff7ed0990545ed4cc62690fc53563ee8860.tar.xz prometheus_node_collector-a7c31ff7ed0990545ed4cc62690fc53563ee8860.zip |
Enable golint (#1623)
* Enable golint in golangci-lint tests.
* Fix up minor linting issues.
Signed-off-by: Ben Kochie <superq@gmail.com>
-rw-r--r-- | .golangci.yml | 4 | ||||
-rw-r--r-- | https/tls_config_test.go | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/.golangci.yml b/.golangci.yml index b421c1f..c53f64c 100644 --- a/.golangci.yml +++ b/.golangci.yml | |||
@@ -1,6 +1,10 @@ | |||
1 | run: | 1 | run: |
2 | modules-download-mode: vendor | 2 | modules-download-mode: vendor |
3 | 3 | ||
4 | linters: | ||
5 | enable: | ||
6 | - golint | ||
7 | |||
4 | issues: | 8 | issues: |
5 | exclude-rules: | 9 | exclude-rules: |
6 | - path: _test.go | 10 | - path: _test.go |
diff --git a/https/tls_config_test.go b/https/tls_config_test.go index 717f201..4b1b4e0 100644 --- a/https/tls_config_test.go +++ b/https/tls_config_test.go | |||
@@ -213,13 +213,13 @@ func TestConfigReloading(t *testing.T) { | |||
213 | 213 | ||
214 | err := TestClientConnection() | 214 | err := TestClientConnection() |
215 | if err == nil { | 215 | if err == nil { |
216 | recordConnectionError(errors.New("Connection accepted but should have failed.")) | 216 | recordConnectionError(errors.New("connection accepted but should have failed")) |
217 | } else { | 217 | } else { |
218 | swapFileContents(goodYAMLPath, badYAMLPath) | 218 | swapFileContents(goodYAMLPath, badYAMLPath) |
219 | defer swapFileContents(goodYAMLPath, badYAMLPath) | 219 | defer swapFileContents(goodYAMLPath, badYAMLPath) |
220 | err = TestClientConnection() | 220 | err = TestClientConnection() |
221 | if err != nil { | 221 | if err != nil { |
222 | recordConnectionError(errors.New("Connection failed but should have been accepted.")) | 222 | recordConnectionError(errors.New("connection failed but should have been accepted")) |
223 | } else { | 223 | } else { |
224 | 224 | ||
225 | recordConnectionError(nil) | 225 | recordConnectionError(nil) |