Skip to contentSkip to conversation

checkpatch-add-warning-for-lines-starting-with-a-in-commit-log.patch removed from -mm tree

merged [email protected] 1 participant 1 message Dec 16, 2020

lore
Share & tools
lore

[email protected]

author tree notice Applied
#0 lore raw

The patch titled
Subject: checkpatch: add warning for lines starting with a '#' in commit log
has been removed from the -mm tree. Its filename was
checkpatch-add-warning-for-lines-starting-with-a-in-commit-log.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Dwaipayan Ray <[email protected]>
Subject: checkpatch: add warning for lines starting with a '#' in commit log

Commit log lines starting with '#' are dropped by git as comments. Add a check to emit a warning for these lines.

Also add a --fix option to insert a space before the leading '#' in such lines.

---

 scripts/checkpatch.pl |    9 +++++++++
 1 file changed, 9 insertions(+)
scripts/checkpatch.pl renamed from scripts/checkpatch.pl~checkpatch-add-warning-for-lines-starting-with-a-in-commit-log +9 -0
@@ -3033,6 +3033,15 @@ sub process {
 			$commit_log_possible_stack_dump = 0;
 		}
 
+# Check for lines starting with a #
+		if ($in_commit_log && $line =~ /^#/) {
+			if (WARN("COMMIT_COMMENT_SYMBOL",
+				 "Commit log lines starting with '#' are dropped by git as comments\n" . $herecurr) &&
+			    $fix) {
+				$fixed[$fixlinenr] =~ s/^/ /;
+			}
+		}
+
 # Check for git id commit length and improperly formed commit descriptions
 		if ($in_commit_log && !$commit_log_possible_stack_dump &&
 		    $line !~ /^\s*(?:Link|Patchwork|http|https|BugLink|base-commit):/i &&

_

Patches currently in -mm which might be from [email protected] are