File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed
Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -17,17 +17,13 @@ type baseRule struct {
1717 path * regexp.Regexp
1818 pathExcept * regexp.Regexp
1919 linters []string
20-
21- // For compatibility with exclude-use-default/include.
22- internalReference string `mapstructure:"-"`
2320}
2421
2522// The usage of `regexp.MustCompile()` is safe here,
2623// because the regular expressions are checked before inside [config.BaseRule.Validate].
2724func newBaseRule (rule * config.BaseRule , prefix string ) baseRule {
2825 base := baseRule {
29- linters : rule .Linters ,
30- internalReference : rule .InternalReference ,
26+ linters : rule .Linters ,
3127 }
3228
3329 if rule .Text != "" {
Original file line number Diff line number Diff line change @@ -109,10 +109,16 @@ func (p *ExclusionRules) Finish() {
109109
110110type excludeRule struct {
111111 baseRule
112+
113+ // For compatibility with exclude-use-default/include.
114+ internalReference string `mapstructure:"-"`
112115}
113116
114117func newExcludeRule (rule * config.ExcludeRule , prefix string ) excludeRule {
115- return excludeRule {baseRule : newBaseRule (& rule .BaseRule , prefix )}
118+ return excludeRule {
119+ baseRule : newBaseRule (& rule .BaseRule , prefix ),
120+ internalReference : rule .InternalReference ,
121+ }
116122}
117123
118124func (e excludeRule ) String () string {
You can’t perform that action at this time.
0 commit comments