Skip to content

Commit 5d625d7

Browse files
committed
chore: re-organize options
1 parent 3c67e40 commit 5d625d7

File tree

2 files changed

+33
-32
lines changed

2 files changed

+33
-32
lines changed

.golangci.next.reference.yml

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1074,36 +1074,6 @@ linters-settings:
10741074
- Katakana
10751075

10761076
govet:
1077-
# Settings per analyzer.
1078-
settings:
1079-
# Analyzer name, run `go tool vet help` to see all analyzers.
1080-
printf:
1081-
# Comma-separated list of print function names to check (in addition to default, see `go tool vet help printf`).
1082-
# Default: []
1083-
funcs:
1084-
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Infof
1085-
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Warnf
1086-
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Errorf
1087-
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Fatalf
1088-
shadow:
1089-
# Whether to be strict about shadowing; can be noisy.
1090-
# Default: false
1091-
strict: true
1092-
unusedresult:
1093-
# Comma-separated list of functions whose results must be used
1094-
# (in addition to default:
1095-
# context.WithCancel, context.WithDeadline, context.WithTimeout, context.WithValue, errors.New, fmt.Errorf,
1096-
# fmt.Sprint, fmt.Sprintf, sort.Reverse
1097-
# ).
1098-
# Default: []
1099-
funcs:
1100-
- pkg.MyFunc
1101-
# Comma-separated list of names of methods of type func() string whose results must be used
1102-
# (in addition to default Error,String)
1103-
# Default: []
1104-
stringmethods:
1105-
- MyMethod
1106-
11071077
# Disable all analyzers.
11081078
# Default: false
11091079
disable-all: true
@@ -1210,6 +1180,36 @@ linters-settings:
12101180
- unusedresult
12111181
- unusedwrite
12121182

1183+
# Settings per analyzer.
1184+
settings:
1185+
# Analyzer name, run `go tool vet help` to see all analyzers.
1186+
printf:
1187+
# Comma-separated list of print function names to check (in addition to default, see `go tool vet help printf`).
1188+
# Default: []
1189+
funcs:
1190+
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Infof
1191+
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Warnf
1192+
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Errorf
1193+
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Fatalf
1194+
shadow:
1195+
# Whether to be strict about shadowing; can be noisy.
1196+
# Default: false
1197+
strict: true
1198+
unusedresult:
1199+
# Comma-separated list of functions whose results must be used
1200+
# (in addition to default:
1201+
# context.WithCancel, context.WithDeadline, context.WithTimeout, context.WithValue, errors.New, fmt.Errorf,
1202+
# fmt.Sprint, fmt.Sprintf, sort.Reverse
1203+
# ).
1204+
# Default: []
1205+
funcs:
1206+
- pkg.MyFunc
1207+
# Comma-separated list of names of methods of type func() string whose results must be used
1208+
# (in addition to default Error,String)
1209+
# Default: []
1210+
stringmethods:
1211+
- MyMethod
1212+
12131213
grouper:
12141214
# Require the use of a single global 'const' declaration only.
12151215
# Default: false

pkg/config/linters_settings.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -598,14 +598,15 @@ type GosmopolitanSettings struct {
598598
}
599599

600600
type GovetSettings struct {
601-
Go string `mapstructure:"-"`
602-
Settings map[string]map[string]any
601+
Go string `mapstructure:"-"`
603602

604603
Enable []string
605604
Disable []string
606605
EnableAll bool `mapstructure:"enable-all"`
607606
DisableAll bool `mapstructure:"disable-all"`
608607

608+
Settings map[string]map[string]any
609+
609610
// Deprecated: the linter should be enabled inside `Enable`.
610611
CheckShadowing bool `mapstructure:"check-shadowing"`
611612
}

0 commit comments

Comments
 (0)