Commit 1cced301 authored by Iustin Pop's avatar Iustin Pop
Browse files

Workaround hlint behaviour with no warnings/errors

When hlint sees a perfectly nice code tree, it will skip generating
the reports (both stdout and html). This means that usually the old
report will remain in place, so it makes development harder, as the
html file is out of sync with the tree.

To workaround this, we generate an empty/minimal file in this case.
Signed-off-by: default avatarIustin Pop <>
Reviewed-by: default avatarMichael Hanselmann <>
parent 72747d91
......@@ -1699,6 +1699,7 @@ HLINT_EXCLUDES = src/Ganeti/THH.hs test/hs/hpc-htools.hs
.PHONY: hlint
hlint: $(HS_BUILT_SRCS) src/lint-hints.hs
@test -n "$(HLINT)" || { echo 'hlint' not found during configure; exit 1; }
@rm -f doc/hs-lint.html
if tty -s; then C="-c"; else C=""; fi; \
$(HLINT) --utf8 --report=doc/hs-lint.html --cross $$C \
--ignore "Use first" \
......@@ -1707,6 +1708,9 @@ hlint: $(HS_BUILT_SRCS) src/lint-hints.hs
--ignore "Reduce duplication" \
--hint src/lint-hints \
@if [ ! -f doc/hs-lint.html ]; then \
echo "All good" > doc/hs-lint.html; \
# a dist hook rule for updating the vcs-version file; this is
# hardcoded due to where it needs to build the file...
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment