Skip to content

Commit

Permalink
chore: re-organize options
Browse files Browse the repository at this point in the history
  • Loading branch information
ldez committed Mar 19, 2024
1 parent 9c1c57b commit 5afab67
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 32 deletions.
60 changes: 30 additions & 30 deletions .golangci.next.reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1074,36 +1074,6 @@ linters-settings:
- Katakana

govet:
# Settings per analyzer.
settings:
# Analyzer name, run `go tool vet help` to see all analyzers.
printf:
# Comma-separated list of print function names to check (in addition to default, see `go tool vet help printf`).
# Default: []
funcs:
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Infof
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Warnf
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Errorf
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Fatalf
shadow:
# Whether to be strict about shadowing; can be noisy.
# Default: false
strict: true
unusedresult:
# Comma-separated list of functions whose results must be used
# (in addition to default:
# context.WithCancel, context.WithDeadline, context.WithTimeout, context.WithValue, errors.New, fmt.Errorf,
# fmt.Sprint, fmt.Sprintf, sort.Reverse
# ).
# Default: []
funcs:
- pkg.MyFunc
# Comma-separated list of names of methods of type func() string whose results must be used
# (in addition to default Error,String)
# Default: []
stringmethods:
- MyMethod

# Disable all analyzers.
# Default: false
disable-all: true
Expand Down Expand Up @@ -1210,6 +1180,36 @@ linters-settings:
- unusedresult
- unusedwrite

# Settings per analyzer.
settings:
# Analyzer name, run `go tool vet help` to see all analyzers.
printf:
# Comma-separated list of print function names to check (in addition to default, see `go tool vet help printf`).
# Default: []
funcs:
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Infof
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Warnf
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Errorf
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Fatalf
shadow:
# Whether to be strict about shadowing; can be noisy.
# Default: false
strict: true
unusedresult:
# Comma-separated list of functions whose results must be used
# (in addition to default:
# context.WithCancel, context.WithDeadline, context.WithTimeout, context.WithValue, errors.New, fmt.Errorf,
# fmt.Sprint, fmt.Sprintf, sort.Reverse
# ).
# Default: []
funcs:
- pkg.MyFunc
# Comma-separated list of names of methods of type func() string whose results must be used
# (in addition to default Error,String)
# Default: []
stringmethods:
- MyMethod

grouper:
# Require the use of a single global 'const' declaration only.
# Default: false
Expand Down
5 changes: 3 additions & 2 deletions pkg/config/linters_settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -598,14 +598,15 @@ type GosmopolitanSettings struct {
}

type GovetSettings struct {
Go string `mapstructure:"-"`
Settings map[string]map[string]any
Go string `mapstructure:"-"`

Enable []string
Disable []string
EnableAll bool `mapstructure:"enable-all"`
DisableAll bool `mapstructure:"disable-all"`

Settings map[string]map[string]any

// Deprecated: the linter should be enabled inside `Enable`.
CheckShadowing bool `mapstructure:"check-shadowing"`
}
Expand Down

0 comments on commit 5afab67

Please sign in to comment.