lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 12 Nov 2007 14:46:30 -0500
From:	"Mike Frysinger" <vapier.adi@...il.com>
To:	"Andy Whitcroft" <apw@...dowen.org>
Cc:	"Linux Kernel Mailing List" <linux-kernel@...r.kernel.org>
Subject: checkpatch.pl and no newline handling

the current checkpatch.pl does not reject new files that lack a
newline, yet rejects patches that fix newlines in files ... quite the
opposite of what we actually want

$ echo -n moo > no-newline
$ diff -Nu /dev/null no-newline
--- /dev/null   2007-11-10 20:02:36.248000000 -0500
+++ no-newline  2007-11-12 14:44:19.000000000 -0500
@@ -0,0 +1 @@
+moo
\ No newline at end of file
$ (diff -Nu /dev/null no-newline; echo Signed-off-by:) |
./scripts/checkpatch.pl -
Your patch has no obvious style problems and is ready for submission.

lies!

$ echo moo > newline
$ diff -u no-newline newline
--- no-newline  2007-11-12 14:44:19.000000000 -0500
+++ newline     2007-11-12 14:44:27.000000000 -0500
@@ -1 +1 @@
-moo
\ No newline at end of file
+moo
$ (diff -u no-newline newline; echo Signed-off-by:) | ./scripts/checkpatch.pl -
ERROR: patch seems to be corrupt (line wrapped?)
#5: FILE: newline:0:
\ No newline at end of file

total: 1 errors, 0 warnings, 3 lines checked
Your patch has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
-mike
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ