Skip to content

Commit 814361e

Browse files
authored
dev: add missing mapstructure tags (#5436)
1 parent feddadf commit 814361e

File tree

5 files changed

+137
-137
lines changed

5 files changed

+137
-137
lines changed

Diff for: pkg/config/base_rule.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ import (
77
)
88

99
type BaseRule struct {
10-
Linters []string
11-
Path string
12-
PathExcept string `mapstructure:"path-except"`
13-
Text string
14-
Source string
10+
Linters []string `mapstructure:"linters"`
11+
Path string `mapstructure:"path"`
12+
PathExcept string `mapstructure:"path-except"`
13+
Text string `mapstructure:"text"`
14+
Source string `mapstructure:"source"`
1515

1616
// For compatibility with exclude-use-default/include.
1717
InternalReference string `mapstructure:"-"`

Diff for: pkg/config/formatters_settings.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@ type GciSettings struct {
3737
}
3838

3939
type GoFmtSettings struct {
40-
Simplify bool
40+
Simplify bool `mapstructure:"simplify"`
4141
RewriteRules []GoFmtRewriteRule `mapstructure:"rewrite-rules"`
4242
}
4343

4444
type GoFmtRewriteRule struct {
45-
Pattern string
46-
Replacement string
45+
Pattern string `mapstructure:"pattern"`
46+
Replacement string `mapstructure:"replacement"`
4747
}
4848

4949
type GoFumptSettings struct {

Diff for: pkg/config/linters.go

+6-6
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ import (
66
)
77

88
type Linters struct {
9-
Enable []string
10-
Disable []string
11-
EnableAll bool `mapstructure:"enable-all"`
12-
DisableAll bool `mapstructure:"disable-all"`
13-
Fast bool
9+
Enable []string `mapstructure:"enable"`
10+
Disable []string `mapstructure:"disable"`
11+
EnableAll bool `mapstructure:"enable-all"`
12+
DisableAll bool `mapstructure:"disable-all"`
13+
Fast bool `mapstructure:"fast"`
1414

15-
Presets []string
15+
Presets []string `mapstructure:"presets"`
1616

1717
LinterExclusions LinterExclusions `mapstructure:"exclusions"`
1818
}

0 commit comments

Comments
 (0)