All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] checkpatch: warn about novice phrases in commit messages
@ 2025-07-21 16:24 Ignacio Peña
  2025-07-21 16:24 ` [PATCH 2/3] checkpatch: enforce 12-char SHA for Fixes tags Ignacio Peña
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: Ignacio Peña @ 2025-07-21 16:24 UTC (permalink / raw)
  To: Joe Perches, Andy Whitcroft
  Cc: Dwaipayan Ray, Lukas Bulwahn, linux-kernel, Greg Kroah-Hartman,
	Ignacio Pena

Add detection for common phrases used by newcomers that make patches
look less professional, such as "please apply" or "please consider".

These phrases are unnecessary and can make the submission appear less
confident. The kernel development process expects direct, professional
communication without apologetic or pleading language.

This check helps newcomers learn the expected communication style,
reducing the chance of patches being dismissed due to poor presentation
rather than technical merit.

Link: https://docs.kernel.org/process/submitting-patches.html#describe-your-changes
Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ignacio Pena <ignacio.pena87@gmail.com>
---
 scripts/checkpatch.pl | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index e722dd6fa..7ccdc774a 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -3266,6 +3266,26 @@ sub process {
 			     "A patch subject line should describe the change not the tool that found it\n" . $herecurr);
 		}
 
+
+# Check for novice phrases in commit message
+		if ($in_commit_log && !$non_utf8_charset) {
+			my @novice_phrases = (
+				qr/please\s+(apply|merge|consider|review)/i,
+				qr/hope\s+this\s+helps/i,
+				qr/my\s+first\s+(patch|contribution)/i,
+				qr/(newbie|beginner)\s+here/i,
+				qr/not\s+sure\s+if\s+(this\s+is\s+)?correct/i,
+				qr/sorry\s+(if|for)/i,
+			);
+
+			foreach my $phrase (@novice_phrases) {
+				if ($line =~ /$phrase/) {
+					WARN("COMMIT_MESSAGE_NOVICE",
+					     "Avoid apologetic or uncertain language - be direct and professional\n" . $herecurr);
+					last;
+				}
+			}
+		}
 # Check for Gerrit Change-Ids not in any patch context
 		if ($realfile eq '' && !$has_patch_separator && $line =~ /^\s*change-id:/i) {
 			if (ERROR("GERRIT_CHANGE_ID",
-- 
2.50.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2025-07-24  7:04 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-21 16:24 [PATCH 1/3] checkpatch: warn about novice phrases in commit messages Ignacio Peña
2025-07-21 16:24 ` [PATCH 2/3] checkpatch: enforce 12-char SHA for Fixes tags Ignacio Peña
2025-07-22  8:00   ` Greg Kroah-Hartman
2025-07-21 16:24 ` [PATCH 3/3] checkpatch: suggest including testing evidence Ignacio Peña
2025-07-22  7:59   ` Greg Kroah-Hartman
2025-07-22 17:58 ` [PATCH 1/3] checkpatch: warn about novice phrases in commit messages Joe Perches
2025-07-23  3:02 ` [PATCH v2 1/2] " Ignacio Peña
2025-07-23  3:02   ` [PATCH v2 2/2] checkpatch: enforce 12-char SHA for Fixes tags Ignacio Peña
2025-07-23  5:18     ` Greg Kroah-Hartman
2025-07-23  3:26   ` [PATCH v2 1/2] checkpatch: warn about novice phrases in commit messages Joe Perches
2025-07-24  3:28   ` [PATCH v3] " Ignacio Peña
2025-07-24  7:04     ` Joe Perches

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.