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() {
23
23
done
24
24
}
25
25
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
+
26
34
FILES=()
27
- # Build potential options list (may just be files )
35
+ # Assume start of file list (may still be options )
28
36
#
29
37
while [ $# -gt 0 ] && [ " $1 " != " -" ] && [ " $1 " != " --" ]; do
30
38
FILES+=(" $1 " )
31
39
shift
32
40
done
33
41
34
- OPTIONS=()
35
42
# If '--' next, then files = options
36
43
#
37
44
if [ $# -gt 0 ]; then
38
45
if [ " $1 " == " -" ] || [ " $1 " == " --" ]; then
39
46
shift
40
- OPTIONS=(" ${FILES[@]} " )
47
+ # Append to previous options
48
+ #
49
+ OPTIONS=(" ${OPTIONS[@]} " " ${FILES[@]} " )
41
50
FILES=()
42
51
fi
43
52
fi
44
53
45
- # Any remaining items are files
54
+ # Any remaining arguments are assumed to be files
46
55
#
47
56
while [ $# -gt 0 ]; do
48
57
FILES+=(" $1 " )
Original file line number Diff line number Diff line change @@ -4,26 +4,35 @@ cmd=(go build -o /dev/null)
4
4
5
5
export GO111MODULE=off
6
6
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
+
7
15
FILES=()
8
- # Build potential options list (may just be files )
16
+ # Assume start of file list (may still be options )
9
17
#
10
18
while [ $# -gt 0 ] && [ " $1 " != " -" ] && [ " $1 " != " --" ]; do
11
19
FILES+=(" $1 " )
12
20
shift
13
21
done
14
22
15
- OPTIONS=()
16
23
# If '--' next, then files = options
17
24
#
18
25
if [ $# -gt 0 ]; then
19
26
if [ " $1 " == " -" ] || [ " $1 " == " --" ]; then
20
27
shift
21
- OPTIONS=(" ${FILES[@]} " )
28
+ # Append to previous options
29
+ #
30
+ OPTIONS=(" ${OPTIONS[@]} " " ${FILES[@]} " )
22
31
FILES=()
23
32
fi
24
33
fi
25
34
26
- # Any remaining items are files
35
+ # Any remaining arguments are assumed to be files
27
36
#
28
37
while [ $# -gt 0 ]; do
29
38
FILES+=(" $1 " )
Original file line number Diff line number Diff line change 2
2
3
3
cmd=(gocritic check)
4
4
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
+
5
13
FILES=()
6
- # Build potential options list (may just be files )
14
+ # Assume start of file list (may still be options )
7
15
#
8
16
while [ $# -gt 0 ] && [ " $1 " != " -" ] && [ " $1 " != " --" ]; do
9
17
FILES+=(" $1 " )
10
18
shift
11
19
done
12
20
13
- OPTIONS=()
14
21
# If '--' next, then files = options
15
22
#
16
23
if [ $# -gt 0 ]; then
17
24
if [ " $1 " == " -" ] || [ " $1 " == " --" ]; then
18
25
shift
19
- OPTIONS=(" ${FILES[@]} " )
26
+ # Append to previous options
27
+ #
28
+ OPTIONS=(" ${OPTIONS[@]} " " ${FILES[@]} " )
20
29
FILES=()
21
30
fi
22
31
fi
23
32
24
- # Any remaining items are files
33
+ # Any remaining arguments are assumed to be files
25
34
#
26
35
while [ $# -gt 0 ]; do
27
36
FILES+=(" $1 " )
Original file line number Diff line number Diff line change 2
2
3
3
cmd=(gofmt -l -d)
4
4
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
+
5
13
FILES=()
6
- # Build potential options list (may just be files )
14
+ # Assume start of file list (may still be options )
7
15
#
8
16
while [ $# -gt 0 ] && [ " $1 " != " -" ] && [ " $1 " != " --" ]; do
9
17
FILES+=(" $1 " )
10
18
shift
11
19
done
12
20
13
- OPTIONS=()
14
21
# If '--' next, then files = options
15
22
#
16
23
if [ $# -gt 0 ]; then
17
24
if [ " $1 " == " -" ] || [ " $1 " == " --" ]; then
18
25
shift
19
- OPTIONS=(" ${FILES[@]} " )
26
+ # Append to previous options
27
+ #
28
+ OPTIONS=(" ${OPTIONS[@]} " " ${FILES[@]} " )
20
29
FILES=()
21
30
fi
22
31
fi
23
32
24
- # Any remaining items are files
33
+ # Any remaining arguments are assumed to be files
25
34
#
26
35
while [ $# -gt 0 ]; do
27
36
FILES+=(" $1 " )
Original file line number Diff line number Diff line change 2
2
3
3
cmd=(goimports -l -d)
4
4
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
+
5
13
FILES=()
6
- # Build potential options list (may just be files )
14
+ # Assume start of file list (may still be options )
7
15
#
8
16
while [ $# -gt 0 ] && [ " $1 " != " -" ] && [ " $1 " != " --" ]; do
9
17
FILES+=(" $1 " )
10
18
shift
11
19
done
12
20
13
- OPTIONS=()
14
21
# If '--' next, then files = options
15
22
#
16
23
if [ $# -gt 0 ]; then
17
24
if [ " $1 " == " -" ] || [ " $1 " == " --" ]; then
18
25
shift
19
- OPTIONS=(" ${FILES[@]} " )
26
+ # Append to previous options
27
+ #
28
+ OPTIONS=(" ${OPTIONS[@]} " " ${FILES[@]} " )
20
29
FILES=()
21
30
fi
22
31
fi
23
32
24
- # Any remaining items are files
33
+ # Any remaining arguments are assumed to be files
25
34
#
26
35
while [ $# -gt 0 ]; do
27
36
FILES+=(" $1 " )
Original file line number Diff line number Diff line change 2
2
3
3
cmd=(golint -set_exit_status)
4
4
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
+
5
13
FILES=()
6
- # Build potential options list (may just be files )
14
+ # Assume start of file list (may still be options )
7
15
#
8
16
while [ $# -gt 0 ] && [ " $1 " != " -" ] && [ " $1 " != " --" ]; do
9
17
FILES+=(" $1 " )
10
18
shift
11
19
done
12
20
13
- OPTIONS=()
14
21
# If '--' next, then files = options
15
22
#
16
23
if [ $# -gt 0 ]; then
17
24
if [ " $1 " == " -" ] || [ " $1 " == " --" ]; then
18
25
shift
19
- OPTIONS=(" ${FILES[@]} " )
26
+ # Append to previous options
27
+ #
28
+ OPTIONS=(" ${OPTIONS[@]} " " ${FILES[@]} " )
20
29
FILES=()
21
30
fi
22
31
fi
23
32
24
- # Any remaining items are files
33
+ # Any remaining arguments are assumed to be files
25
34
#
26
35
while [ $# -gt 0 ]; do
27
36
FILES+=(" $1 " )
Original file line number Diff line number Diff line change 2
2
3
3
cmd=(goreturns -l -d)
4
4
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
+
5
13
FILES=()
6
- # Build potential options list (may just be files )
14
+ # Assume start of file list (may still be options )
7
15
#
8
16
while [ $# -gt 0 ] && [ " $1 " != " -" ] && [ " $1 " != " --" ]; do
9
17
FILES+=(" $1 " )
10
18
shift
11
19
done
12
20
13
- OPTIONS=()
14
21
# If '--' next, then files = options
15
22
#
16
23
if [ $# -gt 0 ]; then
17
24
if [ " $1 " == " -" ] || [ " $1 " == " --" ]; then
18
25
shift
19
- OPTIONS=(" ${FILES[@]} " )
26
+ # Append to previous options
27
+ #
28
+ OPTIONS=(" ${OPTIONS[@]} " " ${FILES[@]} " )
20
29
FILES=()
21
30
fi
22
31
fi
23
32
24
- # Any remaining items are files
33
+ # Any remaining arguments are assumed to be files
25
34
#
26
35
while [ $# -gt 0 ]; do
27
36
FILES+=(" $1 " )
Original file line number Diff line number Diff line change @@ -23,26 +23,35 @@ function find_module_roots() {
23
23
done
24
24
}
25
25
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
+
26
34
FILES=()
27
- # Build potential options list (may just be files )
35
+ # Assume start of file list (may still be options )
28
36
#
29
37
while [ $# -gt 0 ] && [ " $1 " != " -" ] && [ " $1 " != " --" ]; do
30
38
FILES+=(" $1 " )
31
39
shift
32
40
done
33
41
34
- OPTIONS=()
35
42
# If '--' next, then files = options
36
43
#
37
44
if [ $# -gt 0 ]; then
38
45
if [ " $1 " == " -" ] || [ " $1 " == " --" ]; then
39
46
shift
40
- OPTIONS=(" ${FILES[@]} " )
47
+ # Append to previous options
48
+ #
49
+ OPTIONS=(" ${OPTIONS[@]} " " ${FILES[@]} " )
41
50
FILES=()
42
51
fi
43
52
fi
44
53
45
- # Any remaining items are files
54
+ # Any remaining arguments are assumed to be files
46
55
#
47
56
while [ $# -gt 0 ]; do
48
57
FILES+=(" $1 " )
Original file line number Diff line number Diff line change @@ -4,26 +4,35 @@ cmd=(go test)
4
4
5
5
export GO111MODULE=off
6
6
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
+
7
15
FILES=()
8
- # Build potential options list (may just be files )
16
+ # Assume start of file list (may still be options )
9
17
#
10
18
while [ $# -gt 0 ] && [ " $1 " != " -" ] && [ " $1 " != " --" ]; do
11
19
FILES+=(" $1 " )
12
20
shift
13
21
done
14
22
15
- OPTIONS=()
16
23
# If '--' next, then files = options
17
24
#
18
25
if [ $# -gt 0 ]; then
19
26
if [ " $1 " == " -" ] || [ " $1 " == " --" ]; then
20
27
shift
21
- OPTIONS=(" ${FILES[@]} " )
28
+ # Append to previous options
29
+ #
30
+ OPTIONS=(" ${OPTIONS[@]} " " ${FILES[@]} " )
22
31
FILES=()
23
32
fi
24
33
fi
25
34
26
- # Any remaining items are files
35
+ # Any remaining arguments are assumed to be files
27
36
#
28
37
while [ $# -gt 0 ]; do
29
38
FILES+=(" $1 " )
Original file line number Diff line number Diff line change @@ -23,26 +23,35 @@ function find_module_roots() {
23
23
done
24
24
}
25
25
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
+
26
34
FILES=()
27
- # Build potential options list (may just be files )
35
+ # Assume start of file list (may still be options )
28
36
#
29
37
while [ $# -gt 0 ] && [ " $1 " != " -" ] && [ " $1 " != " --" ]; do
30
38
FILES+=(" $1 " )
31
39
shift
32
40
done
33
41
34
- OPTIONS=()
35
42
# If '--' next, then files = options
36
43
#
37
44
if [ $# -gt 0 ]; then
38
45
if [ " $1 " == " -" ] || [ " $1 " == " --" ]; then
39
46
shift
40
- OPTIONS=(" ${FILES[@]} " )
47
+ # Append to previous options
48
+ #
49
+ OPTIONS=(" ${OPTIONS[@]} " " ${FILES[@]} " )
41
50
FILES=()
42
51
fi
43
52
fi
44
53
45
- # Any remaining items are files
54
+ # Any remaining arguments are assumed to be files
46
55
#
47
56
while [ $# -gt 0 ]; do
48
57
FILES+=(" $1 " )
You can’t perform that action at this time.
0 commit comments