@@ -234,7 +234,6 @@ func TestCheckPeriod(t *testing.T) {
234
234
}
235
235
236
236
for _ , tt := range testCases {
237
- tt := tt
238
237
t .Run (tt .name , func (t * testing.T ) {
239
238
issue := checkPeriod (tt .comment )
240
239
switch {
@@ -371,7 +370,6 @@ func TestCheckCapital(t *testing.T) {
371
370
}
372
371
373
372
for _ , tt := range testCases {
374
- tt := tt
375
373
t .Run (tt .name , func (t * testing.T ) {
376
374
issues := checkCapital (tt .comment )
377
375
if len (issues ) != len (tt .issues ) {
@@ -443,7 +441,6 @@ func TestIsSpecialBlock(t *testing.T) {
443
441
}
444
442
445
443
for _ , tt := range testCases {
446
- tt := tt
447
444
t .Run (tt .name , func (t * testing.T ) {
448
445
if isSpecialBlock (tt .comment ) != tt .isSpecial {
449
446
t .Fatalf ("Wrong result" )
@@ -536,7 +533,6 @@ func TestIsSpecialLine(t *testing.T) {
536
533
}
537
534
538
535
for _ , tt := range testCases {
539
- tt := tt
540
536
t .Run (tt .name , func (t * testing.T ) {
541
537
if isSpecialLine (tt .comment ) != tt .isSpecial {
542
538
t .Fatalf ("Wrong result" )
@@ -579,7 +575,6 @@ func TestHasSuffix(t *testing.T) {
579
575
}
580
576
581
577
for _ , tt := range testCases {
582
- tt := tt
583
578
t .Run (tt .name , func (t * testing.T ) {
584
579
if hasSuffix (tt .text , tt .suffixes ) != tt .result {
585
580
t .Fatalf ("Wrong result" )
@@ -616,7 +611,6 @@ func TestByteToRuneColumn(t *testing.T) {
616
611
}
617
612
618
613
for _ , tt := range testCases {
619
- tt := tt
620
614
t .Run (tt .name , func (t * testing.T ) {
621
615
if out := byteToRuneColumn (tt .str , tt .index ); out != tt .out {
622
616
t .Fatalf ("Wrong column\n expected: %d\n got: %d" , tt .out , out )
@@ -653,7 +647,6 @@ func TestRuneToByteColumn(t *testing.T) {
653
647
}
654
648
655
649
for _ , tt := range testCases {
656
- tt := tt
657
650
t .Run (tt .name , func (t * testing.T ) {
658
651
if out := runeToByteColumn (tt .str , tt .index ); out != tt .out {
659
652
t .Fatalf ("Wrong column\n expected: %d\n got: %d" , tt .out , out )
0 commit comments