Closed Jacoby6000 closed 6 years ago
Merging #9 into develop will increase coverage by
2.12%
. The diff coverage is83.33%
.
@@ 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.
@davegurnell Hey dave, just checking to see if you saw this.
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.
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
, orIndexable
.Sizeable
is just a typeclass for things which have size.Indexable
was updated to be based onmapWithIndex
rather thanzipWithIndex
. This lets us generalizeIndexable
, such that forallF[_]: Foldable
,F
is alsoIndexable
. Additionally,Indexable
will be able to be removed once we move to cats 1.0.0, since these things are built in toTraverse
there.Monoid
is used for the non-empty rule, rather than the seq view that was there before. This means users can define their own things which may be empty.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.