diff --git a/checkers/commentFormatting_checker.go b/checkers/commentFormatting_checker.go index c849bdedd..f330b723a 100644 --- a/checkers/commentFormatting_checker.go +++ b/checkers/commentFormatting_checker.go @@ -111,5 +111,9 @@ func (c *commentFormattingChecker) specialChar(r rune) bool { } func (c *commentFormattingChecker) warn(comment *ast.Comment) { - c.ctx.Warn(comment, "put a space between `//` and comment text") + c.ctx.WarnFixable(comment, linter.QuickFix{ + From: comment.Pos(), + To: comment.End(), + Replacement: []byte(strings.Replace(comment.Text, "//", "// ", 1)), + }, "put a space between `//` and comment text") }