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] [day] [month] [year] [list]
Date:   Wed, 02 Dec 2020 12:36:57 -0800
From:   Joe Perches <joe@...ches.com>
To:     Dwaipayan Ray <dwaipayanray1@...il.com>
Cc:     linux-kernel-mentees@...ts.linuxfoundation.org,
        linux-kernel@...r.kernel.org, lukas.bulwahn@...il.com,
        Peilin Ye <yepeilin.cs@...il.com>
Subject: Re: [PATCH v2] checkpatch: add warning for lines starting with a
 '#' in commit log

On Thu, 2020-12-03 at 01:52 +0530, Dwaipayan Ray wrote:
> Commit log lines starting with a '#' can be dropped by git if
> the corresponding commit message is reworded by a maintainer.
> This minor error can be easily avoided if checkpatch warns
> for the same.

This makes no sense to me.

How about:

Commit log lines starting with # are dropped by git as comments so
emit a warning for these comment lines.

Add a --fix option to insert a space before leading # comments

> +# Check for lines starting with a #
> +		if ($in_commit_log && $line =~ /^#/) {
> +			if (WARN("COMMIT_COMMENT_SYMBOL",
> +				 "Commit log lines starting with a '#' will be dropped by git as a comment\n" . $herecurr) &&

Perhaps:

				 "Commit log lines starting with '#' are dropped by git as comments\n" . $herecurr) &&

> +			    $fix) {
> +				$fixed[$fixlinenr] =~ s/^#/\t#/;

I suggest using a space char and not a tab to avoid excess indentation.

				$fixed[$fixlinenr] =~ s/^/ /;


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ