forked from prometheus/snmp_exporter
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Enable more golangci-lint checks. * Cleanup various linter issues. Signed-off-by: SuperQ <[email protected]> Signed-off-by: Stephan Windischmann <[email protected]>
- Loading branch information
Showing
4 changed files
with
39 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,28 @@ | ||
# Run only staticcheck for now. Additional linters will be enabled one-by-one. | ||
linters: | ||
enable: | ||
- staticcheck | ||
disable-all: true | ||
- misspell | ||
- revive | ||
disable: | ||
# Disable soon to deprecated[1] linters that lead to false | ||
# positives when build tags disable certain files[2] | ||
# 1: https://github.com/golangci/golangci-lint/issues/1841 | ||
# 2: https://github.com/prometheus/node_exporter/issues/1545 | ||
- deadcode | ||
- unused | ||
- structcheck | ||
- varcheck | ||
|
||
issues: | ||
exclude-rules: | ||
- path: _test.go | ||
linters: | ||
- errcheck | ||
- govet | ||
|
||
linters-settings: | ||
errcheck: | ||
exclude-functions: | ||
# Used in HTTP handlers, any error is handled by the server itself. | ||
- (net/http.ResponseWriter).Write | ||
# Never check for logger errors. | ||
- (github.com/go-kit/log.Logger).Log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters