Felix Held has submitted this change. ( https://review.coreboot.org/c/coreboot/+/68869 )
Change subject: lint/checkpatch: consider leading + in the line length limit check ......................................................................
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 --- M util/lint/checkpatch.pl 1 file changed, 22 insertions(+), 0 deletions(-)
Approvals: build bot (Jenkins): Verified Tim Wawrzynczak: Looks good to me, approved
diff --git a/util/lint/checkpatch.pl b/util/lint/checkpatch.pl index ef2faee..95296b9 100755 --- a/util/lint/checkpatch.pl +++ b/util/lint/checkpatch.pl @@ -3338,6 +3338,7 @@ # 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";