Qube: Community 9.9
The Java rule S113 has a wrong description. The point about this nice rule is, that all lines consist of the content and a linefeed. And this applies to the very last line a well.
So, if the last linefeed is missing, not an empty line is missing, but the last linefeed.
A line exists, if it ends with a linefeed. If there is a linefeed, but nothing before it, the line is empty. If there is nothing after the last linefeed, there is no line after it, not even an empty line.
Files should contain an empty newline at the end
Files should end with a newline
Some tools work better when files end with an empty line.
Some tools work better when the last line is complete (with a newline).