Skip to content

Commit

Permalink
Disable golangci-lint's default excluded issues
Browse files Browse the repository at this point in the history
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
  • Loading branch information
svengreb committed Nov 21, 2021
1 parent 7758cfe commit 3bf0998
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 3bf0998

Please sign in to comment.