Skip to content

Commit

Permalink
Merge pull request #737 from IntersectMBO/smelc/shellcheck-check-caba…
Browse files Browse the repository at this point in the history
…l-files

Shellcheck check-cabal-files.sh
  • Loading branch information
smelc authored Apr 26, 2024
2 parents 175620e + a13bae3 commit fb5f940
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
1 change: 0 additions & 1 deletion .github/workflows/shellcheck-exceptions.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
.github/bin/haddocks.sh
scripts/ci/check-cabal-files.sh
15 changes: 8 additions & 7 deletions scripts/ci/check-cabal-files.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
#!/usr/bin/env bash
#
# Runs "cabal check" in all directories containing a versioned .cabal file

for x in $(find . -name '*.cabal' | grep -v dist-newstyle | cut -c 3-); do
(
d=$(dirname $x)
echo "== $d =="
cd $d
cabal check
)
for cabal_file in $(git ls-files "*.cabal")
do
cd "$(dirname "$cabal_file")" || { echo "Cannot cd"; exit 1; }
echo "$(pwd)> cabal-check"
cabal check
cd - || { echo "Cannot cd back"; exit 1; }
done

0 comments on commit fb5f940

Please sign in to comment.