Skip to content

Commit a7ae943

Browse files
committed
dev: enable shellcheck and lint
1 parent 3e77af4 commit a7ae943

File tree

2 files changed

+14
-12
lines changed

2 files changed

+14
-12
lines changed

devenv.nix

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,20 @@ in
1919
};
2020

2121
git-hooks.hooks = {
22-
prettier = {
23-
enable = true;
24-
files = "(src/.*\.ts|.*\.md|.*\.yml)$";
25-
};
26-
nixfmt-rfc-style.enable = true;
2722
build-dist = {
2823
enable = true;
2924
files = "src/.*$";
3025
pass_filenames = false;
3126
entry = "devenv shell -- pnpm build";
3227
};
28+
nixfmt-rfc-style.enable = true;
29+
prettier = {
30+
enable = true;
31+
files = "(src/.*\.ts|.*\.md|.*\.yml)$";
32+
};
33+
shellcheck = {
34+
enable = true;
35+
excludes = [ "\\.envrc" ];
36+
};
3337
};
3438
}

dist/push-paths.sh

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,13 @@ filterPaths() {
88
local paths=$2
99

1010
for path in $paths; do
11-
echo $path | grep -vEe $regex
11+
echo "$path" | grep -vEe "$regex"
1212
done | xargs
1313
}
1414

1515
pathsToPush=""
16-
preBuildPaths=$(sort "$preBuildPathsFile")
17-
if [ $? -eq 0 ]; then
18-
postBuildPaths=$("$(dirname "$0")"/list-nix-store.sh | sort)
19-
if [ $? -eq 0 ]; then
16+
if preBuildPaths=$(sort "$preBuildPathsFile"); then
17+
if postBuildPaths=$("$(dirname "$0")"/list-nix-store.sh | sort); then
2018
pathsToPush=$(comm -13 <(echo "$preBuildPaths") <(echo "$postBuildPaths"))
2119
else
2220
echo "::error::Failed to list post-build store paths."
@@ -26,7 +24,7 @@ else
2624
fi
2725

2826
if [[ -n $pushFilter ]]; then
29-
pathsToPush=$(filterPaths $pushFilter "$pathsToPush")
27+
pathsToPush=$(filterPaths "$pushFilter" "$pathsToPush")
3028
fi
3129

32-
echo "$pathsToPush" | "$cachix" push $cachixArgs "$cache"
30+
echo "$pathsToPush" | "$cachix" push "$cachixArgs" "$cache"

0 commit comments

Comments
 (0)