Skip to content

Commit f0211f6

Browse files
committed
fix: clean given path prefix to trim
1 parent db6177d commit f0211f6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/result/processors/fixer.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ func (f Fixer) Process(issues []result.Issue) []result.Issue {
6161
fileWithoutPathPrefix := file
6262

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

0 commit comments

Comments
 (0)