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: <379d4b58d82be1f871924c89e0db7bab367564fb.camel@perches.com>
Date:   Thu, 11 Mar 2021 01:15:34 -0800
From:   Joe Perches <joe@...ches.com>
To:     Dan Carpenter <dan.carpenter@...cle.com>,
        Fabio Aiuto <fabioaiuto83@...il.com>
Cc:     gregkh@...uxfoundation.org, devel@...verdev.osuosl.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] staging: rtl8723bs: align comments

On Wed, 2021-03-10 at 20:48 +0300, Dan Carpenter wrote:
> You need to have a space character after the '*'.

Perhaps YA checkpatch test...
---
 scripts/checkpatch.pl | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index f42e5ba16d9b..0de553d52605 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -3876,6 +3876,21 @@ sub process {
 			}
 		}
 
+# Independent comment lines should have a space after the comment initiator
+		if ($line =~ /^\+[ \t]*($;+)/) {		#leading comment
+			my $comment = trim(substr($rawline, $-[1], $+[1] - $-[1]));
+			if ($comment =~ m{^(/\*|\*/|\*|//)(.*)}) {
+				my $init = $1;
+				my $rest = $2;
+				if ($init =~ m{^(?:/\*|\*|//)$} &&
+				    $rest ne '' &&
+				    $rest !~ /^[\s\*=\-]/) {
+					WARN("COMMENT_STYLE",
+					     "Comments generally use whitespace after the comment initiator\n" . $herecurr);
+				}
+			}
+		}
+
 # check for missing blank lines after struct/union declarations
 # with exceptions for various attributes and macros
 		if ($prevline =~ /^[\+ ]};?\s*$/ &&

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ