summaryrefslogtreecommitdiff
path: root/util/lint
diff options
context:
space:
mode:
authorMichael Niewöhner <foss@mniewoehner.de>2022-10-25 23:29:18 +0200
committerFelix Held <felix-coreboot@felixheld.de>2022-10-28 15:57:06 +0000
commit8eb7b35010741eb63b215a77149dd448cf529674 (patch)
treedb9e3c230f794b9c6079647524f10fc184c10a8d /util/lint
parent8bed7ff2d9d02bc19f0b331d26e45970ba3e26c6 (diff)
lint/checkpatch: consider leading + in the line length limit check
The line length limit in coreboot's coding style guidelines applies to the final file, while checkpatch currently checks the patch line length. Since patches´ lines start with a `+` (only added content is checked), the line length being checked is one character longer than the actual content. Increase max_line_length by 1 to take this into account. Change-Id: I8da45bb0d5fbe7d0e12c8b181cf01e5685186bf6 Signed-off-by: Michael Niewöhner <foss@mniewoehner.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/68869 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Tim Wawrzynczak <inforichland@gmail.com>
Diffstat (limited to 'util/lint')
-rwxr-xr-xutil/lint/checkpatch.pl1
1 files changed, 1 insertions, 0 deletions
diff --git a/util/lint/checkpatch.pl b/util/lint/checkpatch.pl
index ef2faee2bb..95296b9914 100755
--- a/util/lint/checkpatch.pl
+++ b/util/lint/checkpatch.pl
@@ -3338,6 +3338,7 @@ sub process {
# if LONG_LINE is ignored, the other 2 types are also ignored
#
+ $max_line_length += 1; # consider leading + in patches
if ($line =~ /^\+/ && $length > $max_line_length) {
my $msg_type = "LONG_LINE";