Closed snowleopard closed 8 years ago
What about hlint
? For now all it reports is this:
Circuit/Concept.hs:21:28: Warning: Use .
Found:
foldr (.||.) (const False) . map notEqual
Why not:
foldr ((.||.) . notEqual) (const False)
Circuit/Concept.hs:32:33: Warning: Use .
Found:
foldr (.&&.) (const True) (map after causes)
Why not:
foldr ((.&&.) . after) (const True) causes
Circuit/Concept.hs:38:33: Warning: Use .
Found:
foldr (.||.) (const False) (map after causes)
Why not:
foldr ((.||.) . after) (const False) causes
3 suggestions
Perhaps you find it too pedantic, but I've learned a thing or two about writing better haskell with it.
hlint
is very useful but I don't always take its suggestions. I guess we wouldn't want to enforce it.
However, we might integrate it with PRs anyway so that it gives some suggestions to consider. Is there a way to do that so that it doesn't influence the CI status?
Sure, but if its warnings are not fatal, CI would be green and people wouldn't go check what's going on. And doing so would be slow too.
So perhaps it's just better for each one to run it after writing new pieces of code, if not confident that the code will already be warning-free.
Agreed!
Can you update the progress? Only the first tests are left.
Looked into code formatting, but not convinced. Mostly because there isn't an agreed-upon or vastly popular style to use.
Done. Thanks @mvdan!
We cannot use hindent yet, see https://github.com/chrisdone/hindent/issues/170
OK, I'll close this now. We can come back to the code style issue once we find the right tool for this.
.travis.yml
-Wall -fwarn-tabs
to keep the codebase cleanEnforce code formatting style.