Skip to content

Commit db6177d

Browse files
moitiasalexandear
authored andcommitted
feat: use TrimPrefix instead of strings.Replace
Co-authored-by: Oleksandr Redko <[email protected]>
1 parent e7a1164 commit db6177d

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.Replace(fileWithoutPathPrefix, f.cfg.Output.PathPrefix+string(filepath.Separator), "", 1)
64+
fileWithoutPathPrefix = strings.TrimPrefix(fileWithoutPathPrefix, f.cfg.Output.PathPrefix+string(filepath.Separator))
6565
}
6666
err = f.fixIssuesInFile(fileWithoutPathPrefix, issuesToFix)
6767
})

0 commit comments

Comments
 (0)