We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fc63228 commit e23e96eCopy full SHA for e23e96e
1 file changed
hooks/jsonnet-fmt-hook/main.go
@@ -99,11 +99,12 @@ func summarizeDiff(diffs []diffmatchpatch.Diff) *FileDiff {
99
endWithLineBreak = text[len(text)-1:] == "\n"
100
writeLineCount := min(maxShowLine, len(lines))
101
102
- if i == 0 {
+ switch i {
103
+ case 0:
104
showTail = true
- } else if i == lastDiffIdx {
105
+ case lastDiffIdx:
106
showHead = true
- } else {
107
+ default:
108
109
110
}
0 commit comments