diff options
author | Patrick Steinhardt <psteinhardt@gitlab.com> | 2021-11-23 10:45:49 +0300 |
---|---|---|
committer | Patrick Steinhardt <psteinhardt@gitlab.com> | 2021-11-24 09:45:13 +0300 |
commit | 90b8c521e308d56bf6e307064c3339bf62e151f1 (patch) | |
tree | a55f78fcf3e24b7557f5722aaa4b34be14370f15 /.golangci.yml | |
parent | 1dcc934bcbe0f712306913a5a3d7963d77ae2e70 (diff) |
lint: Enable gofmt linter to fix missing simplification lints
While gofumpt will by default check for possible code simplifications
when run directly, its corresponding linter for golangci-lint doesn't
seem to do so. As a result, linting may not complain about misformatted
code while running the formatter would still perform reformatting.
Fix this by using both `gofmt` and `gofumpt` linters: `gofmt` by default
has simplifications enabled, and `gofumpt` will verify the extra rules
which are on top of `gofmt`.
Diffstat (limited to '.golangci.yml')
-rw-r--r-- | .golangci.yml | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/.golangci.yml b/.golangci.yml index 584ba2bf9..efb740563 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -14,6 +14,9 @@ linters: - exportloopref - depguard - gci + # We use both gofmt and gofumpt because gofumpt doesn't seem to be linting + # for simplifications, while gofmt does. + - gofmt - gofumpt - goimports - gosimple |