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>] [day] [month] [year] [list]
Message-Id: <1611847603-15736-1-git-send-email-shradha.t@samsung.com>
Date:   Thu, 28 Jan 2021 20:56:43 +0530
From:   Shradha Todi <shradha.t@...sung.com>
To:     linux-kernel@...r.kernel.org
Cc:     apw@...onical.com, joe@...ches.com, pankaj.dubey@...sung.com,
        Shradha Todi <shradha.t@...sung.com>,
        Lakshay Mehra <l.mehra@...sung.com>
Subject: [PATCH] checkpatch: add warning for line space after "Fixes:" tag

Add a check to give warning for line break between Fixes tag
and signature tags as that is the commonly followed style.

Also add a --fix option to delete space lines after "Fixes:" tag.

Signed-off-by: Lakshay Mehra <l.mehra@...sung.com>
Signed-off-by: Shradha Todi <shradha.t@...sung.com>
---
 scripts/checkpatch.pl | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 92e888e..6c144c5 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -3027,6 +3027,15 @@ sub process {
 			$commit_log_long_line = 1;
 		}
 
+# Check for no line break after Fixes
+		if ($line =~ /^\s*Fixes:/i && $rawlines[$linenr] =~ /^\s*$/) {
+			if (WARN("UNNECESSARY_NEWLINE",
+				 "Newline is not required after Fixes:\n" . $herecurr) &&
+			    $fix) {
+				fix_delete_line($fixlinenr+1, $rawline);
+			}
+		}
+
 # Reset possible stack dump if a blank line is found
 		if ($in_commit_log && $commit_log_possible_stack_dump &&
 		    $line =~ /^\s*$/) {
-- 
2.7.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ