summaryrefslogtreecommitdiff
path: root/util/lint
diff options
context:
space:
mode:
authorPaul Menzel <pmenzel@molgen.mpg.de>2021-12-09 12:49:35 +0100
committerMartin Roth <martinroth@google.com>2021-12-10 20:54:56 +0000
commitdd1ee27503a7d21899bf50fa58cdd16bbab83633 (patch)
tree68de93efb6ac3eb8c3cc0a122f7a5fcc008f40f4 /util/lint
parentf7d6eb2fef3b4afca5c165af0b936612e01b1c2e (diff)
util/lint/checkpatch: Decrease commit message line length limit to 72
Currently, `checkpatch.pl`, imported from the Linux project, checks for 75 characters per line [2]: > Suggest line wrapping at 75 columns so the default git commit log > indentation of 4 plus the commit message text still fits on an 80 > column screen. But Gerrit’s Web interface and its commit hooks use with 72 characters per line [2]: remote: commit 35bb56d: warning: too many message lines longer than 72 characters; manually wrap lines remote: remote: SUCCESS remote: remote: https://review.coreboot.org/c/coreboot/+/60004 [DO NOT SUBMIT] Gerrit commit msg line length test [NEW] So, decrease the suggested length from 75 to 72 characters per line. [1]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=2a076f40d8c9be95bee7bcf18436655e1140447f [2]: https://review.coreboot.org/60004 Change-Id: Ic9c686cb1a902259b18377b76b5c999e94660fed Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/60006 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin Roth <martinroth@google.com>
Diffstat (limited to 'util/lint')
-rwxr-xr-xutil/lint/checkpatch.pl6
1 files changed, 3 insertions, 3 deletions
diff --git a/util/lint/checkpatch.pl b/util/lint/checkpatch.pl
index f1c31c54c0..41aae935f5 100755
--- a/util/lint/checkpatch.pl
+++ b/util/lint/checkpatch.pl
@@ -2655,9 +2655,9 @@ sub process {
$commit_log_possible_stack_dump = 1;
}
-# Check for line lengths > 75 in commit log, warn once
+# Check for line lengths > 72 in commit log, warn once
if ($in_commit_log && !$commit_log_long_line &&
- length($line) > 75 &&
+ length($line) > 72 &&
!($line =~ /^\s*[a-zA-Z0-9_\/\.]+\s+\|\s+\d+/ ||
# file delta changes
$line =~ /^\s*(?:[\w\.\-]+\/)++[\w\.\-]+:/ ||
@@ -2666,7 +2666,7 @@ sub process {
# A Fixes: or Link: line
$commit_log_possible_stack_dump)) {
WARN("COMMIT_LOG_LONG_LINE",
- "Possible unwrapped commit description (prefer a maximum 75 chars per line)\n" . $herecurr);
+ "Possible unwrapped commit description (prefer a maximum 72 chars per line)\n" . $herecurr);
$commit_log_long_line = 1;
}