Skip to content

Commit

Permalink
Using ExcludeRulesProcessor
Browse files Browse the repository at this point in the history
Signed-off-by: Maciej "Iwan" Iwanowski <[email protected]>
  • Loading branch information
iwankgb committed Apr 23, 2020
1 parent 0513849 commit d7772f5
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion pkg/lint/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,12 @@ func NewRunner(cfg *config.Config, log logutils.Log, goenv *goutil.Env,
Linters: r.Linters,
})
}
var excludeRulesProcessor processors.Processor
if cfg.Issues.ExcludeCaseSensitive {
excludeRulesProcessor = processors.NewExcludeRulesCaseSensitive(excludeRules, lineCache, log.Child("exclude_rules"))
} else {
excludeRulesProcessor = processors.NewExcludeRules(excludeRules, lineCache, log.Child("exclude_rules"))
}

return &Runner{
Processors: []processors.Processor{
Expand All @@ -89,7 +95,7 @@ func NewRunner(cfg *config.Config, log logutils.Log, goenv *goutil.Env,
processors.NewIdentifierMarker(),

excludeProcessor,
processors.NewExcludeRules(excludeRules, lineCache, log.Child("exclude_rules")),
excludeRulesProcessor,
processors.NewNolint(log.Child("nolint"), dbManager),

processors.NewUniqByLine(cfg),
Expand Down

0 comments on commit d7772f5

Please sign in to comment.