@@ -79,10 +79,12 @@ func NewRunner(log logutils.Log, cfg *config.Config, args []string, goenv *gouti
79
79
// Must be after FilenameUnadjuster.
80
80
processors .NewInvalidIssue (log .Child (logutils .DebugKeyInvalidIssue )),
81
81
82
- // Must be before diff, nolint and exclude autogenerated processor at least.
82
+ // Must be before Diff, SkipFiles, SkipDirs, ExcludeRules processors at least.
83
83
processors .NewPathPrettifier (log ),
84
+
85
+ // must be after PathPrettifier.
84
86
skipFilesProcessor ,
85
- skipDirsProcessor , // must be after path prettifier
87
+ skipDirsProcessor ,
86
88
87
89
processors .NewAutogeneratedExclude (cfg .Issues .ExcludeGenerated ),
88
90
@@ -94,20 +96,21 @@ func NewRunner(log logutils.Log, cfg *config.Config, args []string, goenv *gouti
94
96
95
97
processors .NewNolint (log .Child (logutils .DebugKeyNolint ), dbManager , enabledLinters ),
96
98
97
- processors .NewUniqByLine (cfg ),
98
99
processors .NewDiff (& cfg .Issues ),
100
+
101
+ // The fixer still needs to see paths for the issues that are relative to the current directory.
102
+ processors .NewFixer (cfg , log , fileCache , metaFormatter ),
103
+
104
+ // Must be after the Fixer.
105
+ processors .NewUniqByLine (cfg ),
99
106
processors .NewMaxPerFileFromLinter (cfg ),
100
107
processors .NewMaxSameIssues (cfg .Issues .MaxSameIssues , log .Child (logutils .DebugKeyMaxSameIssues ), cfg ),
101
108
processors .NewMaxFromLinter (cfg .Issues .MaxIssuesPerLinter , log .Child (logutils .DebugKeyMaxFromLinter ), cfg ),
102
109
110
+ // Now we can modify the issues for output.
103
111
processors .NewSourceCode (lineCache , log .Child (logutils .DebugKeySourceCode )),
104
112
processors .NewPathShortener (),
105
113
processors .NewSeverity (log .Child (logutils .DebugKeySeverityRules ), files , & cfg .Severity ),
106
-
107
- // The fixer still needs to see paths for the issues that are relative to the current directory.
108
- processors .NewFixer (cfg , log , fileCache , metaFormatter ),
109
-
110
- // Now we can modify the issues for output.
111
114
processors .NewPathPrefixer (cfg .Output .PathPrefix ),
112
115
processors .NewSortResults (cfg ),
113
116
},
0 commit comments