checkTrailingNewline

Checks if the last line of the file is terminated with a newline.

This check has an auto-fixer as well. Clicking the Fix all button in the report fixes all violations for this check, clicking the Fix in this file button fixes all violations for this check for one file. For more information, see section Automatic fixes.

Configurable parameters

  • TrailingNewline (boolean): Whether or not the last line shall be terminated with a newline.

Exemption tag: %@ok<NEWLN>