Skip to content

Commit d54214f

Browse files
committed
style: change indentation from space to tabs
1 parent 9efefa0 commit d54214f

File tree

5 files changed

+80
-80
lines changed

5 files changed

+80
-80
lines changed

.github/workflows/scripts/lint_javascript_files

+8-8
Original file line numberDiff line numberDiff line change
@@ -54,35 +54,35 @@ files=$(echo "${files_to_lint}" | tr ' ' '\n' | grep '\.js$' | grep -v -e '/exam
5454
# Build native addons if present:
5555
packages=$(echo "${files}" | tr ' ' '\n' | sed 's/^lib\/node_modules\///g' | sed 's/\/lib\/.*//g' | sort | uniq)
5656
for pkg in ${packages}; do
57-
if [ -f "lib/node_modules/${pkg}/binding.gyp" ]; then
58-
NODE_ADDONS_PATTERN="${pkg}" make install-node-addons
59-
fi
57+
if [ -f "lib/node_modules/${pkg}/binding.gyp" ]; then
58+
NODE_ADDONS_PATTERN="${pkg}" make install-node-addons
59+
fi
6060
done
6161

6262
if [[ -n "${files}" ]]; then
63-
make lint-javascript-files FIX="${fix}" FILES="${files}"
63+
make lint-javascript-files FIX="${fix}" FILES="${files}"
6464
fi
6565

6666
# Lint JavaScript command-line interfaces...
6767
file=$(echo "${files_to_lint}" | tr ' ' '\n' | grep '\.js$' | grep -E '/bin/cli$' | tr '\n' ' ' | sed 's/ $//')
6868
if [[ -n "${file}" ]]; then
69-
make lint-javascript-files FIX="${fix}" FILES="${file}"
69+
make lint-javascript-files FIX="${fix}" FILES="${file}"
7070
fi
7171

7272
# Lint JavaScript example files:
7373
files=$(echo "${files_to_lint}" | tr ' ' '\n' | grep '/examples/.*\.js$' | tr '\n' ' ' | sed 's/ $//')
7474
if [[ -n "${files}" ]]; then
75-
make lint-javascript-files FIX="${fix}" FILES="${files}" ESLINT_CONF="${eslint_examples_conf}"
75+
make lint-javascript-files FIX="${fix}" FILES="${files}" ESLINT_CONF="${eslint_examples_conf}"
7676
fi
7777

7878
# Lint JavaScript test files:
7979
files=$(echo "${files_to_lint}" | tr ' ' '\n' | grep '/test/.*\.js$' | tr '\n' ' ' | sed 's/ $//')
8080
if [[ -n "${files}" ]]; then
81-
make lint-javascript-files FIX="${fix}" FILES="${files}" ESLINT_CONF="${eslint_tests_conf}"
81+
make lint-javascript-files FIX="${fix}" FILES="${files}" ESLINT_CONF="${eslint_tests_conf}"
8282
fi
8383

8484
# Lint JavaScript benchmark files:
8585
files=$(echo "${files_to_lint}" | tr ' ' '\n' | grep '/benchmark/.*\.js$' | tr '\n' ' ' | sed 's/ $//')
8686
if [[ -n "${files}" ]]; then
87-
make lint-javascript-files FIX="${fix}" FILES="${files}" ESLINT_CONF="${eslint_benchmarks_conf}"
87+
make lint-javascript-files FIX="${fix}" FILES="${files}" ESLINT_CONF="${eslint_benchmarks_conf}"
8888
fi

.github/workflows/scripts/remove_related_packages

+24-24
Original file line numberDiff line numberDiff line change
@@ -32,30 +32,30 @@
3232
set -o pipefail
3333

3434
for file in ${@}; do
35-
if [[ $file == *README.md ]]; then
36-
awk '
37-
BEGIN { print_mode = 1; in_related = 0; in_related_links = 0 }
38-
/<section class="related">/ {
39-
print; print ""; print "</section>";
40-
in_related = 1; print_mode = 0; next
41-
}
42-
/<\/section>/ {
43-
if (in_related) { in_related = 0; print_mode = 1 }
44-
else { print }
45-
next
46-
}
47-
/<!-- <related-links> -->/ {
48-
print; print ""; print "<!-- </related-links> -->";
49-
in_related_links = 1; print_mode = 0; next
50-
}
51-
/<!-- <\/related-links> -->/ {
52-
if (in_related_links) { in_related_links = 0; print_mode = 1 }
53-
else { print }
54-
next
55-
}
56-
{ if (print_mode == 1) print }
57-
' "$file" > "${file}.tmp" && mv "${file}.tmp" "$file"
58-
fi
35+
if [[ $file == *README.md ]]; then
36+
awk '
37+
BEGIN { print_mode = 1; in_related = 0; in_related_links = 0 }
38+
/<section class="related">/ {
39+
print; print ""; print "</section>";
40+
in_related = 1; print_mode = 0; next
41+
}
42+
/<\/section>/ {
43+
if (in_related) { in_related = 0; print_mode = 1 }
44+
else { print }
45+
next
46+
}
47+
/<!-- <related-links> -->/ {
48+
print; print ""; print "<!-- </related-links> -->";
49+
in_related_links = 1; print_mode = 0; next
50+
}
51+
/<!-- <\/related-links> -->/ {
52+
if (in_related_links) { in_related_links = 0; print_mode = 1 }
53+
else { print }
54+
next
55+
}
56+
{ if (print_mode == 1) print }
57+
' "$file" > "${file}.tmp" && mv "${file}.tmp" "$file"
58+
fi
5959
done
6060

6161
echo "All files processed successfully."

.github/workflows/scripts/track_fixmes

+18-18
Original file line numberDiff line numberDiff line change
@@ -25,25 +25,25 @@ comment="<!-- This comment is automatically generated by a GitHub Action. -->
2525

2626
# Search for FIXME annotations in the codebase:
2727
for file in $(find bin dist docs tools etc examples lib test tools -type f); do
28-
fixmes=$(grep -E -on "FIXME:" $file) || true
29-
for fixme in $fixmes; do
30-
if [ -n "$fixme" ]; then
31-
# Since a maximum of 65,535 characters can be included in a GitHub comment body, we break out of the loop if the comment body would exceed this limit.
32-
if [ $(( ${#comment} + ${#fixme} )) -gt 65535 ]; then
33-
break
34-
fi
35-
lineNumber=$(echo $fixme | cut -d ":" -f 1)
36-
lineContent=$(awk "NR==$lineNumber" $file)
37-
lineContent=$(echo $lineContent | sed -e 's/<!--/\\<!--/g' -e 's/-->/\\-->/g')
38-
if [ ${#lineContent} -gt 80 ]; then
39-
lineContent=$(echo $lineContent | cut -c 1-80)
40-
lineContent="$lineContent..."
41-
continue
42-
fi
43-
comment="$comment
28+
fixmes=$(grep -E -on "FIXME:" $file) || true
29+
for fixme in $fixmes; do
30+
if [ -n "$fixme" ]; then
31+
# Since a maximum of 65,535 characters can be included in a GitHub comment body, we break out of the loop if the comment body would exceed this limit.
32+
if [ $(( ${#comment} + ${#fixme} )) -gt 65535 ]; then
33+
break
34+
fi
35+
lineNumber=$(echo $fixme | cut -d ":" -f 1)
36+
lineContent=$(awk "NR==$lineNumber" $file)
37+
lineContent=$(echo $lineContent | sed -e 's/<!--/\\<!--/g' -e 's/-->/\\-->/g')
38+
if [ ${#lineContent} -gt 80 ]; then
39+
lineContent=$(echo $lineContent | cut -c 1-80)
40+
lineContent="$lineContent..."
41+
continue
42+
fi
43+
comment="$comment
4444
- [$file#L$lineNumber](https://github.com/stdlib-js/stdlib/blob/develop/$file#L$lineNumber): $lineContent"
45-
fi
46-
done
45+
fi
46+
done
4747
done
4848

4949
echo "$comment"

.github/workflows/scripts/track_todos

+18-18
Original file line numberDiff line numberDiff line change
@@ -25,25 +25,25 @@ comment="<!-- This comment is automatically generated by a GitHub Action. -->
2525

2626
# Search for TODO annotations in the codebase:
2727
for file in $(find bin dist docs tools etc examples lib test tools -type f); do
28-
todos=$(grep -E -on "TODO:" $file) || true
29-
for todo in $todos; do
30-
if [ -n "$todo" ]; then
31-
# Since a maximum of 65,535 characters can be included in a GitHub comment body, we break out of the loop if the comment body would exceed this limit.
32-
if [ $(( ${#comment} + ${#todo} )) -gt 65535 ]; then
33-
break
34-
fi
35-
lineNumber=$(echo $todo | cut -d ":" -f 1)
36-
lineContent=$(awk "NR==$lineNumber" $file)
37-
lineContent=$(echo $lineContent | sed -e 's/<!--/\\<!--/g' -e 's/-->/\\-->/g')
38-
if [ ${#lineContent} -gt 80 ]; then
39-
lineContent=$(echo $lineContent | cut -c 1-80)
40-
lineContent="$lineContent..."
41-
continue
42-
fi
43-
comment="$comment
28+
todos=$(grep -E -on "TODO:" $file) || true
29+
for todo in $todos; do
30+
if [ -n "$todo" ]; then
31+
# Since a maximum of 65,535 characters can be included in a GitHub comment body, we break out of the loop if the comment body would exceed this limit.
32+
if [ $(( ${#comment} + ${#todo} )) -gt 65535 ]; then
33+
break
34+
fi
35+
lineNumber=$(echo $todo | cut -d ":" -f 1)
36+
lineContent=$(awk "NR==$lineNumber" $file)
37+
lineContent=$(echo $lineContent | sed -e 's/<!--/\\<!--/g' -e 's/-->/\\-->/g')
38+
if [ ${#lineContent} -gt 80 ]; then
39+
lineContent=$(echo $lineContent | cut -c 1-80)
40+
lineContent="$lineContent..."
41+
continue
42+
fi
43+
comment="$comment
4444
- [$file#L$lineNumber](https://github.com/stdlib-js/stdlib/blob/develop/$file#L$lineNumber): $lineContent"
45-
fi
46-
done
45+
fi
46+
done
4747
done
4848

4949
echo "$comment"

.github/workflows/scripts/update_copyright_years

+12-12
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,18 @@
2929
current_year=$(date +"%Y")
3030

3131
for file in ${@}; do
32-
if [[ ! -f "$file" ]]; then
33-
echo "File not found: $file"
34-
continue
35-
fi
36-
echo "Updating copyright notice in $file..."
37-
if [[ "$OSTYPE" == "darwin"* ]]; then
38-
# macOS, where sed requires '' after -i to specify no backup...
39-
sed -i '' "s/Copyright (c) [0-9]\{4\} The Stdlib Authors./Copyright \(c\) $current_year The Stdlib Authors./g" "$file"
40-
else
41-
# Linux and others, no '' required...
42-
sed -i "s/Copyright (c) [0-9]\{4\} The Stdlib Authors./Copyright \(c\) $current_year The Stdlib Authors./g" "$file"
43-
fi
32+
if [[ ! -f "$file" ]]; then
33+
echo "File not found: $file"
34+
continue
35+
fi
36+
echo "Updating copyright notice in $file..."
37+
if [[ "$OSTYPE" == "darwin"* ]]; then
38+
# macOS, where sed requires '' after -i to specify no backup...
39+
sed -i '' "s/Copyright (c) [0-9]\{4\} The Stdlib Authors./Copyright \(c\) $current_year The Stdlib Authors./g" "$file"
40+
else
41+
# Linux and others, no '' required...
42+
sed -i "s/Copyright (c) [0-9]\{4\} The Stdlib Authors./Copyright \(c\) $current_year The Stdlib Authors./g" "$file"
43+
fi
4444
done
4545

4646
echo "Copyright notices updated to $current_year."

0 commit comments

Comments
 (0)