[2/2] examples: add missing newline at eof
Checks
Commit Message
The text file did not end with newline.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
examples/flow_classify/ipv4_rules_file.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
25/02/2022 18:47, Stephen Hemminger:
> The text file did not end with newline.
>
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Series applied, thanks for the cleanup.
Could we add a check in checkpatch to avoid it in future?
On Sun, 27 Feb 2022 21:27:40 +0100
Thomas Monjalon <thomas@monjalon.net> wrote:
> 25/02/2022 18:47, Stephen Hemminger:
> > The text file did not end with newline.
> >
> > Signed-off-by: Stephen Hemminger <stephen@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...
27/02/2022 22:32, Stephen Hemminger:
> On Sun, 27 Feb 2022 21:27:40 +0100
> Thomas Monjalon <thomas@monjalon.net> wrote:
>
> > 25/02/2022 18:47, Stephen Hemminger:
> > > The text file did not end with newline.
> > >
> > > Signed-off-by: Stephen Hemminger <stephen@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'
@@ -11,4 +11,4 @@
6.7.8.9/16 192.168.0.36/16 10 : 0xffff 11 : 0xffff 6/0xfe 7
6.7.8.9/8 192.168.0.36/8 10 : 0xffff 11 : 0xffff 6/0xfe 8
#error rules
-#9.8.7.6/8 192.168.0.36/8 10 : 0xffff 11 : 0xffff 6/0xfe 9
\ No newline at end of file
+#9.8.7.6/8 192.168.0.36/8 10 : 0xffff 11 : 0xffff 6/0xfe 9