Skip to content

Add pre-commit hook for hlint #260

@jawshooah

Description

@jawshooah

hlint is a Haskell linting and code suggestion tool. Output looks something like this:

$ hlint --cross cross1.hs cross2.hs print.hs
print.hs:1:8: Error: Use print
Found:
  putStrLn $ show "Hello"
Why not:
  print "Hello"

cross1.hs:6:9: Warning: Reduce duplication
Found:
  a = 1
  b = 2
  c = 3

Why not:
  Combine with cross2.hs:5:9

2 suggestions

@sds How would you suggest we parse and display this kind of output? Should we only consider the first line of each suggestion, ignoring the "Found" and "Why not" stanzas?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions