Skip to content

Commit 360a58d

Browse files
committed
dev: misspell: always build replacement
1 parent f8a5a8c commit 360a58d

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

pkg/golinters/misspell.go

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -82,15 +82,12 @@ func (lint Misspell) runOnFile(fileName string, r *misspell.Replacer, lintCtx *l
8282
Line: diff.Line,
8383
Column: diff.Column + 1,
8484
}
85-
var replacement *result.Replacement
86-
if lintCtx.Cfg.Issues.NeedFix {
87-
replacement = &result.Replacement{
88-
Inline: &result.InlineFix{
89-
StartCol: diff.Column,
90-
Length: len(diff.Original),
91-
NewString: diff.Corrected,
92-
},
93-
}
85+
replacement := &result.Replacement{
86+
Inline: &result.InlineFix{
87+
StartCol: diff.Column,
88+
Length: len(diff.Original),
89+
NewString: diff.Corrected,
90+
},
9491
}
9592

9693
res = append(res, result.Issue{

0 commit comments

Comments
 (0)