Skip to content

Commit 3b3aa3d

Browse files
authored
Adopt the new shellcheck warnings numbers (#146)
* shellcheck: disable function names with - * shellcheck: disable warning while using 'local' * shellcheck: fix more warnings * vnet-start: fix an error message * shellcheck: fix pipefail warning * shellcheck: fix shubshell related warnings
1 parent c89a171 commit 3b3aa3d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+291
-276
lines changed

share/pot/add-dep.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/sh
22
:
33

4-
# shellcheck disable=SC2039
4+
# shellcheck disable=SC3033
55
add-dep-help()
66
{
77
echo "pot add-dep [-hv] -p pot -P depPot"
@@ -15,18 +15,18 @@ add-dep-help()
1515
# $2 depPot
1616
_add_dependency()
1717
{
18-
# shellcheck disable=SC2039
18+
# shellcheck disable=SC3043
1919
local _depPot _pname _cdir
2020
_pname="$1"
2121
_depPot="$2"
2222
_cdir=$POT_FS_ROOT/jails/$_pname/conf
2323
echo "pot.depend=$_depPot" >> "$_cdir"/pot.conf
2424
}
2525

26-
# shellcheck disable=SC2039
26+
# shellcheck disable=SC3033
2727
pot-add-dep()
2828
{
29-
# shellcheck disable=SC2039
29+
# shellcheck disable=SC3043
3030
local _pname _depPot
3131
_depPot=
3232
_pname=

share/pot/clone-fscomp.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/sh
22
:
33

4-
# shellcheck disable=SC2039
4+
# shellcheck disable=SC3033
55
clone-fscomp-help()
66
{
77
echo "pot clone-fscomp [-hv] -f fscomp -F fscomp"
@@ -15,7 +15,7 @@ clone-fscomp-help()
1515
# $2 old fscomp name
1616
_cf_zfs()
1717
{
18-
# shellcheck disable=SC2039
18+
# shellcheck disable=SC3043
1919
local _fscomp _cfscomp _fsdset _fsdir _snap
2020
_fscomp=$1
2121
_cfscomp=$2
@@ -32,10 +32,10 @@ _cf_zfs()
3232
return 0 # true
3333
}
3434

35-
# shellcheck disable=SC2039
35+
# shellcheck disable=SC3033
3636
pot-clone-fscomp()
3737
{
38-
# shellcheck disable=SC2039
38+
# shellcheck disable=SC3043
3939
local _fscomp _cfscomp
4040
_fscomp=
4141
_cfscomp=

share/pot/clone.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
trap _cj_undo_clone TERM INT
55
_set_pipefail
66

7-
# shellcheck disable=SC2039
7+
# shellcheck disable=SC3033
88
clone-help()
99
{
1010
echo "pot clone [-hvF] -p potname -P basepot [-i ipaddr]"
@@ -44,7 +44,7 @@ _cj_undo_clone()
4444
# $4 custom snapshot tag
4545
_cj_zfs()
4646
{
47-
# shellcheck disable=SC2039
47+
# shellcheck disable=SC3043
4848
local _pname _potbase _jdset _pdir _pbdir _pbdset _mnt_p _opt _autosnap _snaptag _pb_type _snap __last_snap
4949
_pname=$1
5050
_potbase=$2
@@ -179,7 +179,7 @@ _cj_zfs()
179179
# $6 network stack
180180
_cj_conf()
181181
{
182-
# shellcheck disable=SC2039
182+
# shellcheck disable=SC3043
183183
local _pname _potbase _ip _network_type _bridge_name _stack
184184
_pname=$1
185185
_potbase=$2
@@ -233,10 +233,10 @@ _cj_conf()
233233
fi
234234
}
235235

236-
# shellcheck disable=SC2039
236+
# shellcheck disable=SC3033
237237
pot-clone()
238238
{
239-
# shellcheck disable=SC2039
239+
# shellcheck disable=SC3043
240240
local _pname _ipaddr _potbase _pblvl _autosnap _pb_type _pb_network_type _network_type _bridge_name _network_stack _snap _flv
241241
_pname=
242242
_ipaddr=

share/pot/common-flv.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# $2 : the set-cmd line in the file
66
_flv_set_cmd()
77
{
8-
# shellcheck disable=SC2039
8+
# shellcheck disable=SC3043
99
local _pname _line _cmd
1010
_pname="$1"
1111
_line="$2"
@@ -19,7 +19,7 @@ _flv_set_cmd()
1919

2020
_exec_flv()
2121
{
22-
# shellcheck disable=SC2039
22+
# shellcheck disable=SC3043
2323
local _pname _flv _pdir
2424
_pname=$1
2525
_flv=$2

0 commit comments

Comments
 (0)