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:   Fri, 19 Feb 2021 09:55:21 -0800
From:   Joe Perches <joe@...ches.com>
To:     Dwaipayan Ray <dwaipayanray1@...il.com>
Cc:     lukas.bulwahn@...il.com,
        linux-kernel-mentees@...ts.linuxfoundation.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4 1/2] checkpatch: add verbose mode

On Wed, 2021-02-17 at 22:24 +0530, Dwaipayan Ray wrote:
> Add a new verbose mode to checkpatch.pl to emit additional verbose
> test descriptions. The verbose mode is optional and can be enabled
> by the flag -v or --verbose.
[]
> The verbose descriptions are not shown when the --terse option
> is enabled.
[]
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
[]
> @@ -2209,7 +2256,15 @@ sub report {
>  		splice(@lines, 1, 1);
>  		$output = join("\n", @lines);
>  	}
> -	$output = (split('\n', $output))[0] . "\n" if ($terse);
> +
> +	if ($terse) {
> +		$output = (split('\n', $output))[0] . "\n";
> +	}
> +
> +	if ($verbose &&
> +	    exists $verbose_messages{$type}) {
> +		$output .= $verbose_messages{$type} . "\n\n";
> +	}

verbose output can be silly long if repeated multiple times.
Perhaps the verbose content should only be printed once when
first emitted with a flag set for that type.

Something like:

	if ($verbose && exists($verbose_messages{$type}) &&
	    !$verbose_emitted{$type}) {
		$output .= ...
		$verbose_emitted{$type} = 1;
	}


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ