def CheckForNewlineAtEOF(filename, lines, error):
<EOL>if len(lines) < <NUM_LIT:3> or lines[-<NUM_LIT:2>]:<EOL><INDENT>error(filename, len(lines) - <NUM_LIT:2>, '<STR_LIT>', <NUM_LIT:5>,<EOL>'<STR_LIT>')<EOL><DEDENT>
Logs an error if there is no newline char at the end of the file.

    Args:
      filename: The name of the current file.
      lines: An array of strings, each representing a line of the file.
      error: The function to call with any errors found.