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: <b76eb950365b27848dfb0cfc851255d9af97ac90.camel@perches.com>
Date:   Wed, 08 May 2019 07:19:29 -0700
From:   Joe Perches <joe@...ches.com>
To:     Antonio Borneo <borneo.antonio@...il.com>,
        Andy Whitcroft <apw@...onical.com>
Cc:     linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/4] checkpatch: add --fix for warning LINE_CONTINUATIONS

On Wed, 2019-05-08 at 14:27 +0200, Antonio Borneo wrote:
> The warning LINE_CONTINUATIONS does not offer a --fix.
> 
> Add the trivial --fix.
> In case of consecutive lines with the same issue, this will
> fix only the first line.
[]
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
[]
> @@ -5207,8 +5207,11 @@ sub process {
>  			    $line !~ /^\+\s*\#.*\\$/ &&		# preprocessor
>  			    $line !~ /^\+.*\b(__asm__|asm)\b.*\\$/ &&	# asm
>  			    $line =~ /^\+.*\\$/) {
> -				WARN("LINE_CONTINUATIONS",
> -				     "Avoid unnecessary line continuations\n" . $herecurr);
> +				if (WARN("LINE_CONTINUATIONS",
> +					 "Avoid unnecessary line continuations\n" . $herecurr) &&

I prefer to not apply this.

Problem here is that these should generally be fixed by hand
as the automated fix isn't very good style either.

> +				    $fix) {
> +					$fixed[$fixlinenr] =~ s/\s*\\$//;
> +				}
>  			}
>  		}
>  

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ