Messages in this thread Patch in this message | | | Subject | Re: [PATCH] checkpatch: Require commit text and warn on long commit text lines | From | Joe Perches <> | Date | Fri, 13 Jul 2018 14:46:50 -0700 |
| |
On Fri, 2018-07-13 at 14:40 -0700, Prakruthi Deepak Heragu wrote: > Commit text is almost always necessary to explain why a change is needed.
This bit seems sensible, but perhaps it should just count the number of lines after the end of email headers and before any Signed-off-by:/Signature line
> Also, warn on commit text lines longer than 75 characters. The commit text > are indented and may wrap on a terminal if they are longer than 75 > characters.
This is already exists via
# Check for line lengths > 75 in commit log, warn once if ($in_commit_log && !$commit_log_long_line && length($line) > 75 &&
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl [] > @@ -14,6 +14,13 @@ use File::Basename; > use Cwd 'abs_path'; > use Term::ANSIColor qw(:constants); > > +use constant BEFORE_SHORTTEXT => 0; > +use constant IN_SHORTTEXT_BLANKLINE => 1; > +use constant IN_SHORTTEXT => 2; > +use constant AFTER_SHORTTEXT => 3; > +use constant CHECK_NEXT_SHORTTEXT => 4; > +use constant SHORTTEXT_LIMIT => 75;
probably overly complicated
| |