@@ -79,10 +79,12 @@ func NewRunner(log logutils.Log, cfg *config.Config, args []string, goenv *gouti
7979 // Must be after FilenameUnadjuster.
8080 processors .NewInvalidIssue (log .Child (logutils .DebugKeyInvalidIssue )),
8181
82- // Must be before diff, nolint and exclude autogenerated processor at least.
82+ // Must be before Diff, SkipFiles, SkipDirs, ExcludeRules processors at least.
8383 processors .NewPathPrettifier (log ),
84+
85+ // must be after PathPrettifier.
8486 skipFilesProcessor ,
85- skipDirsProcessor , // must be after path prettifier
87+ skipDirsProcessor ,
8688
8789 processors .NewAutogeneratedExclude (cfg .Issues .ExcludeGenerated ),
8890
@@ -94,20 +96,21 @@ func NewRunner(log logutils.Log, cfg *config.Config, args []string, goenv *gouti
9496
9597 processors .NewNolint (log .Child (logutils .DebugKeyNolint ), dbManager , enabledLinters ),
9698
97- processors .NewUniqByLine (cfg ),
9899 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 ),
99106 processors .NewMaxPerFileFromLinter (cfg ),
100107 processors .NewMaxSameIssues (cfg .Issues .MaxSameIssues , log .Child (logutils .DebugKeyMaxSameIssues ), cfg ),
101108 processors .NewMaxFromLinter (cfg .Issues .MaxIssuesPerLinter , log .Child (logutils .DebugKeyMaxFromLinter ), cfg ),
102109
110+ // Now we can modify the issues for output.
103111 processors .NewSourceCode (lineCache , log .Child (logutils .DebugKeySourceCode )),
104112 processors .NewPathShortener (),
105113 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.
111114 processors .NewPathPrefixer (cfg .Output .PathPrefix ),
112115 processors .NewSortResults (cfg ),
113116 },
0 commit comments