davegurnell / checklist

Validation library for Scala.
Apache License 2.0
47 stars 11 forks source link

Add more standard rules and eliminate Seq views #9

Closed Jacoby6000 closed 6 years ago

Jacoby6000 commented 7 years ago

In this PR, I've created strict variants of all the base property rules, and I've removed the Seq view restrictions that were on some of them... Instead, they now depend on either Foldable, Sizeable, Monoid, or Indexable.

Some consequences of this, are that Seq won't work for anything which depends on Foldable. Depending on cats' alleycats package should get you unlawful typeclasses for those, however.

codecov[bot] commented 7 years ago

Codecov Report

Merging #9 into develop will increase coverage by 2.12%. The diff coverage is 83.33%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop       #9      +/-   ##
===========================================
+ Coverage    79.47%   81.59%   +2.12%     
===========================================
  Files           10       13       +3     
  Lines          151      201      +50     
  Branches         0        2       +2     
===========================================
+ Hits           120      164      +44     
- Misses          31       37       +6
Impacted Files Coverage Δ
checklist/src/main/scala/checklist/Indexable.scala 100% <100%> (+33.33%) :arrow_up:
...list/src/main/scala/checklist/SizeableSyntax.scala 100% <100%> (ø)
checklist/src/main/scala/checklist/Sizeable.scala 100% <100%> (ø)
...ist/src/main/scala/checklist/IndexableSyntax.scala 66.66% <66.66%> (ø)
checklist/src/main/scala/checklist/Rule.scala 80.91% <80.85%> (-0.34%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 879db26...910e602. Read the comment docs.

Jacoby6000 commented 6 years ago

@davegurnell Hey dave, just checking to see if you saw this.

davegurnell commented 6 years ago

I have now! It all looks good except for one thing, which I think is a bigger design problem with the library in general that needs to be sorted in the medium term. I'll merge this now anyway and raise an issue to discuss the design problem.