mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-03 12:22:34 +03:00
Enable intrange linter, and fix warnings
This commit is contained in:
@ -56,7 +56,7 @@ func (self *Patch) HunkStartIdx(hunkIndex int) int {
|
||||
hunkIndex = lo.Clamp(hunkIndex, 0, len(self.hunks)-1)
|
||||
|
||||
result := len(self.header)
|
||||
for i := 0; i < hunkIndex; i++ {
|
||||
for i := range hunkIndex {
|
||||
result += self.hunks[i].lineCount()
|
||||
}
|
||||
return result
|
||||
|
@ -91,7 +91,7 @@ func (p *PatchBuilder) addFileWhole(info *fileInfo) {
|
||||
// add every line index
|
||||
// TODO: add tests and then use lo.Range to simplify
|
||||
info.includedLineIndices = make([]int, lineCount)
|
||||
for i := 0; i < lineCount; i++ {
|
||||
for i := range lineCount {
|
||||
info.includedLineIndices[i] = i
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user