Commit 3809604
fetch-configlet: make some variables local
From e.g. the Google Shell Style Guide [1]:
Ensure that local variables are only seen inside a function and its
children by using `local` when declaring them. This avoids polluting
the global name space and inadvertently setting variables that may
have significance outside the function.
Declaration and assignment must be separate statements when the
assignment value is provided by a command substitution; as the
`local` builtin does not propagate the exit code from the command
substitution.
[1] https://google.github.io/styleguide/shellguide.html#use-local-variables
exercism/configlet#6911 parent 692b9b9 commit 3809604
1 file changed
+35
-29
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | 9 | | |
33 | 10 | | |
34 | 11 | | |
| |||
41 | 18 | | |
42 | 19 | | |
43 | 20 | | |
44 | | - | |
45 | | - | |
46 | 21 | | |
47 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
48 | 34 | | |
49 | 35 | | |
50 | 36 | | |
51 | 37 | | |
52 | 38 | | |
| 39 | + | |
53 | 40 | | |
54 | 41 | | |
55 | 42 | | |
| |||
59 | 46 | | |
60 | 47 | | |
61 | 48 | | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
62 | 65 | | |
63 | | - | |
64 | | - | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
65 | 69 | | |
66 | 70 | | |
67 | 71 | | |
| |||
71 | 75 | | |
72 | 76 | | |
73 | 77 | | |
| 78 | + | |
74 | 79 | | |
75 | 80 | | |
76 | 81 | | |
77 | 82 | | |
78 | 83 | | |
79 | | - | |
| 84 | + | |
| 85 | + | |
80 | 86 | | |
81 | 87 | | |
82 | 88 | | |
| |||
0 commit comments