4import Language.Haskell.HLint (hlint)
6import System.Exit (exitFailure, exitSuccess)
8import System.FilePath.Find
12 pwd <- getCurrentDirectory
13 let runHlint f = hlint $ f:
14 [ "--ignore=Redundant do"
15 , "--ignore=Use camelCase"
16 , "--ignore=Redundant $"
19 , "--ignore=Use const"
22 , "--ignore=Use unless"
23 , "--ignore=Reduce duplication"
24 , "--cpp-define=USE_TEMPLATE_HASKELL"
25 , "--cpp-define=DEBUG"
26 , "--ignore=Use tuple-section"
28 recurseInto = and <$> sequence
29 [ fileType ==? Directory
32 matchFile = and <$> sequence
35 files <- find recurseInto matchFile (pwd </> "src") --TODO: Someday fix all hints in tests, etc.
36 ideas <- fmap concat $ forM files $ \f -> do
37 putStr $ "linting file " ++ drop (length pwd + 1) f ++ "... "
39 if null ideas then exitSuccess else exitFailure
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list