Skip to content

Commit 86a680b

Browse files
✔️ test: Lint scripts to make tests pass.
1 parent 2a85a21 commit 86a680b

File tree

9 files changed

+22
-6
lines changed

9 files changed

+22
-6
lines changed

.bin/cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ elif [ "$key" = 'airports' ] ; then
1616
fi
1717

1818
if [ "$KIND" = 'wikipedia' ] ; then
19+
# shellcheck disable=SC2086
1920
curl -s -L "$URL" | html-select table.wikitable | html2text --decode-errors replace -b 0 --reference-links $OPTIONS | less -S
2021
elif [ "$KIND" = 'csv' ] ; then
2122
curl -s -L "$URL" | less -S

.bin/mkv.extract.subtitles

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ for subtitle in "${subtitles[@]}"; do
6767
fi
6868

6969

70-
tracks[$i]="$id:$slug-$name$ext"
70+
tracks[i]="$id:$slug-$name$ext"
7171
i=$((i+1))
7272

7373
done

.bin/notes

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,20 @@ if [ -z "$EDITOR" ] && type editor &>/dev/null; then
2727
EDITOR=editor
2828
fi
2929

30+
# shellcheck disable=SC2317
3031
without_notes_dir() {
3132
cat | sed -e "s/^$escaped_notes_dir//g" | sed -E "s/^\/+//g"
3233
}
3334

3435
FIND_FILTER=(-not -path '*/\.*' -type f)
3536

37+
# shellcheck disable=SC2317
3638
_find_notes() {
3739
local root="$1" && shift
3840
find "$root" "${FIND_FILTER[@]}" "$@"
3941
}
4042

43+
# shellcheck disable=SC2317
4144
ls_notes() {
4245
local ls_output
4346
ls_output=$(cd "$notes_dir" && ls "$@")
@@ -54,6 +57,7 @@ ls_notes() {
5457
fi
5558
}
5659

60+
# shellcheck disable=SC2317
5761
find_notes() {
5862
local find_output
5963
find_output=$(_find_notes "$notes_dir" -ipath "$notes_dir/*$**" 2>&1)
@@ -69,6 +73,7 @@ find_notes() {
6973
fi
7074
}
7175

76+
# shellcheck disable=SC2317
7277
grep_notes() {
7378
if [ ! "$#" -gt 0 ]; then
7479
printf "Grep requires a pattern, but none was provided."
@@ -89,6 +94,7 @@ grep_notes() {
8994
fi
9095
}
9196

97+
# shellcheck disable=SC2317
9298
search_filenames_and_contents() {
9399
if [ "$#" -gt 0 ]; then
94100
formatted_output="$({ find_notes "$@" ; grep_notes "$@" ; })"
@@ -103,6 +109,7 @@ search_filenames_and_contents() {
103109
fi
104110
}
105111

112+
# shellcheck disable=SC2317
106113
generate_name() {
107114
local append_num=0
108115
local format_string
@@ -117,6 +124,7 @@ generate_name() {
117124
printf '%s' "$resolved_name"
118125
}
119126

127+
# shellcheck disable=SC2317
120128
new_note() {
121129
local note_name="$*"
122130
if [[ $note_name == "" ]]; then
@@ -132,18 +140,21 @@ new_note() {
132140
open_note "$note_name"
133141
}
134142

143+
# shellcheck disable=SC2317
135144
remove_note() {
136145
pushd "$notes_dir" > /dev/null || exit
137146
rm -i "$@"
138147
popd > /dev/null || exit
139148
}
140149

150+
# shellcheck disable=SC2317
141151
trash_note() {
142152
pushd "$notes_dir" > /dev/null || exit
143153
trash-put -v "$@"
144154
popd > /dev/null || exit
145155
}
146156

157+
# shellcheck disable=SC2317
147158
handle_multiple_notes() {
148159
local cmd=$1
149160

@@ -157,6 +168,7 @@ handle_multiple_notes() {
157168
fi
158169
}
159170

171+
# shellcheck disable=SC2317
160172
get_full_note_path() {
161173
local note_path=$1
162174

@@ -170,6 +182,7 @@ get_full_note_path() {
170182
echo "$note_path"
171183
}
172184

185+
# shellcheck disable=SC2317
173186
open_note() {
174187
local note_path=$1
175188

@@ -190,6 +203,7 @@ open_note() {
190203

191204
}
192205

206+
# shellcheck disable=SC2317
193207
cat_note() {
194208
local note_path=$1
195209

.bin/onchange

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
i=0
5858
files=()
5959
while [ "$1" != '-c' ] && [ "$#" -gt 0 ] ; do
60-
files[$i]="$1"
60+
files[i]="$1"
6161
i=$((i+1))
6262
shift
6363
done
@@ -66,7 +66,7 @@ shift
6666
i=0
6767
cmd=()
6868
while [ "$#" -gt 0 ] ; do
69-
cmd[$i]="$1"
69+
cmd[i]="$1"
7070
i=$((i+1))
7171
shift
7272
done

.bin/service.unhang

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@ if [ "$DELTA" -gt "$WAIT" ] ; then
3232
>&2 echo "Error :("
3333
fi
3434
exit "$EC"
35-
systemctl restart --user "$UNIT"
36-
exit "$?"
3735
fi
3836

3937
# unit still running

.bin/tunnel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,5 @@ if [ -z "$escaped_args" ] ; then
1414
exit 3
1515
fi
1616

17+
# shellcheck disable=SC2086
1718
systemctl --user "$action" $flags tunnel@"${escaped_args}".service

.bin/update

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,7 @@ function _check ( ) {
194194

195195
}
196196

197+
# shellcheck disable=SC2317
197198
function _trap ( ) {
198199
echo '! TRAP'
199200
echo ' > There was an error!'

.bin/wifi.ui.profile.stop

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env sh
22

3-
for profile in "$(wifi.profiles.running)"; do
3+
for profile in $(wifi.profiles.running); do
44
wifi.profile.stop "$profile"
55
done

bootstrap/install-arch

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ function _check ( ) {
2828
fi
2929
}
3030

31+
# shellcheck disable=SC2317
3132
function _trap ( ) {
3233
echo '! TRAP'
3334
echo ' > There was an error!'

0 commit comments

Comments
 (0)