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]
Date:	Sun, 10 Jul 2011 11:49:58 -0700
From:	Joe Perches <joe@...ches.com>
To:	Edwin van Vliet <edwin@...atah.nl>
Cc:	apw@...onical.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] scripts/checkpatch.pl: added test for repeated lines

On Sun, 2011-07-10 at 20:18 +0200, Edwin van Vliet wrote:
> Repeated lines may indicate a bug or code that needs clarification. If the
> repeated line is intentional, an extra comment may be helpful for reviewers
> since the repeated pattern is likely to draw attention.
[]
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
[]
> @@ -1479,6 +1479,11 @@ sub process {
> +# check for repeated lines which may indicate bugs or lack of clarity
> +		if ($rawline eq $prevrawline) {
> +			WARN("repeated line\n" . $herecurr);
> +		}
> +

Interest concept, but I think it needs to check for
comment lines and blank lines and such.

Also, there are uses of appropriate multiple close braces
on consecutive lines like:

	switch (foo) {
	case bar: {
		etc...
	}
	}



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ