Re-enable standard hlint warnings
Commit 5a1e31b4 (Add infrastructure for, and two extra hlint rules) was intended to add two *extra* hlint rules, but I didn't realise at that time that "--hint" when first used overrides the built-in lints. As such, since then we were basically running with just those two rules, which resulted in many uncaught warnings/errors. This patch fixes that (by importing the standard lint rules in our custom hints file), and then goes to fix all the warnings that a current hlint gives me. Compared to our current style, we have just a few additions: - zipWithM instead of map foo . zip … - 'exitSuccess' instead of 'exitWith ExitSuccess' - more uses of '.' Additionally, we have to silence a case where hlint doesn't realise why we are using '\e -> const (return False (e :: IOError)' instead of just '\e -> return False' or even 'const (return False'). One warning that is generated by hlint ("Use void") can't be fixed until we deprecate GHC 6.x, as only GHC 7 has the 'void' function in Control.Monad. Signed-off-by:Iustin Pop <iustin@google.com> Reviewed-by:
Agata Murawska <agatamurawska@google.com>
Showing
- Makefile.am 3 additions, 0 deletionsMakefile.am
- htools/Ganeti/Confd.hs 4 additions, 4 deletionshtools/Ganeti/Confd.hs
- htools/Ganeti/Confd/Server.hs 11 additions, 9 deletionshtools/Ganeti/Confd/Server.hs
- htools/Ganeti/Config.hs 2 additions, 1 deletionhtools/Ganeti/Config.hs
- htools/Ganeti/Daemon.hs 2 additions, 2 deletionshtools/Ganeti/Daemon.hs
- htools/Ganeti/HTools/Cluster.hs 6 additions, 6 deletionshtools/Ganeti/HTools/Cluster.hs
- htools/Ganeti/HTools/ExtLoader.hs 4 additions, 4 deletionshtools/Ganeti/HTools/ExtLoader.hs
- htools/Ganeti/HTools/IAlloc.hs 1 addition, 1 deletionhtools/Ganeti/HTools/IAlloc.hs
- htools/Ganeti/HTools/Program/Hail.hs 2 additions, 2 deletionshtools/Ganeti/HTools/Program/Hail.hs
- htools/Ganeti/HTools/Program/Hbal.hs 4 additions, 4 deletionshtools/Ganeti/HTools/Program/Hbal.hs
- htools/Ganeti/HTools/Program/Hcheck.hs 3 additions, 3 deletionshtools/Ganeti/HTools/Program/Hcheck.hs
- htools/Ganeti/HTools/Program/Hscan.hs 2 additions, 2 deletionshtools/Ganeti/HTools/Program/Hscan.hs
- htools/Ganeti/HTools/QC.hs 2 additions, 2 deletionshtools/Ganeti/HTools/QC.hs
- htools/Ganeti/HTools/Rapi.hs 5 additions, 5 deletionshtools/Ganeti/HTools/Rapi.hs
- htools/Ganeti/HTools/Simu.hs 2 additions, 2 deletionshtools/Ganeti/HTools/Simu.hs
- htools/Ganeti/HTools/Text.hs 2 additions, 2 deletionshtools/Ganeti/HTools/Text.hs
- htools/Ganeti/HTools/Utils.hs 1 addition, 1 deletionhtools/Ganeti/HTools/Utils.hs
- htools/Ganeti/Hash.hs 1 addition, 1 deletionhtools/Ganeti/Hash.hs
- htools/Ganeti/Logging.hs 1 addition, 1 deletionhtools/Ganeti/Logging.hs
- htools/Ganeti/Luxi.hs 2 additions, 2 deletionshtools/Ganeti/Luxi.hs
Loading
Please register or sign in to comment