Hlint 1.9.26 has introduced some new checks that cause the hlint make target to fail. Temporarily disable them with a TODO to cleanup the code. Also move command line hlint configuration to lint-hints.hs
Signed-off-by: Viktor Bachraty <[email protected]> --- Makefile.am | 7 ------- src/lint-hints.hs | 14 ++++++++++++++ 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/Makefile.am b/Makefile.am index b0bf0aa..5ca5e21 100644 --- a/Makefile.am +++ b/Makefile.am @@ -2718,7 +2718,6 @@ pep8: $(GENERATED_FILES) $(PEP8) --ignore='$(PEP8_IGNORE)' --exclude='$(PEP8_EXCLUDE)' \ --repeat $(pep8_python_code) -# FIXME: remove ignore "Use void" when GHC 6.x is deprecated HLINT_EXCLUDES = src/Ganeti/THH.hs test/hs/hpc-htools.hs .PHONY: hlint hlint: $(HS_BUILT_SRCS) src/lint-hints.hs @@ -2726,12 +2725,6 @@ hlint: $(HS_BUILT_SRCS) src/lint-hints.hs @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 "Use &&&" \ - --ignore "Use &&" \ - --ignore "Use void" \ - --ignore "Reduce duplication" \ - --ignore "Use import/export shortcut" \ --hint src/lint-hints \ --cpp-file=$(HASKELL_PACKAGE_VERSIONS_FILE) \ $(filter-out $(HLINT_EXCLUDES),$(HS_LIBTEST_SRCS) $(HS_PROG_SRCS)) diff --git a/src/lint-hints.hs b/src/lint-hints.hs index 063f0df..10701de 100644 --- a/src/lint-hints.hs +++ b/src/lint-hints.hs @@ -26,3 +26,17 @@ warn = head x ==> case x of { y:_ -> y } where note = "Head is unsafe, please us -- Never use tail, use 'case' which covers all possibilities warn = tail x ==> case x of { _:y -> y } where note = "Tail is unsafe, please use case and handle the empty list as well" + +ignore "Use first" +ignore "Use &&&" +ignore "Use &&" +ignore "Reduce duplication" +ignore "Use import/export shortcut" + +-- FIXME: remove ignore "Use void" when GHC 6.x is deprecated +ignore "Use void" + +-- Configure newer HLint 1.9.26 to behave like older versions +-- FIXME: Cleanup code and remove this +ignore "Redundant bracket" +ignore "Functor law" -- 2.8.0.rc3.226.g39d4020
