Skip to content

Commit

Permalink
Update golangci-lint config (prometheus#2722)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
SuperQ authored and oblitorum committed Apr 9, 2024
1 parent 1d9de10 commit a89d287
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 22 deletions.
11 changes: 0 additions & 11 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,6 @@ jobs:
- checkout
- run: uname -a
- 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:
executor: golang
steps:
Expand Down Expand Up @@ -105,10 +98,6 @@ workflows:
filters:
tags:
only: /.*/
- codespell:
filters:
tags:
only: /.*/
- test_docker:
requires:
- test
Expand Down
7 changes: 6 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
linters:
enable:
- misspell
- revive
disable:
# Disable soon to deprecated[1] linters that lead to false
Expand All @@ -19,4 +20,8 @@ issues:

linters-settings:
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
6 changes: 0 additions & 6 deletions scripts/codespell_ignore.txt

This file was deleted.

4 changes: 0 additions & 4 deletions scripts/errcheck_excludes.txt

This file was deleted.

0 comments on commit a89d287

Please sign in to comment.