mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-26 19:19:32 +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
|
The checks have some limitations; see
|
||||||
.Sy CONTINUATION CHECKING ,
|
.Sy CONTINUATION CHECKING ,
|
||||||
below.
|
below.
|
||||||
.It Fl h
|
|
||||||
Performs heuristic checks that are sometimes wrong.
|
|
||||||
Not generally used.
|
|
||||||
.It Fl p
|
.It Fl p
|
||||||
Performs some of the more picky checks.
|
Performs some of the more picky checks.
|
||||||
Includes ANSI
|
Includes ANSI
|
||||||
|
@ -58,10 +58,9 @@ use Getopt::Std;
|
|||||||
use strict;
|
use strict;
|
||||||
|
|
||||||
my $usage =
|
my $usage =
|
||||||
"usage: cstyle [-cghpvP] file...
|
"usage: cstyle [-cgpvP] file...
|
||||||
-c check continuation indentation inside functions
|
-c check continuation indentation inside functions
|
||||||
-g print github actions' workflow commands
|
-g print github actions' workflow commands
|
||||||
-h perform heuristic checks that are sometimes wrong
|
|
||||||
-p perform some of the more picky checks
|
-p perform some of the more picky checks
|
||||||
-v verbose
|
-v verbose
|
||||||
-P check for use of non-POSIX types
|
-P check for use of non-POSIX types
|
||||||
@ -76,7 +75,6 @@ if (!getopts("cghpvCP", \%opts)) {
|
|||||||
|
|
||||||
my $check_continuation = $opts{'c'};
|
my $check_continuation = $opts{'c'};
|
||||||
my $github_workflow = $opts{'g'} || $ENV{'CI'};
|
my $github_workflow = $opts{'g'} || $ENV{'CI'};
|
||||||
my $heuristic = $opts{'h'};
|
|
||||||
my $picky = $opts{'p'};
|
my $picky = $opts{'p'};
|
||||||
my $verbose = $opts{'v'};
|
my $verbose = $opts{'v'};
|
||||||
my $check_posix_types = $opts{'P'};
|
my $check_posix_types = $opts{'P'};
|
||||||
@ -691,19 +689,6 @@ line: while (<$filehandle>) {
|
|||||||
err("non-POSIX typedef $1 used: use $old2posix{$1} instead");
|
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 (/^\s*else\W/) {
|
||||||
if ($prev =~ /^\s*\}$/) {
|
if ($prev =~ /^\s*\}$/) {
|
||||||
err_prefix($prev,
|
err_prefix($prev,
|
||||||
|
Loading…
Reference in New Issue
Block a user