Skip to content

dev: add missing mapstructure tags #5436

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions pkg/config/base_rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import (
)

type BaseRule struct {
Linters []string
Path string
PathExcept string `mapstructure:"path-except"`
Text string
Source string
Linters []string `mapstructure:"linters"`
Path string `mapstructure:"path"`
PathExcept string `mapstructure:"path-except"`
Text string `mapstructure:"text"`
Source string `mapstructure:"source"`

// For compatibility with exclude-use-default/include.
InternalReference string `mapstructure:"-"`
Expand Down
6 changes: 3 additions & 3 deletions pkg/config/formatters_settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ type GciSettings struct {
}

type GoFmtSettings struct {
Simplify bool
Simplify bool `mapstructure:"simplify"`
RewriteRules []GoFmtRewriteRule `mapstructure:"rewrite-rules"`
}

type GoFmtRewriteRule struct {
Pattern string
Replacement string
Pattern string `mapstructure:"pattern"`
Replacement string `mapstructure:"replacement"`
}

type GoFumptSettings struct {
Expand Down
12 changes: 6 additions & 6 deletions pkg/config/linters.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ import (
)

type Linters struct {
Enable []string
Disable []string
EnableAll bool `mapstructure:"enable-all"`
DisableAll bool `mapstructure:"disable-all"`
Fast bool
Enable []string `mapstructure:"enable"`
Disable []string `mapstructure:"disable"`
EnableAll bool `mapstructure:"enable-all"`
DisableAll bool `mapstructure:"disable-all"`
Fast bool `mapstructure:"fast"`

Presets []string
Presets []string `mapstructure:"presets"`

LinterExclusions LinterExclusions `mapstructure:"exclusions"`
}
Expand Down
Loading
Loading