Accepting request 988744 from system:packagemanager
OBS-URL: https://build.opensuse.org/request/show/988744 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/devscripts?expand=0&rev=12factory
commit
7443b2d92d
@ -1,79 +0,0 @@
|
||||
diff --git a/scripts/checkbashisms.1 b/scripts/checkbashisms.1
|
||||
index 6df5f3c7..1075408a 100644
|
||||
--- a/scripts/checkbashisms.1
|
||||
+++ b/scripts/checkbashisms.1
|
||||
@@ -44,6 +44,9 @@ which may be ignored.
|
||||
For example, the use of "\fB$BASH_ENV\fR" may be preceded by checking
|
||||
whether "\fB$BASH\fR" is set.
|
||||
.TP
|
||||
+.BR \-\-early-fail ", " \-e
|
||||
+Exit right after a first error is seen.
|
||||
+.TP
|
||||
.BR \-\-version ", " \-v
|
||||
Show version and copyright information.
|
||||
.SH "EXIT VALUES"
|
||||
diff --git a/scripts/checkbashisms.bash_completion b/scripts/checkbashisms.bash_completion
|
||||
index 4ce5b521..b0e30fdf 100644
|
||||
--- a/scripts/checkbashisms.bash_completion
|
||||
+++ b/scripts/checkbashisms.bash_completion
|
||||
@@ -10,7 +10,7 @@ _checkbashisms()
|
||||
_init_completion || return
|
||||
|
||||
if [[ "$cur" == -* ]]; then
|
||||
- COMPREPLY=( $( compgen -W '--newline --posix --force --extra' -- "$cur" ) )
|
||||
+ COMPREPLY=( $( compgen -W '--newline --posix --force --extra --early-fail' -- "$cur" ) )
|
||||
else
|
||||
COMPREPLY=( $( compgen -o filenames -f -- "$cur" ) )
|
||||
fi
|
||||
diff --git a/scripts/checkbashisms.pl b/scripts/checkbashisms.pl
|
||||
index 653ec1bb..568e2c33 100755
|
||||
--- a/scripts/checkbashisms.pl
|
||||
+++ b/scripts/checkbashisms.pl
|
||||
@@ -30,7 +30,7 @@ sub init_hashes;
|
||||
(my $progname = $0) =~ s|.*/||;
|
||||
|
||||
my $usage = <<"EOF";
|
||||
-Usage: $progname [-n] [-f] [-x] script ...
|
||||
+Usage: $progname [-n] [-f] [-x] [-e] script ...
|
||||
or: $progname --help
|
||||
or: $progname --version
|
||||
This script performs basic checks for the presence of bashisms
|
||||
@@ -47,7 +47,7 @@ You are free to redistribute this code under the terms of the
|
||||
GNU General Public License, version 2, or (at your option) any later version.
|
||||
EOF
|
||||
|
||||
-my ($opt_echo, $opt_force, $opt_extra, $opt_posix);
|
||||
+my ($opt_echo, $opt_force, $opt_extra, $opt_posix, $opt_early_fail);
|
||||
my ($opt_help, $opt_version);
|
||||
my @filenames;
|
||||
|
||||
@@ -62,12 +62,13 @@ if (scalar(@ARGV) == 0 && (-p STDIN or -f STDIN)) {
|
||||
$opt_help = 1 if int(@ARGV) == 0;
|
||||
|
||||
GetOptions(
|
||||
- "help|h" => \$opt_help,
|
||||
- "version|v" => \$opt_version,
|
||||
- "newline|n" => \$opt_echo,
|
||||
- "force|f" => \$opt_force,
|
||||
- "extra|x" => \$opt_extra,
|
||||
- "posix|p" => \$opt_posix,
|
||||
+ "help|h" => \$opt_help,
|
||||
+ "version|v" => \$opt_version,
|
||||
+ "newline|n" => \$opt_echo,
|
||||
+ "force|f" => \$opt_force,
|
||||
+ "extra|x" => \$opt_extra,
|
||||
+ "posix|p" => \$opt_posix,
|
||||
+ "early-fail|e" => \$opt_early_fail,
|
||||
)
|
||||
or die
|
||||
"Usage: $progname [options] filelist\nRun $progname --help for more details\n";
|
||||
@@ -543,6 +544,9 @@ sub output_explanation {
|
||||
$issues = 1;
|
||||
} else {
|
||||
warn "possible bashism in $filename line $. ($explanation):\n$line\n";
|
||||
+ if ($opt_early_fail) {
|
||||
+ exit 1;
|
||||
+ }
|
||||
$status |= 1;
|
||||
}
|
||||
}
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:30344ce41f553ce01bc9f71b4e539d0833900267d77e65710959b1ec0f00c2ca
|
||||
size 1102199
|
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:c81823ecb906aa421e78c8efda05bc76126466421a7587e66a3c2dd1ed906909
|
||||
size 1378584
|
Loading…
Reference in New Issue