From eefa7224552176c11a047fff65a66ad6959e32f7 Mon Sep 17 00:00:00 2001 From: Matt Wagantall Date: Sat, 18 Aug 2012 11:21:00 -0700 Subject: [PATCH] checkpatch: Excuse reverts from "summary line over 75 characters" check Rather than forcing authors of reverts to truncate the summary line because the "Revert" prefix added pushes it over the character limit, excuse reverts from this rule. Change-Id: I395dfff3327e360ef935d4a685c38df6577e3867 Signed-off-by: Matt Wagantall Signed-off-by: Stepan Moskovchenko --- scripts/checkpatch.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index e4404ab22403..ad385f922e5d 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -2182,7 +2182,7 @@ sub process { $subjectline = $line; $sublinenr = "#$linenr & "; # Check for Subject line less than line limit - if (length($1) > SHORTTEXT_LIMIT) { + if (length($1) > SHORTTEXT_LIMIT && !($1 =~ m/Revert\ \"/)) { WARN("LONG_SUMMARY_LINE", "summary line over " . SHORTTEXT_LIMIT . @@ -2194,7 +2194,7 @@ sub process { # headers so we are now in the shorttext. $shorttext = IN_SHORTTEXT_BLANKLINE; $shorttext_exspc = 4; - if (length($1) > SHORTTEXT_LIMIT) { + if (length($1) > SHORTTEXT_LIMIT && !($1 =~ m/Revert\ \"/)) { WARN("LONG_SUMMARY_LINE", "summary line over " . SHORTTEXT_LIMIT .