Skip to content

Commit

Permalink
Print Linter not found message in red
Browse files Browse the repository at this point in the history
  • Loading branch information
Abhijit Sarkar committed Jan 2, 2025
1 parent 807d82e commit 0cfe543
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .github/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,13 @@ if (( no_test == 0 )); then
fi

if (( no_lint == 0 )); then
red=$(tput -Txterm-256color setaf 1)
default=$(tput -Txterm-256color sgr0)

if [[ -x "$(command -v hlint)" ]]; then
hlint .
else
printf "hlint not found"
printf "%bhlint not found%b\n" "$red" "$default"
fi

ormolu_mode="check"
Expand All @@ -63,6 +66,6 @@ if (( no_lint == 0 )); then
if [[ -x "$(command -v ormolu)" ]]; then
ormolu -m "$ormolu_mode" $(find . -type f -name '*.hs')
else
printf "ormolu not found"
printf "%bormolu not found%b\n" "$red" "$default"
fi
fi

0 comments on commit 0cfe543

Please sign in to comment.