From 8eb7b35010741eb63b215a77149dd448cf529674 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Niew=C3=B6hner?= Date: Tue, 25 Oct 2022 23:29:18 +0200 Subject: [PATCH] lint/checkpatch: consider leading + in the line length limit check MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-on: https://review.coreboot.org/c/coreboot/+/68869 Tested-by: build bot (Jenkins) Reviewed-by: Tim Wawrzynczak --- util/lint/checkpatch.pl | 1 + 1 file changed, 1 insertion(+) 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";