File tree Expand file tree Collapse file tree 15 files changed +195
-60
lines changed Expand file tree Collapse file tree 15 files changed +195
-60
lines changed Original file line number Diff line number Diff line change @@ -23,26 +23,35 @@ function find_module_roots() {
2323 done
2424}
2525
26+ OPTIONS=()
27+ # If arg doesn't pass [ -f ] check, then it is assumed to be an option
28+ #
29+ while [ $# -gt 0 ] && [ " $1 " != " -" ] && [ " $1 " != " --" ] && [ ! -f " $1 " ]; do
30+ OPTIONS+=(" $1 " )
31+ shift
32+ done
33+
2634FILES=()
27- # Build potential options list (may just be files )
35+ # Assume start of file list (may still be options )
2836#
2937while [ $# -gt 0 ] && [ " $1 " != " -" ] && [ " $1 " != " --" ]; do
3038 FILES+=(" $1 " )
3139 shift
3240done
3341
34- OPTIONS=()
3542# If '--' next, then files = options
3643#
3744if [ $# -gt 0 ]; then
3845 if [ " $1 " == " -" ] || [ " $1 " == " --" ]; then
3946 shift
40- OPTIONS=(" ${FILES[@]} " )
47+ # Append to previous options
48+ #
49+ OPTIONS=(" ${OPTIONS[@]} " " ${FILES[@]} " )
4150 FILES=()
4251 fi
4352fi
4453
45- # Any remaining items are files
54+ # Any remaining arguments are assumed to be files
4655#
4756while [ $# -gt 0 ]; do
4857 FILES+=(" $1 " )
Original file line number Diff line number Diff line change @@ -4,26 +4,35 @@ cmd=(go build -o /dev/null)
44
55export GO111MODULE=off
66
7+ OPTIONS=()
8+ # If arg doesn't pass [ -f ] check, then it is assumed to be an option
9+ #
10+ while [ $# -gt 0 ] && [ " $1 " != " -" ] && [ " $1 " != " --" ] && [ ! -f " $1 " ]; do
11+ OPTIONS+=(" $1 " )
12+ shift
13+ done
14+
715FILES=()
8- # Build potential options list (may just be files )
16+ # Assume start of file list (may still be options )
917#
1018while [ $# -gt 0 ] && [ " $1 " != " -" ] && [ " $1 " != " --" ]; do
1119 FILES+=(" $1 " )
1220 shift
1321done
1422
15- OPTIONS=()
1623# If '--' next, then files = options
1724#
1825if [ $# -gt 0 ]; then
1926 if [ " $1 " == " -" ] || [ " $1 " == " --" ]; then
2027 shift
21- OPTIONS=(" ${FILES[@]} " )
28+ # Append to previous options
29+ #
30+ OPTIONS=(" ${OPTIONS[@]} " " ${FILES[@]} " )
2231 FILES=()
2332 fi
2433fi
2534
26- # Any remaining items are files
35+ # Any remaining arguments are assumed to be files
2736#
2837while [ $# -gt 0 ]; do
2938 FILES+=(" $1 " )
Original file line number Diff line number Diff line change 22
33cmd=(gocritic check)
44
5+ OPTIONS=()
6+ # If arg doesn't pass [ -f ] check, then it is assumed to be an option
7+ #
8+ while [ $# -gt 0 ] && [ " $1 " != " -" ] && [ " $1 " != " --" ] && [ ! -f " $1 " ]; do
9+ OPTIONS+=(" $1 " )
10+ shift
11+ done
12+
513FILES=()
6- # Build potential options list (may just be files )
14+ # Assume start of file list (may still be options )
715#
816while [ $# -gt 0 ] && [ " $1 " != " -" ] && [ " $1 " != " --" ]; do
917 FILES+=(" $1 " )
1018 shift
1119done
1220
13- OPTIONS=()
1421# If '--' next, then files = options
1522#
1623if [ $# -gt 0 ]; then
1724 if [ " $1 " == " -" ] || [ " $1 " == " --" ]; then
1825 shift
19- OPTIONS=(" ${FILES[@]} " )
26+ # Append to previous options
27+ #
28+ OPTIONS=(" ${OPTIONS[@]} " " ${FILES[@]} " )
2029 FILES=()
2130 fi
2231fi
2332
24- # Any remaining items are files
33+ # Any remaining arguments are assumed to be files
2534#
2635while [ $# -gt 0 ]; do
2736 FILES+=(" $1 " )
Original file line number Diff line number Diff line change 22
33cmd=(gofmt -l -d)
44
5+ OPTIONS=()
6+ # If arg doesn't pass [ -f ] check, then it is assumed to be an option
7+ #
8+ while [ $# -gt 0 ] && [ " $1 " != " -" ] && [ " $1 " != " --" ] && [ ! -f " $1 " ]; do
9+ OPTIONS+=(" $1 " )
10+ shift
11+ done
12+
513FILES=()
6- # Build potential options list (may just be files )
14+ # Assume start of file list (may still be options )
715#
816while [ $# -gt 0 ] && [ " $1 " != " -" ] && [ " $1 " != " --" ]; do
917 FILES+=(" $1 " )
1018 shift
1119done
1220
13- OPTIONS=()
1421# If '--' next, then files = options
1522#
1623if [ $# -gt 0 ]; then
1724 if [ " $1 " == " -" ] || [ " $1 " == " --" ]; then
1825 shift
19- OPTIONS=(" ${FILES[@]} " )
26+ # Append to previous options
27+ #
28+ OPTIONS=(" ${OPTIONS[@]} " " ${FILES[@]} " )
2029 FILES=()
2130 fi
2231fi
2332
24- # Any remaining items are files
33+ # Any remaining arguments are assumed to be files
2534#
2635while [ $# -gt 0 ]; do
2736 FILES+=(" $1 " )
Original file line number Diff line number Diff line change 22
33cmd=(goimports -l -d)
44
5+ OPTIONS=()
6+ # If arg doesn't pass [ -f ] check, then it is assumed to be an option
7+ #
8+ while [ $# -gt 0 ] && [ " $1 " != " -" ] && [ " $1 " != " --" ] && [ ! -f " $1 " ]; do
9+ OPTIONS+=(" $1 " )
10+ shift
11+ done
12+
513FILES=()
6- # Build potential options list (may just be files )
14+ # Assume start of file list (may still be options )
715#
816while [ $# -gt 0 ] && [ " $1 " != " -" ] && [ " $1 " != " --" ]; do
917 FILES+=(" $1 " )
1018 shift
1119done
1220
13- OPTIONS=()
1421# If '--' next, then files = options
1522#
1623if [ $# -gt 0 ]; then
1724 if [ " $1 " == " -" ] || [ " $1 " == " --" ]; then
1825 shift
19- OPTIONS=(" ${FILES[@]} " )
26+ # Append to previous options
27+ #
28+ OPTIONS=(" ${OPTIONS[@]} " " ${FILES[@]} " )
2029 FILES=()
2130 fi
2231fi
2332
24- # Any remaining items are files
33+ # Any remaining arguments are assumed to be files
2534#
2635while [ $# -gt 0 ]; do
2736 FILES+=(" $1 " )
Original file line number Diff line number Diff line change 22
33cmd=(golint -set_exit_status)
44
5+ OPTIONS=()
6+ # If arg doesn't pass [ -f ] check, then it is assumed to be an option
7+ #
8+ while [ $# -gt 0 ] && [ " $1 " != " -" ] && [ " $1 " != " --" ] && [ ! -f " $1 " ]; do
9+ OPTIONS+=(" $1 " )
10+ shift
11+ done
12+
513FILES=()
6- # Build potential options list (may just be files )
14+ # Assume start of file list (may still be options )
715#
816while [ $# -gt 0 ] && [ " $1 " != " -" ] && [ " $1 " != " --" ]; do
917 FILES+=(" $1 " )
1018 shift
1119done
1220
13- OPTIONS=()
1421# If '--' next, then files = options
1522#
1623if [ $# -gt 0 ]; then
1724 if [ " $1 " == " -" ] || [ " $1 " == " --" ]; then
1825 shift
19- OPTIONS=(" ${FILES[@]} " )
26+ # Append to previous options
27+ #
28+ OPTIONS=(" ${OPTIONS[@]} " " ${FILES[@]} " )
2029 FILES=()
2130 fi
2231fi
2332
24- # Any remaining items are files
33+ # Any remaining arguments are assumed to be files
2534#
2635while [ $# -gt 0 ]; do
2736 FILES+=(" $1 " )
Original file line number Diff line number Diff line change 22
33cmd=(goreturns -l -d)
44
5+ OPTIONS=()
6+ # If arg doesn't pass [ -f ] check, then it is assumed to be an option
7+ #
8+ while [ $# -gt 0 ] && [ " $1 " != " -" ] && [ " $1 " != " --" ] && [ ! -f " $1 " ]; do
9+ OPTIONS+=(" $1 " )
10+ shift
11+ done
12+
513FILES=()
6- # Build potential options list (may just be files )
14+ # Assume start of file list (may still be options )
715#
816while [ $# -gt 0 ] && [ " $1 " != " -" ] && [ " $1 " != " --" ]; do
917 FILES+=(" $1 " )
1018 shift
1119done
1220
13- OPTIONS=()
1421# If '--' next, then files = options
1522#
1623if [ $# -gt 0 ]; then
1724 if [ " $1 " == " -" ] || [ " $1 " == " --" ]; then
1825 shift
19- OPTIONS=(" ${FILES[@]} " )
26+ # Append to previous options
27+ #
28+ OPTIONS=(" ${OPTIONS[@]} " " ${FILES[@]} " )
2029 FILES=()
2130 fi
2231fi
2332
24- # Any remaining items are files
33+ # Any remaining arguments are assumed to be files
2534#
2635while [ $# -gt 0 ]; do
2736 FILES+=(" $1 " )
Original file line number Diff line number Diff line change @@ -23,26 +23,35 @@ function find_module_roots() {
2323 done
2424}
2525
26+ OPTIONS=()
27+ # If arg doesn't pass [ -f ] check, then it is assumed to be an option
28+ #
29+ while [ $# -gt 0 ] && [ " $1 " != " -" ] && [ " $1 " != " --" ] && [ ! -f " $1 " ]; do
30+ OPTIONS+=(" $1 " )
31+ shift
32+ done
33+
2634FILES=()
27- # Build potential options list (may just be files )
35+ # Assume start of file list (may still be options )
2836#
2937while [ $# -gt 0 ] && [ " $1 " != " -" ] && [ " $1 " != " --" ]; do
3038 FILES+=(" $1 " )
3139 shift
3240done
3341
34- OPTIONS=()
3542# If '--' next, then files = options
3643#
3744if [ $# -gt 0 ]; then
3845 if [ " $1 " == " -" ] || [ " $1 " == " --" ]; then
3946 shift
40- OPTIONS=(" ${FILES[@]} " )
47+ # Append to previous options
48+ #
49+ OPTIONS=(" ${OPTIONS[@]} " " ${FILES[@]} " )
4150 FILES=()
4251 fi
4352fi
4453
45- # Any remaining items are files
54+ # Any remaining arguments are assumed to be files
4655#
4756while [ $# -gt 0 ]; do
4857 FILES+=(" $1 " )
Original file line number Diff line number Diff line change @@ -4,26 +4,35 @@ cmd=(go test)
44
55export GO111MODULE=off
66
7+ OPTIONS=()
8+ # If arg doesn't pass [ -f ] check, then it is assumed to be an option
9+ #
10+ while [ $# -gt 0 ] && [ " $1 " != " -" ] && [ " $1 " != " --" ] && [ ! -f " $1 " ]; do
11+ OPTIONS+=(" $1 " )
12+ shift
13+ done
14+
715FILES=()
8- # Build potential options list (may just be files )
16+ # Assume start of file list (may still be options )
917#
1018while [ $# -gt 0 ] && [ " $1 " != " -" ] && [ " $1 " != " --" ]; do
1119 FILES+=(" $1 " )
1220 shift
1321done
1422
15- OPTIONS=()
1623# If '--' next, then files = options
1724#
1825if [ $# -gt 0 ]; then
1926 if [ " $1 " == " -" ] || [ " $1 " == " --" ]; then
2027 shift
21- OPTIONS=(" ${FILES[@]} " )
28+ # Append to previous options
29+ #
30+ OPTIONS=(" ${OPTIONS[@]} " " ${FILES[@]} " )
2231 FILES=()
2332 fi
2433fi
2534
26- # Any remaining items are files
35+ # Any remaining arguments are assumed to be files
2736#
2837while [ $# -gt 0 ]; do
2938 FILES+=(" $1 " )
Original file line number Diff line number Diff line change @@ -23,26 +23,35 @@ function find_module_roots() {
2323 done
2424}
2525
26+ OPTIONS=()
27+ # If arg doesn't pass [ -f ] check, then it is assumed to be an option
28+ #
29+ while [ $# -gt 0 ] && [ " $1 " != " -" ] && [ " $1 " != " --" ] && [ ! -f " $1 " ]; do
30+ OPTIONS+=(" $1 " )
31+ shift
32+ done
33+
2634FILES=()
27- # Build potential options list (may just be files )
35+ # Assume start of file list (may still be options )
2836#
2937while [ $# -gt 0 ] && [ " $1 " != " -" ] && [ " $1 " != " --" ]; do
3038 FILES+=(" $1 " )
3139 shift
3240done
3341
34- OPTIONS=()
3542# If '--' next, then files = options
3643#
3744if [ $# -gt 0 ]; then
3845 if [ " $1 " == " -" ] || [ " $1 " == " --" ]; then
3946 shift
40- OPTIONS=(" ${FILES[@]} " )
47+ # Append to previous options
48+ #
49+ OPTIONS=(" ${OPTIONS[@]} " " ${FILES[@]} " )
4150 FILES=()
4251 fi
4352fi
4453
45- # Any remaining items are files
54+ # Any remaining arguments are assumed to be files
4655#
4756while [ $# -gt 0 ]; do
4857 FILES+=(" $1 " )
You can’t perform that action at this time.
0 commit comments