Skip to content

Commit 8bb31d1

Browse files
committed
ci: enable checks for missing Go documentation
Checks for missing Go documentation used to be covered by the now defunct project `golint`. Revive is a replacement for golint that is used by `golangci-lint`. However, `golangci-lint` disables checks for missing Go documentation by default[0]. The only way to re-enable them is apparently to suppress golangci-lint's default rules, which is what this commit does. Rules that triggered false-positive on this codebase have been manually added. The list of default exclude rules can be found by running `golangci-lint run --help`. [0]: golangci/golangci-lint#456 Signed-off-by: Robin Hahling <[email protected]>
1 parent 1c7f472 commit 8bb31d1

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

.golangci.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,13 @@ linters-settings:
3434
go: "1.16"
3535

3636
issues:
37+
# Default rules exclude Go doc comments check, which is rather unfortunate.
38+
# In order to enable Go doc checks, defaults rules have to be disabled.
39+
# See https://github.com/golangci/golangci-lint/issues/456 for details.
40+
exclude-use-default: false
41+
exclude:
42+
- (G104|G307) # EXC0008 gosec: Duplicated errcheck checks
43+
3744
exclude-rules:
3845
- linters: [staticcheck]
3946
text: "SA1019" # deprecated methods

0 commit comments

Comments
 (0)