Skip to content

Commit 58a059a

Browse files
committed
Fixes linting
1 parent 81799d2 commit 58a059a

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

services/gitdiff/csv.go

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -199,18 +199,18 @@ func createCsvDiff(diffFile *DiffFile, baseReader *csv.Reader, headReader *csv.R
199199
cells[i] = &TableDiffCell{LeftCell: acell, RightCell: bcell, Type: celltype}
200200
}
201201
}
202-
cells_index := 0
202+
cellsIndex := 0
203203
for i := 0; i < len(b2a); i++ {
204204
if b2a[i] == unmappedColumn {
205205
bcell, _ := getCell(brow, i)
206-
if cells[cells_index] != nil && len(cells) >= cells_index+1 {
207-
copy(cells[cells_index+1:], cells[cells_index:])
206+
if cells[cellsIndex] != nil && len(cells) >= cellsIndex+1 {
207+
copy(cells[cellsIndex+1:], cells[cellsIndex:])
208208
}
209-
cells[cells_index] = &TableDiffCell{RightCell: bcell, Type: TableDiffCellAdd}
210-
} else if cells_index < b2a[i] {
211-
cells_index = b2a[i]
209+
cells[cellsIndex] = &TableDiffCell{RightCell: bcell, Type: TableDiffCellAdd}
210+
} else if cellsIndex < b2a[i] {
211+
cellsIndex = b2a[i]
212212
}
213-
cells_index += 1
213+
cellsIndex += 1
214214
}
215215

216216
return &TableDiffRow{RowIdx: bline, Cells: cells}, nil
@@ -294,24 +294,24 @@ func getColumnMapping(a *csvReader, b *csvReader) ([]int, []int) {
294294
// tryMapColumnsByContent tries to map missing columns by the content of the first lines.
295295
func tryMapColumnsByContent(a *csvReader, a2b []int, b *csvReader, b2a []int) {
296296
for i := 0; i < len(a2b); i++ {
297-
b_start := 0
298-
for a2b[i] == unmappedColumn && b_start < len(b2a) {
299-
if b2a[b_start] == unmappedColumn {
297+
bStart := 0
298+
for a2b[i] == unmappedColumn && bStart < len(b2a) {
299+
if b2a[bStart] == unmappedColumn {
300300
rows := util.Min(maxRowsToInspect, util.Max(0, util.Min(len(a.buffer), len(b.buffer))-1))
301301
same := 0
302302
for j := 1; j <= rows; j++ {
303303
acell, ea := getCell(a.buffer[j], i)
304-
bcell, eb := getCell(b.buffer[j], b_start)
304+
bcell, eb := getCell(b.buffer[j], bStart)
305305
if ea == nil && eb == nil && acell == bcell {
306306
same++
307307
}
308308
}
309309
if (float32(same) / float32(rows)) > minRatioToMatch {
310-
a2b[i] = b_start
311-
b2a[b_start] = i
310+
a2b[i] = bStart
311+
b2a[bStart] = i
312312
}
313313
}
314-
b_start += 1
314+
bStart += 1
315315
}
316316
}
317317
}

0 commit comments

Comments
 (0)