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>
This commit is contained in:
Michael Niewöhner 2022-10-25 23:29:18 +02:00 committed by Felix Held
parent 8bed7ff2d9
commit 8eb7b35010
1 changed files with 1 additions and 0 deletions

View File

@ -3338,6 +3338,7 @@ sub process {
# if LONG_LINE is ignored, the other 2 types are also ignored # 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) { if ($line =~ /^\+/ && $length > $max_line_length) {
my $msg_type = "LONG_LINE"; my $msg_type = "LONG_LINE";