[PATCH 2/2] examples: add missing newline at eof
Thomas Monjalon
thomas at monjalon.net
Sun Feb 27 23:35:52 CET 2022
27/02/2022 22:32, Stephen Hemminger:
> On Sun, 27 Feb 2022 21:27:40 +0100
> Thomas Monjalon <thomas at monjalon.net> wrote:
>
> > 25/02/2022 18:47, Stephen Hemminger:
> > > The text file did not end with newline.
> > >
> > > Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
> >
> > Series applied, thanks for the cleanup.
> >
> > Could we add a check in checkpatch to avoid it in future?
>
> The only tool I saw to find these was
> pcregrep -LMr '\n\Z'
>
> But probably possible with a complex python one-liner...
It can be done with diff:
diff /dev/null $file | tail -1 | grep '^\\ No newline'
More information about the dev
mailing list