diff options
author | Patrick Steinhardt <psteinhardt@gitlab.com> | 2021-11-23 11:00:21 +0300 |
---|---|---|
committer | Patrick Steinhardt <psteinhardt@gitlab.com> | 2021-11-23 11:02:43 +0300 |
commit | 46bc7c87f72ea5789e59f5bcadf186fe8b756066 (patch) | |
tree | a7277128701efecc78f2cbefc62a9576a2d465e9 /.golangci.yml | |
parent | 801ae9638800452071dfda5542ab11cc046fcd8b (diff) |
lint: Convert stylecheck exclude to configuration
By default, stylecheck checks for missing package comments. Given that
we don't really use these, this of course generates a lot of linting
violations for us. Because of this, we have added an exclude rule to
just skip over those violations completely. Excludes aren't the correct
way to go about this, though: the stylecheck linter can be configured to
skip specific checks, which is what we should be doing instead.
Convert the exclude rule to stylecheck configuration.
Diffstat (limited to '.golangci.yml')
-rw-r--r-- | .golangci.yml | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/.golangci.yml b/.golangci.yml index 2c3d57ac4..584ba2bf9 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -41,6 +41,10 @@ linters-settings: include-go-root: true packages-with-error-message: - io/ioutil: "ioutil is deprecated starting with Go 1.16" + stylecheck: + # ST1000 checks for missing package comments. We don't use these for most + # packages, so let's disable this check. + checks: [ "all", "-ST1000" ] issues: exclude-use-default: false @@ -84,9 +88,6 @@ issues: - errcheck path: "internal/command/command.go" text: "Error return value of `syscall.Kill` is not checked" - - linters: - - stylecheck - text: "at least one file in a package should have a package comment" # Maximum issues count per one linter. Set to 0 to disable. Default is 50. max-issues-per-linter: 0 # Maximum count of issues with the same text. Set to 0 to disable. Default is 3. |