Re: [PATCH] checkpatch: error if file terminates without a new-line

From: Prasad Pandit
Date: Wed Apr 17 2024 - 02:36:31 EST


On Tuesday, 16 April, 2024 at 03:25:18 pm IST, Joe Perches wrote: 
>There's an existing check for this. Fix that instead.
>
># check for adding lines without a newline.
>        if ($line =~ /^\+/ && defined $lines[$linenr]
>            && $lines[$linenr] =~ /^\\ No newline >at end of file/) {
>            if (WARN("MISSING_EOF_NEWLINE",
>                    "adding a line without newline at end of file\n" . $herecurr) &&
>                $fix) {
>                fix_delete_line($fixlinenr+1, "No newline at end of file");


Okay, will check; Thank you.
---
  -Prasad