Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
.golangci.yml: invert linter selection (
enable-all: true
+ disable
)
See #29 (comment) The idea is that this approach should be easier to maintain in the long run. CI will still be reproducible because we declare a specific `golangci-lint` version in `.github/workflows/go.yml` (`version: v1.58` at the moment), so we'll get a constant set of linters as long as the `golangci-lint` version stays the same. But at the same time, when we bump this `golangci-lint` version, we'll get all the new linters by default without having to change the `.golangci.yml` configuration. In contrast, with the existing `disable-all: true` + `enable` approach, we're not using any of the new linters until we manually review the latest list of linters that `golangci-lint` supports and update `.golangci.yml` accordingly (which is tedious). Until that is done, we're probably missing out on some useful linters that could find other issues in our code. Of course, it's possible that we won't find all new linters useful, but we can simply check the `golangci-lint` output after bumping its version, see which linters we don't care about and then update the `disable` list accordingly.
- Loading branch information