Skip to content

Commit d0ed9d9

Browse files
chore: fix EditorConfig lint errors #6925
Signed-off-by: Lalit Narayan Yadav <[email protected]>
1 parent b111ec5 commit d0ed9d9

File tree

1 file changed

+47
-47
lines changed
  • lib/node_modules/@stdlib/_tools/scaffold/math-strided-binary-by/scripts

1 file changed

+47
-47
lines changed

lib/node_modules/@stdlib/_tools/scaffold/math-strided-binary-by/scripts/scaffold.sh

Lines changed: 47 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ keywords=(
7878
"summation"
7979
)
8080
else
81-
IFS=','; read -ra keywords <<< "${KEYWORDS}"; IFS=' ';
81+
IFS=','; read -ra keywords <<< "${KEYWORDS}"; IFS=' ';
8282
fi
8383

8484
# Define the minimum value of generated values when benchmarking and testing the implementation:
@@ -100,7 +100,7 @@ x_values_len_8=(
100100
'8.0'
101101
)
102102
else
103-
IFS=','; read -ra x_values_len_8 <<< "${X_VALUES_LEN_8}"; IFS=' ';
103+
IFS=','; read -ra x_values_len_8 <<< "${X_VALUES_LEN_8}"; IFS=' ';
104104
fi
105105

106106
# Define a list of values for second input array:
@@ -116,7 +116,7 @@ y_values_len_8=(
116116
'18.0'
117117
)
118118
else
119-
IFS=','; read -ra y_values_len_8 <<< "${Y_VALUES_LEN_8}"; IFS=' ';
119+
IFS=','; read -ra y_values_len_8 <<< "${Y_VALUES_LEN_8}"; IFS=' ';
120120
fi
121121

122122
# Define callback return data types:
@@ -130,7 +130,7 @@ ts_callback_ret_2_dtype=${TS_CALLBACK_RET_2_DTYPE:-'number'}
130130
#
131131
# $1 - string to convert
132132
camelcase_to_snakecase() {
133-
echo "$1" | sed 's/\([^A-Z]\)\([A-Z]\)/\1_\2/g' | sed 's/\([A-Z]\)\([A-Z]\)\([^A-Z]\)/\1_\2\3/g' | tr '[:upper:]' '[:lower:]'
133+
echo "$1" | sed 's/\([^A-Z]\)\([A-Z]\)/\1_\2/g' | sed 's/\([A-Z]\)\([A-Z]\)\([^A-Z]\)/\1_\2\3/g' | tr '[:upper:]' '[:lower:]'
134134
}
135135

136136
# Convert the alias to snakecase:
@@ -196,19 +196,19 @@ copyright='The Stdlib Authors'
196196

197197
# Define lists of array values:
198198
x_values_len_4=(
199-
"${x_values_len_8[0]}"
200-
"${x_values_len_8[1]}"
201-
"${x_values_len_8[2]}"
202-
"${x_values_len_8[3]}"
199+
"${x_values_len_8[0]}"
200+
"${x_values_len_8[1]}"
201+
"${x_values_len_8[2]}"
202+
"${x_values_len_8[3]}"
203203
)
204204
x_values_len_5=("${x_values_len_4[@]}" "${x_values_len_8[4]}")
205205
x_values_len_6=("${x_values_len_5[@]}" "${x_values_len_8[5]}")
206206

207207
y_values_len_4=(
208-
"${y_values_len_8[0]}"
209-
"${y_values_len_8[1]}"
210-
"${y_values_len_8[2]}"
211-
"${y_values_len_8[3]}"
208+
"${y_values_len_8[0]}"
209+
"${y_values_len_8[1]}"
210+
"${y_values_len_8[2]}"
211+
"${y_values_len_8[3]}"
212212
)
213213
y_values_len_5=("${y_values_len_4[@]}" "${y_values_len_8[4]}")
214214
y_values_len_6=("${y_values_len_5[@]}" "${y_values_len_8[5]}")
@@ -221,45 +221,45 @@ IFS=','; read -ra expected_values <<< "${tmp}"; IFS=' ';
221221

222222
# Extract the elements along the diagonal:
223223
expected_len_6=(
224-
"${expected_values[0]}"
225-
"${expected_values[7]}"
226-
"${expected_values[14]}"
227-
"${expected_values[21]}"
228-
"${expected_values[28]}"
229-
"${expected_values[35]}"
224+
"${expected_values[0]}"
225+
"${expected_values[7]}"
226+
"${expected_values[14]}"
227+
"${expected_values[21]}"
228+
"${expected_values[28]}"
229+
"${expected_values[35]}"
230230
)
231231
expected_len_4=(
232-
"${expected_len_6[0]}"
233-
"${expected_len_6[1]}"
234-
"${expected_len_6[2]}"
235-
"${expected_len_6[3]}"
232+
"${expected_len_6[0]}"
233+
"${expected_len_6[1]}"
234+
"${expected_len_6[2]}"
235+
"${expected_len_6[3]}"
236236
)
237237
expected_len_5=("${expected_len_4[@]}" "${expected_len_6[4]}")
238238

239239
# Expected values when `x` has stride `2`, `y` has stride `-1`, and `z` has stride `1` (x0y1, x2y0):
240240
expected_len_2_x2_ym1_z1=(
241-
"${expected_values[1]}"
242-
"${expected_values[12]}"
241+
"${expected_values[1]}"
242+
"${expected_values[12]}"
243243
)
244244

245245
# Expected values when starting at 2nd element of `x` and the 3rd element of `y` and where `x` has stride `-2`, `y` has stride `1`, and `z` has stride `1` (x3y2, x1y3):
246246
expected_len_2_xm2_y1_z1=(
247-
"${expected_values[20]}"
248-
"${expected_values[9]}"
247+
"${expected_values[20]}"
248+
"${expected_values[9]}"
249249
)
250250

251251
# Expected values when `x` has stride `2`, `y` has stride `-1`, and `z` has stride `1` (x0y2, x2y1, x4y0):
252252
expected_len_3_x2_ym1_z1=(
253-
"${expected_values[2]}"
254-
"${expected_values[13]}"
255-
"${expected_values[24]}"
253+
"${expected_values[2]}"
254+
"${expected_values[13]}"
255+
"${expected_values[24]}"
256256
)
257257

258258
# Expected values when starting at 2nd element of `x` and the 4th element of `y` and where `x` has stride `-2`, `y` has stride `1`, and `z` has stride `1` (x5y3, x3y4, x1y5):
259259
expected_len_3_xm2_y1_z1=(
260-
"${expected_values[33]}"
261-
"${expected_values[22]}"
262-
"${expected_values[11]}"
260+
"${expected_values[33]}"
261+
"${expected_values[22]}"
262+
"${expected_values[11]}"
263263
)
264264

265265

@@ -296,35 +296,35 @@ files=(
296296
# Create the destination directories...
297297

298298
for dir in "${dirs[@]}"; do
299-
mkdir -p "${dest_dir}/${dir}"
299+
mkdir -p "${dest_dir}/${dir}"
300300
done
301301

302302
# Copy the scaffold files to the destination directory...
303303
for file in "${files[@]}"; do
304-
cp "${this_dir}/data/${file//\./__}.txt" "${dest_dir}/${file}"
304+
cp "${this_dir}/data/${file//\./__}.txt" "${dest_dir}/${file}"
305305
done
306306

307307
# Performs a find and replace across the destination directory.
308308
#
309309
# $1 - regular expression
310310
find_and_replace() {
311-
find "${dest_dir}" -type f -print0 | xargs -0 perl -pi -w -e "$1"
311+
find "${dest_dir}" -type f -print0 | xargs -0 perl -pi -w -e "$1"
312312
}
313313

314314
# Performs a find and replace across a specified file.
315315
#
316316
# $1 - file
317317
# $2 - regular expression
318318
file_find_and_replace() {
319-
find "${dest_dir}/$1" -type f -print0 | xargs -0 perl -pi -w -e "$2"
319+
find "${dest_dir}/$1" -type f -print0 | xargs -0 perl -pi -w -e "$2"
320320
}
321321

322322
# Joins a list of strings.
323323
#
324324
# $1 - separator
325325
# $* - list of strings to join
326326
join() {
327-
local d=$1; shift; local f=$1; shift; printf %s "$f" "${@/#/$d}";
327+
local d=$1; shift; local f=$1; shift; printf %s "$f" "${@/#/$d}";
328328
}
329329

330330
# For each of the variables defined above, insert into the scaffold files...
@@ -365,15 +365,15 @@ regex="s/\\{\\{REPL_TEXT_NDARRAY_DESC\\}\\}/${repl_text_ndarray_desc}/g;"
365365
find_and_replace "${regex}"
366366

367367
if [ -n "${desc_link_text}" ]; then
368-
# WARNING: we assume that the description link text does *not* include any special regular expression characters...
369-
regex="s/${desc_link_text}/[${desc_link_text}][\\@${binary_pkg//\//\\/}]/g;"
370-
file_find_and_replace "README.md" "${regex}"
368+
# WARNING: we assume that the description link text does *not* include any special regular expression characters...
369+
regex="s/${desc_link_text}/[${desc_link_text}][\\@${binary_pkg//\//\\/}]/g;"
370+
file_find_and_replace "README.md" "${regex}"
371371

372-
regex="s/\\{\\{DESC_LINK_TEXT_LABEL\\}\\}/\\n\\n[\\@${binary_pkg//\//\\/}]: https:\\/\\/github.com\\/stdlib-js\\/stdlib/g;"
373-
file_find_and_replace "README.md" "${regex}"
372+
regex="s/\\{\\{DESC_LINK_TEXT_LABEL\\}\\}/\\n\\n[\\@${binary_pkg//\//\\/}]: https:\\/\\/github.com\\/stdlib-js\\/stdlib/g;"
373+
file_find_and_replace "README.md" "${regex}"
374374
else
375-
regex="s/\\{\\{DESC_LINK_TEXT_LABEL\\}\\}//g;"
376-
file_find_and_replace "README.md" "${regex}"
375+
regex="s/\\{\\{DESC_LINK_TEXT_LABEL\\}\\}//g;"
376+
file_find_and_replace "README.md" "${regex}"
377377
fi
378378

379379
regex="s/\\{\\{BINARY_PKG\\}\\}/${binary_pkg//\//\\/}/g;"
@@ -399,10 +399,10 @@ find_and_replace "${regex}"
399399

400400
keywords_sep='",\n "'
401401
if [ "${#keywords[*]}" -eq 0 ]; then
402-
words=''
402+
words=''
403403
else
404-
words=$(join "${keywords_sep}" "${keywords[@]}")
405-
words="\\n \"${words}\","
404+
words=$(join "${keywords_sep}" "${keywords[@]}")
405+
words="\\n \"${words}\","
406406
fi
407407
regex="s/\\{\\{KEYWORDS\\}\\}/${words}/g;"
408408
find_and_replace "${regex}"

0 commit comments

Comments
 (0)