mirror of
https://github.com/prometheus/node_exporter.git
synced 2024-11-09 23:24:09 -08:00
Update golangci-lint config (#2722)
* Migrate from Python codespell to golangci-lint misspell. * Inline errcheck exclude list in the golangci-lint config. Signed-off-by: Ben Kochie <superq@gmail.com>
This commit is contained in:
parent
d1b634fb80
commit
a11de2ede5
|
@ -28,13 +28,6 @@ jobs:
|
||||||
- checkout
|
- checkout
|
||||||
- run: uname -a
|
- run: uname -a
|
||||||
- run: make test-e2e
|
- run: make test-e2e
|
||||||
codespell:
|
|
||||||
docker:
|
|
||||||
- image: circleci/python
|
|
||||||
steps:
|
|
||||||
- checkout
|
|
||||||
- run: sudo pip install codespell
|
|
||||||
- run: codespell --skip=".git,./vendor,ttar,go.mod,go.sum,*pem,./collector/fixtures" -I scripts/codespell_ignore.txt
|
|
||||||
test_mixins:
|
test_mixins:
|
||||||
executor: golang
|
executor: golang
|
||||||
steps:
|
steps:
|
||||||
|
@ -105,10 +98,6 @@ workflows:
|
||||||
filters:
|
filters:
|
||||||
tags:
|
tags:
|
||||||
only: /.*/
|
only: /.*/
|
||||||
- codespell:
|
|
||||||
filters:
|
|
||||||
tags:
|
|
||||||
only: /.*/
|
|
||||||
- test_docker:
|
- test_docker:
|
||||||
requires:
|
requires:
|
||||||
- test
|
- test
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
linters:
|
linters:
|
||||||
enable:
|
enable:
|
||||||
|
- misspell
|
||||||
- revive
|
- revive
|
||||||
disable:
|
disable:
|
||||||
# Disable soon to deprecated[1] linters that lead to false
|
# Disable soon to deprecated[1] linters that lead to false
|
||||||
|
@ -19,4 +20,8 @@ issues:
|
||||||
|
|
||||||
linters-settings:
|
linters-settings:
|
||||||
errcheck:
|
errcheck:
|
||||||
exclude: scripts/errcheck_excludes.txt
|
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
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
inflight
|
|
||||||
packages\'
|
|
||||||
ro
|
|
||||||
siz
|
|
||||||
uint
|
|
||||||
uptodate
|
|
|
@ -1,4 +0,0 @@
|
||||||
// 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
|
|
Loading…
Reference in a new issue