mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-25 18:59:33 +03:00
scripts: cstyle: remove unused -h
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #13285
This commit is contained in:
parent
14ed1f2424
commit
95babbe573
@ -57,9 +57,6 @@ continuation line problems within functions only.
|
||||
The checks have some limitations; see
|
||||
.Sy CONTINUATION CHECKING ,
|
||||
below.
|
||||
.It Fl h
|
||||
Performs heuristic checks that are sometimes wrong.
|
||||
Not generally used.
|
||||
.It Fl p
|
||||
Performs some of the more picky checks.
|
||||
Includes ANSI
|
||||
|
@ -58,10 +58,9 @@ use Getopt::Std;
|
||||
use strict;
|
||||
|
||||
my $usage =
|
||||
"usage: cstyle [-cghpvP] file...
|
||||
"usage: cstyle [-cgpvP] file...
|
||||
-c check continuation indentation inside functions
|
||||
-g print github actions' workflow commands
|
||||
-h perform heuristic checks that are sometimes wrong
|
||||
-p perform some of the more picky checks
|
||||
-v verbose
|
||||
-P check for use of non-POSIX types
|
||||
@ -76,7 +75,6 @@ if (!getopts("cghpvCP", \%opts)) {
|
||||
|
||||
my $check_continuation = $opts{'c'};
|
||||
my $github_workflow = $opts{'g'} || $ENV{'CI'};
|
||||
my $heuristic = $opts{'h'};
|
||||
my $picky = $opts{'p'};
|
||||
my $verbose = $opts{'v'};
|
||||
my $check_posix_types = $opts{'P'};
|
||||
@ -691,19 +689,6 @@ line: while (<$filehandle>) {
|
||||
err("non-POSIX typedef $1 used: use $old2posix{$1} instead");
|
||||
}
|
||||
}
|
||||
if ($heuristic) {
|
||||
# cannot check this everywhere due to "struct {\n...\n} foo;"
|
||||
if ($in_function && !$in_declaration &&
|
||||
/\}./ && !/\}\s+=/ && !/\{.*\}[;,]$/ && !/\}(\s|)*$/ &&
|
||||
!/\} (else|while)/ && !/\}\}/) {
|
||||
err("possible bad text following right brace");
|
||||
}
|
||||
# cannot check this because sub-blocks in
|
||||
# the middle of code are ok
|
||||
if ($in_function && /^\s+\{/) {
|
||||
err("possible left brace starting a line");
|
||||
}
|
||||
}
|
||||
if (/^\s*else\W/) {
|
||||
if ($prev =~ /^\s*\}$/) {
|
||||
err_prefix($prev,
|
||||
|
Loading…
Reference in New Issue
Block a user