Skip to content

Commit edc3e5f

Browse files
author
Sebastian Spaink
committed
Ignore exported
Assume disabled by default
1 parent a8a1362 commit edc3e5f

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

.golangci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ linters:
117117
# - nestif
118118
# - prealloc
119119
# - testpackage
120+
# - revive
120121
# - wsl
121122

122123
issues:

pkg/golinters/revive.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,10 @@ func SetReviveConfig(cfg *config.ReviveSettings) (*lint.Config, error) {
160160
conf.Confidence = cfg.Confidence
161161
}
162162

163+
// By default golangci-lint ignores missing doc comments, follow same convention by removing this default rule
164+
// Relevant issue: https://github.com/golangci/golangci-lint/issues/456
165+
delete(conf.Rules, "exported")
166+
163167
if len(cfg.Rules) != 0 {
164168
// Clear default rules, only use rules defined in config
165169
conf.Rules = map[string]lint.RuleConfig{}

0 commit comments

Comments
 (0)