Skip to content

Commit 54b39f5

Browse files
committed
feat: unique file path
1 parent 4caffa8 commit 54b39f5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pkg/result/processors/fixer.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,9 +203,12 @@ func (p Fixer) process(issues []result.Issue) ([]result.Issue, error) {
203203
formattedFiles = append(formattedFiles, path)
204204
}
205205

206+
var tobeFormattedFiles map[string]struct{}
206207
for i := range formatIssues {
207-
path := issues[i].FilePath()
208+
tobeFormattedFiles[formatIssues[i].FilePath()] = struct{}{}
209+
}
208210

211+
for path := range tobeFormattedFiles {
209212
// Skips files already formatted by the previous fix step.
210213
if !slices.Contains(formattedFiles, path) {
211214
content, err := p.fileCache.GetFileBytes(path)

0 commit comments

Comments
 (0)