lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6ed46f85a7577e1d4a48e81f67fd7581@codeaurora.org>
Date:   Fri, 13 Jul 2018 16:28:01 -0700
From:   pheragu@...eaurora.org
To:     Joe Perches <joe@...ches.com>
Cc:     apw@...onical.com, linux-kernel@...r.kernel.org,
        tsoni@...eaurora.org, bryanh@...eaurora.org,
        ckadabi@...eaurora.org, David Keitel <dkeitel@...eaurora.org>
Subject: Re: [PATCH] checkpatch: Require commit text and warn on long commit
 text lines

On 2018-07-13 14:46, Joe Perches wrote:
> 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
> 
While committing the changes, one can just write the subject and not 
write
the commit text at all. So, if we just count the lines between email 
headers
and signed-off, we still do count lines which form the subject, but the
commit text is still absent. Also, subject can be longer than one line. 
So,
just counting lines doesn't really guarantee the presence of commit 
text.

>> 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 &&
> 
True, but this patch points out every line of the commit text that is
exceeding the limit.

>> 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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ