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: <20250729140725.130842-1-ignacio.pena87@gmail.com>
Date: Tue, 29 Jul 2025 10:07:25 -0400
From: Ignacio Peña <ignacio.pena87@...il.com>
To: Joe Perches <joe@...ches.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
	linux-kernel@...r.kernel.org
Subject: [PATCH v4] checkpatch: warn about novice phrases in commit messages

Add warnings for common phrases that indicate uncertainty or lack of
confidence in commit messages.

Signed-off-by: Ignacio Peña <ignacio.pena87@...il.com>
---
 scripts/checkpatch.pl | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index ac270f35b..f79a525a7 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -3430,6 +3430,24 @@ sub process {
 			     "Use lore.kernel.org archive links when possible - see https://lore.kernel.org/lists.html\n" . $herecurr);
 		}
 
+# Check for novice phrases in commit messages
+		if ($in_commit_log && !$non_utf8_charset) {
+			my $novice_phrases = qr{(?:^|\s)(?i)(
+				I\s+think|
+				I\s+believe|
+				I\s+suppose|
+				probably|
+				maybe|
+				perhaps|
+				possibly|
+				hopefully
+			)(?:\s|$)}x;
+			if ($line =~ /$novice_phrases/) {
+				WARN("NOVICE_PHRASE",
+				     "Avoid uncertainty phrases like '$1' in commit messages\n" . $herecurr);
+			}
+		}
+
 # Check for added, moved or deleted files
 		if (!$reported_maintainer_file && !$in_commit_log &&
 		    ($line =~ /^(?:new|deleted) file mode\s*\d+\s*$/ ||
-- 
2.50.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ