diff options
author | Will Chandler <wchandler@gitlab.com> | 2022-09-30 21:40:24 +0300 |
---|---|---|
committer | Will Chandler <wchandler@gitlab.com> | 2022-09-30 23:09:00 +0300 |
commit | 76563783e6c7468a43397e0de5849ce7e534da78 (patch) | |
tree | 8c210a808b208af68f227ee8969f317c4be7f3fd /.golangci.yml | |
parent | 4c15523cf680c107c5aa2b8268674cd0345a6b78 (diff) |
golangci-lint: Restore default revive lintswc/fix-revive-lints
With 7e87131ed (golangci-lint: Allow `testing.T` as first parameter,
2022-08-10) we set `context-as-argument` the sole argument to
`revive:rules`. This causes golangci-lint to disable all revive lints
that were previously enabled by default.
Re-enable the default revive lints by explicitly listing them in our
config. This triggers a large number of lint errors, resolve these as
well in this commit.
Diffstat (limited to '.golangci.yml')
-rw-r--r-- | .golangci.yml | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/.golangci.yml b/.golangci.yml index f97d22a09..d6dd53f25 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -85,11 +85,37 @@ linters-settings: - ^os.Setenv$ - ^os.Unsetenv$ revive: + # Specifying any rule explicitly will disable the default-enabled rules. + # Manually specify the defaults along with `context-as-argument`. rules: + - name: blank-imports + disabled: false - name: context-as-argument arguments: # The context should always be first, except in our testing packages. allowTypesBefore: "*testing.T,*testing.B,testing.TB" + - name: dot-imports + disabled: false + - name: error-naming + disabled: false + - name: error-return + disabled: false + - name: error-strings + disabled: false + - name: exported + disabled: false + - name: increment-decrement + disabled: false + - name: indent-error-flow + disabled: false + - name: package-comments + disabled: false + - name: receiver-naming + disabled: false + - name: range + disabled: false + - name: var-naming + disabled: false stylecheck: # ST1000 checks for missing package comments. We don't use these for most # packages, so let's disable this check. |