@@ -111,7 +111,7 @@ func testComment(entityKind, entityName, comment, wantedPrefix string) (ok bool,
111111
112112 // Check if comment has wanted prefix
113113 if ! strings .HasPrefix (trimmedComment , wantedPrefix ) {
114- errorString := fmt .Sprintf ("%s comment for %s '%s' should start with '// %s ...': got '// %s'" ,
114+ errorString := fmt .Sprintf ("%s comment for %s %q should start with '// %s ...': got '// %s'" ,
115115 entityKind , lowerEntity , entityName , wantedPrefix , trimmedComment )
116116 return false , errorString
117117 }
@@ -123,14 +123,14 @@ func testComment(entityKind, entityName, comment, wantedPrefix string) (ok bool,
123123
124124 if commentContent == "" {
125125 lowerEntity := strings .ToLower (entityKind )
126- errorString := fmt .Sprintf ("%s comment of '%s' should provide a description of the %s, e.g '// %s <%s_description>'" ,
126+ errorString := fmt .Sprintf ("%s comment of %q should provide a description of the %s, e.g '// %s <%s_description>'" ,
127127 entityKind , entityName , lowerEntity , wantedPrefix , lowerEntity )
128128 return false , errorString
129129 }
130130
131131 // Check if comment ends in a period
132132 if ! strings .HasSuffix (trimmedComment , "." ) {
133- return false , fmt .Sprintf ("%s comment for %s '%s' should end with a period (.)" ,
133+ return false , fmt .Sprintf ("%s comment for %s %q should end with a period (.)" ,
134134 entityKind , lowerEntity , entityName )
135135 }
136136
0 commit comments