Skip to content

Commit 336488d

Browse files
committed
test(pre-commit): shfmt+shellcheck test/fallback/update-fallback-links
1 parent eec5d54 commit 336488d

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ repos:
1313
hooks:
1414
- id: shfmt
1515
types: [text]
16-
files: ^(bash_completion(\.d/[^/]+\.bash)?|completions/.+|test/(config/bashrc|update-test-cmd-list)|.+\.sh(\.in)?)$
16+
files: ^(bash_completion(\.d/[^/]+\.bash)?|completions/.+|test/(config/bashrc|fallback/update-fallback-links|update-test-cmd-list)|.+\.sh(\.in)?)$
1717
exclude: ^completions/(\.gitignore|Makefile.*)$
1818

1919
- repo: https://github.com/shellcheck-py/shellcheck-py
@@ -22,7 +22,7 @@ repos:
2222
- id: shellcheck
2323
args: [-f, gcc]
2424
types: [text]
25-
files: ^(bash_completion(\.d/[^/]+\.bash)?|completions/.+|test/(config/bashrc|update-test-cmd-list)|.+\.sh(\.in)?)$
25+
files: ^(bash_completion(\.d/[^/]+\.bash)?|completions/.+|test/(config/bashrc|fallback/update-fallback-links|update-test-cmd-list)|.+\.sh(\.in)?)$
2626
exclude: ^completions/(\.gitignore|Makefile.*)$
2727
require_serial: false # We disable SC1090 anyway, so parallel is ok
2828

test/fallback/update-fallback-links

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ is_tracked_by_git()
88

99
cd "$(dirname "$0")/completions"
1010
for f in *; do
11-
if [[ -h $f ]] && is_tracked_by_git "$f"; then
11+
if [[ -L $f ]] && is_tracked_by_git "$f"; then
1212
git rm -f "$f"
1313
fi
1414
done
1515
for f in ../../../completions/_*; do
1616
if is_tracked_by_git "$f"; then
17-
ln -sf $f ${f##*/_}
18-
git add --verbose ${f##*/_}
17+
ln -sf "$f" "${f##*/_}"
18+
git add --verbose "${f##*/_}"
1919
fi
2020
done

0 commit comments

Comments
 (0)