File tree 2 files changed +12
-1
lines changed
2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -171,7 +171,7 @@ func checkCapital(c comment) []Issue {
171
171
if state == endOfSentence && unicode .IsLower (r ) {
172
172
pp = append (pp , position {
173
173
line : pos .line ,
174
- column : runeToByteColumn (c .text , pos .column ),
174
+ column : runeToByteColumn (c .lines [ pos . line - 1 ] , pos .column ),
175
175
})
176
176
}
177
177
state = empty
Original file line number Diff line number Diff line change @@ -337,6 +337,17 @@ func TestCheckCapital(t *testing.T) {
337
337
{Pos : token.Position {Line : 1 , Column : 23 }},
338
338
},
339
339
},
340
+ {
341
+ name : "issue position column resolved from correct line" ,
342
+ comment : comment {
343
+ lines : []string {"// Кириллица." , "// Issue. here." },
344
+ text : " Кириллица.\n Issue. here." ,
345
+ start : start ,
346
+ },
347
+ issues : []Issue {
348
+ {Pos : token.Position {Line : 2 , Column : 11 }},
349
+ },
350
+ },
340
351
{
341
352
name : "sentence with leading spaces" ,
342
353
comment : comment {
You can’t perform that action at this time.
0 commit comments