tuura / plato

A DSL for asynchronous circuits specification
Other
12 stars 2 forks source link

Set up CI and tests #3

Closed snowleopard closed 8 years ago

snowleopard commented 8 years ago
mvdan commented 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.

snowleopard commented 8 years ago

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?

mvdan commented 8 years ago

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.

snowleopard commented 8 years ago

Agreed!

mvdan commented 8 years ago

Can you update the progress? Only the first tests are left.

mvdan commented 8 years ago

Looked into code formatting, but not convinced. Mostly because there isn't an agreed-upon or vastly popular style to use.

snowleopard commented 8 years ago

Done. Thanks @mvdan!

mvdan commented 8 years ago

We cannot use hindent yet, see https://github.com/chrisdone/hindent/issues/170

snowleopard commented 8 years ago

OK, I'll close this now. We can come back to the code style issue once we find the right tool for this.