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.
Wrong:
Files should contain an empty newline at the end
Better:
Files should end with a newline
Wrong:
Some tools work better when files end with an empty line.
Better:
Some tools work better when the last line is complete (with a newline).