-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: re-enable linters, use presets
- Loading branch information
Showing
181 changed files
with
536 additions
and
412 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,86 +1,40 @@ | ||
--- | ||
linters: | ||
presets: | ||
- bugs | ||
- error | ||
- import | ||
- metalinter | ||
- module | ||
- unused | ||
|
||
enable: | ||
- testifylint | ||
|
||
disable: | ||
# preset error | ||
- err113 # Very annoying to define static errors everywhere | ||
- wrapcheck # Very annoying to wrap errors everywhere | ||
# preset import | ||
- depguard | ||
|
||
linters-settings: | ||
gci: | ||
sections: | ||
- standard | ||
- default | ||
- prefix(github.com/hetznercloud) | ||
|
||
gosec: | ||
excludes: | ||
# As of golangci-lint v1.60.3, this rule is still enabled by default, which causes problems. | ||
# We disable it manually for now until a new golangci-lint version is released which fixes this. | ||
# See https://github.com/securego/gosec/issues/1185 | ||
- G115 | ||
|
||
exhaustive: | ||
# Switch cases with a default case should be exhaustive. | ||
default-signifies-exhaustive: true | ||
gomodguard: | ||
blocked: | ||
modules: | ||
- github.com/tj/assert: | ||
recommendations: | ||
- github.com/stretchr/testify/assert | ||
reason: | | ||
One assertion library is enough and we use testify/assert | ||
everywhere. | ||
- gotest.tools/assert: | ||
recommendations: | ||
- github.com/stretchr/testify/assert | ||
reason: | | ||
One assertion library is enough and we use testify/assert | ||
everywhere. | ||
- github.com/magiconair/properties: | ||
recommendations: | ||
- github.com/stretchr/testify/assert | ||
reason: > | ||
We do not currently need to parse properties files. At the same | ||
time this module has an assert package which tends to get | ||
imported by accident. It is therefore blocked. | ||
- github.com/gogo/protobuf: | ||
recommendations: | ||
- google.golang.org/protobuf | ||
reason: > | ||
This is not the protobuf module that we want to import. | ||
- github.com/golang/protobuf: | ||
recommendations: | ||
- google.golang.org/protobuf | ||
reason: > | ||
This is the legacy import location of Google's protobuf module. | ||
Use the new one instead. | ||
misspell: | ||
locale: "US" | ||
revive: | ||
exported: true | ||
import-shadowing: true | ||
indent-error-flow: true | ||
|
||
linters: | ||
disable-all: true | ||
# Some of these are temporarily disabled until we fix the numerous issues we have. | ||
enable: | ||
- bodyclose | ||
# - dupl | ||
- errcheck | ||
- exhaustive | ||
- gocritic | ||
# - golint | ||
- gci | ||
- gomodguard | ||
- gosec | ||
- gosimple | ||
- govet | ||
- ineffassign | ||
- misspell | ||
- revive | ||
- rowserrcheck | ||
# - scopelint | ||
# - staticcheck | ||
- typecheck | ||
- unparam | ||
- unused | ||
- whitespace | ||
|
||
issues: | ||
include: | ||
- EXC0002 # disable excluding of issues about comments from golint | ||
exclude-rules: | ||
- path: _test\.go | ||
linters: | ||
- dupl | ||
- gosec | ||
- linters: | ||
- gosec | ||
text: "G204:" | ||
gosmopolitan: | ||
# We want to allow the use of time.Local() | ||
allow-time-local: true |
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
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
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
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
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
Oops, something went wrong.