From 3bf09981a76a04000e812fec2b30e74d948f40b8 Mon Sep 17 00:00:00 2001 From: Sven Greb Date: Sun, 21 Nov 2021 12:11:03 +0100 Subject: [PATCH] Disable `golangci-lint`'s default excluded issues By default golangci-lint [2] excludes specific issues (matches) that are known to be "annoying", but this also included issues explicitly enabled by this template, e.g. the revive [3] rule to check that exported function and methods always have a comment [4]. To prevent these issues to be found the default excludes have been disabled through the `issues.exclude-use-default` configuration field. [1]: https://golangci-lint.run/usage/configuration/#config-file [2]: https://golangci-lint.run [3]: https://github.com/mgechev/revive [4]: https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#exported GH-72 --- .golangci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.golangci.yml b/.golangci.yml index a0ac2f1..d127ad7 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -5,6 +5,9 @@ # See https://golangci-lint.run/usage/configuration for more details. issues: + # Prevent linter rules/issues, that are explicitly enabled by this configuration, to be ignored due to golangci-lint's + # set of issues that are ignored by default. + exclude-use-default: false exclude-rules: # Prevent issues on `go generate` command directive lines. - linters: