]> git.immae.eu Git - github/fretlink/ansible-clever.git/blame - scripts/dhall_check.sh
ci: add shellcheck to lint shell scripts in automatic tests
[github/fretlink/ansible-clever.git] / scripts / dhall_check.sh
CommitLineData
50a9e710
HAL
1#!/usr/bin/env bash
2
3pushd () {
4 command pushd "$@" > /dev/null
5}
6
7popd () {
8 command popd "$@" > /dev/null
9}
10
11go() {
12 local ERROR=0;
13 for file in $(find -type f -name "*.dhall"); do
14 pushd $(dirname $file);
15 cat $(basename $file) | dhall --explain resolve > /dev/null;
8b59c20a 16 echo "Typechecking ${file}"
50a9e710
HAL
17 if [ "$?" -ne "0" ]; then
18 echo "Failed to resolve $file"
19 ERROR=1;
20 fi;
21 popd;
22 done;
23 exit $ERROR;
24}
25
26go