Skip to content

Commit 0be943d

Browse files
authored
docs: improve revive enable-default-rules explanations (#6199)
1 parent 3a04631 commit 0be943d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.golangci.next.reference.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2383,8 +2383,8 @@ linters:
23832383
enable-all-rules: true
23842384

23852385
# By default, the default rules are enabled,
2386-
# but if you provide a custom configuration, the default rules will be disabled.
2387-
# This option allows you to not explicitly enable the default rules.
2386+
# but if you explicitly define or configure a rule, the default rules will be disabled.
2387+
# This option, when set to `true`, allows you to avoid explicitly redefining default rules when adding a rule.
23882388
# Default: false
23892389
enable-default-rules: true
23902390

@@ -2400,7 +2400,7 @@ linters:
24002400
confidence: 0.1
24012401
# Revive handles the default rules in a way that can be unexpected:
24022402
# - If there are no explicit rules, the default rules are used.
2403-
# - If there is at least one explicit rule, the default rules are not used.
2403+
# - If there is at least one explicit rule, the default rules are not used, unless `enable-default-rules` is `true`.
24042404
# Run `GL_DEBUG=revive golangci-lint run --enable-only=revive` to see default, all available rules, and enabled rules.
24052405
rules:
24062406
# https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#add-constant

0 commit comments

Comments
 (0)