From 191ff68c4e80cff82aa1b147640a245567b65154 Mon Sep 17 00:00:00 2001
From: Iustin Pop <iustin@google.com>
Date: Tue, 22 Mar 2011 11:35:22 +0100
Subject: [PATCH] Move hlint rule to the main Makefile

Since we do have errors currently, this is not enabled from the main
'make lint' rule. That will get cleaned up later.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
---
 .gitignore  | 1 +
 Makefile.am | 8 +++++++-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/.gitignore b/.gitignore
index bd2c8f67c..382f086c8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -60,6 +60,7 @@
 /doc/install-quick.rst
 /doc/news.rst
 /doc/upgrade.rst
+/doc/hs-lint.html
 /doc/*.in
 /doc/*.png
 
diff --git a/Makefile.am b/Makefile.am
index 209eb346a..f66a9b641 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -126,7 +126,8 @@ CLEANFILES = \
 	stamp-srclinks \
 	$(nodist_pkgpython_PYTHON) \
 	$(HALLPROGS) $(HSRCS2) \
-	.hpc/*.mix htools/*.tix
+	.hpc/*.mix htools/*.tix \
+	doc/hs-lint.html
 
 # BUILT_SOURCES should only be used as a dependency on phony targets. Otherwise
 # it'll cause the target to rebuild every time.
@@ -943,6 +944,11 @@ lint: $(BUILT_SOURCES)
 	  PYTHONPATH=$(abs_top_srcdir) $(PYLINT) $(LINT_OPTS) \
 	  --rcfile  ../pylintrc $(patsubst qa/%.py,%,$(qa_scripts))
 
+.PHONY: hlint
+hlint: $(HSRCS2)
+	if tty -s; then C="-c"; else C=""; fi; \
+	hlint --report=doc/hs-lint.html $$C htools
+
 # a dist hook rule for updating the vcs-version file; this is
 # hardcoded due to where it needs to build the file...
 dist-hook:
-- 
GitLab