Skip to content

Commit

Permalink
Ignore exported
Browse files Browse the repository at this point in the history
Assume disabled by default
  • Loading branch information
Sebastian Spaink committed Feb 11, 2021
1 parent a35a96f commit f0dd9bc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ linters:
# - nestif
# - prealloc
# - testpackage
# - revive
# - wsl

issues:
Expand Down
4 changes: 4 additions & 0 deletions pkg/golinters/revive.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,10 @@ func SetReviveConfig(cfg *config.ReviveSettings) (*lint.Config, error) {
conf.Confidence = cfg.Confidence
}

// By default golangci-lint ignores missing doc comments, follow same convention by removing this default rule
// Relevant issue: https://github.com/golangci/golangci-lint/issues/456
delete(conf.Rules, "exported")

if len(cfg.Rules) != 0 {
// Clear default rules, only use rules defined in config
conf.Rules = map[string]lint.RuleConfig{}
Expand Down

0 comments on commit f0dd9bc

Please sign in to comment.