gofmt: autofix missing newline at EOF (#3917)
This commit is contained in:
parent
7cf30e7b51
commit
28f056032c
@ -80,6 +80,16 @@ func (p *hunkChangesParser) parseDiffLines(h *diffpkg.Hunk) {
|
||||
ret = append(ret, dl)
|
||||
}
|
||||
|
||||
// if > 0, then the original file had a 'No newline at end of file' mark
|
||||
if h.OrigNoNewlineAt > 0 {
|
||||
dl := diffLine{
|
||||
originalNumber: currentOriginalLineNumber + 1,
|
||||
typ: diffLineAdded,
|
||||
data: "",
|
||||
}
|
||||
ret = append(ret, dl)
|
||||
}
|
||||
|
||||
p.lines = ret
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user