Revision 5a1e31b4
b/Makefile.am | ||
---|---|---|
595 | 595 |
qa/qa-sample.json \ |
596 | 596 |
$(qa_scripts) \ |
597 | 597 |
$(HS_LIB_SRCS) $(HS_BUILT_SRCS_IN) \ |
598 |
$(HS_PROG_SRCS) |
|
598 |
$(HS_PROG_SRCS) \ |
|
599 |
htools/lint-hints.hs |
|
599 | 600 |
|
600 | 601 |
man_MANS = \ |
601 | 602 |
man/ganeti.7 \ |
... | ... | |
1168 | 1169 |
--rcfile ../pylintrc $(patsubst qa/%.py,%,$(qa_scripts)) |
1169 | 1170 |
|
1170 | 1171 |
.PHONY: hlint |
1171 |
hlint: $(HS_BUILT_SRCS) |
|
1172 |
hlint: $(HS_BUILT_SRCS) htools/lint-hints.hs
|
|
1172 | 1173 |
if tty -s; then C="-c"; else C=""; fi; \ |
1173 | 1174 |
hlint --report=doc/hs-lint.html --cross $$C \ |
1174 | 1175 |
--ignore "Use first" \ |
... | ... | |
1176 | 1177 |
--ignore "Use on" \ |
1177 | 1178 |
--ignore "Use Control.Exception.catch" \ |
1178 | 1179 |
--ignore "Reduce duplication" \ |
1180 |
--hint htools/lint-hints \ |
|
1179 | 1181 |
$(filter-out htools/Ganeti/THH.hs,$(HS_LIB_SRCS)) |
1180 | 1182 |
|
1181 | 1183 |
# a dist hook rule for updating the vcs-version file; this is |
b/htools/lint-hints.hs | ||
---|---|---|
1 |
-- The following two hints warn to simplify e.g. "map (\v -> (v, |
|
2 |
-- True)) lst" to "zip lst (repeat True)", which is more abstract |
|
3 |
warn = map (\v -> (v, x)) y ==> zip y (repeat x) |
|
4 |
where _ = notIn v x |
|
5 |
warn = map (\v -> (x, v)) ==> zip (repeat x) |
|
6 |
where _ = notIn v x |
Also available in: Unified diff