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: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
.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" \
--ignore "Reduce duplication" \
--hint src/lint-hints \
$(filter-out $(HLINT_EXCLUDES),$(HS_LIBTEST_SRCS) $(HS_PROG_SRCS))
+ @if [ ! -f doc/hs-lint.html ]; then \
+ echo "All good" > doc/hs-lint.html; \
+ fi
# a dist hook rule for updating the vcs-version file; this is
# hardcoded due to where it needs to build the file...