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]
Message-ID: <20190520124238.10298-1-michal.kalderon@marvell.com>
Date:   Mon, 20 May 2019 15:42:38 +0300
From:   Michal Kalderon <michal.kalderon@...vell.com>
To:     <michal.kalderon@...vell.com>, <leon@...nel.org>,
        <apw@...onical.com>, <joe@...ches.com>
CC:     <linux-kernel@...r.kernel.org>
Subject: [PATCH] checkpatch: add test for empty line after Fixes statement

Check that there is no empty line after a fixes statement

Reviewed-by: Leon Romanovsky <leonro@...lanox.com>
Signed-off-by: Michal Kalderon <michal.kalderon@...vell.com>
---
 scripts/checkpatch.pl | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index a09333fd7cef..6cbc07364d4f 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -62,6 +62,7 @@ my $conststructsfile = "$D/const_structs.checkpatch";
 my $typedefsfile = "";
 my $color = "auto";
 my $allow_c99_comments = 1; # Can be overridden by --ignore C99_COMMENT_TOLERANCE
+my $fixes = 0;
 
 sub help {
 	my ($exitcode) = @_;
@@ -2792,6 +2793,18 @@ sub process {
 			}
 		}
 
+# Check if Fixes statement to make sure next line is not blank
+		if ($fixes) {
+			if ($line =~ /^\s*$/) {
+				WARN("EMPTY_LINE_AFTER_FIXES", "No Empty line after Fixes statement\n" . $here);
+			}
+			$fixes = 0;
+		}
+
+		if ($in_commit_log && $line =~ /Fixes/) {
+			$fixes = 1;
+		}
+
 # Check for added, moved or deleted files
 		if (!$reported_maintainer_file && !$in_commit_log &&
 		    ($line =~ /^(?:new|deleted) file mode\s*\d+\s*$/ ||
-- 
2.14.5

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ