Skip to content

Commit 0155202

Browse files
committed
fix: clean given path prefix to trim
1 parent 21b0358 commit 0155202

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/result/processors/fixer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ func (f Fixer) Process(issues []result.Issue) []result.Issue {
5959
fileWithoutPathPrefix := file
6060

6161
if f.cfg.Output.PathPrefix != "" {
62-
fileWithoutPathPrefix = strings.TrimPrefix(fileWithoutPathPrefix, f.cfg.Output.PathPrefix+string(filepath.Separator))
62+
fileWithoutPathPrefix = strings.TrimPrefix(fileWithoutPathPrefix, filepath.Clean(f.cfg.Output.PathPrefix)+string(filepath.Separator))
6363
}
6464
err = f.fixIssuesInFile(fileWithoutPathPrefix, issuesToFix)
6565
})

0 commit comments

Comments
 (0)