Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,15 @@ ghcid:
hlint-check-all:
./tools/hlint.sh -f all -m check

.PHONY: hlint-check-pr
hlint-check-pr:
./tools/hlint.sh -f pr -m check

.PHONY: hlint-inplace-pr
hlint-inplace-pr:
./tools/hlint.sh -f pr -m inplace


.PHONY: hlint-inplace-all
hlint-inplace-all:
./tools/hlint.sh -f all -m inplace
Expand Down
3 changes: 3 additions & 0 deletions tools/hlint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ while getopts ':f:m:' opt
if [ "$f" = "all" ]; then
files=$(find libs/ services/ -not -path "*/test/*" -name "*.hs")
echo "WARNING: not linting tests."
elif [ "$f" = "pr" ]; then
files=$(git diff --name-only origin/develop... | grep \.hs\$)
echo "WARNING: linting test files with changes. This may lead to some hard to fix warnings/errors, it is safe to ignore those!"
elif [ "$f" = "changeset" ]; then
files=$(git diff --name-only HEAD | grep \.hs\$)
echo "WARNING: linting test files with changes. This may lead to some hard to fix warnings/errors, it is safe to ignore those!"
Expand Down