-
Notifications
You must be signed in to change notification settings - Fork 154
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace TrimmedString regex with Trimmed predicate type #504
Conversation
This also adds `TrimmedString.trim` and is a replacement for fthomas#487 based on the discussion there.
@@ -42,7 +42,7 @@ | |||
</check> | |||
<check level="error" class="org.scalastyle.scalariform.NumberOfTypesChecker" enabled="true"> | |||
<parameters> | |||
<parameter name="maxTypes"><![CDATA[40]]></parameter> | |||
<parameter name="maxTypes"><![CDATA[45]]></parameter> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding Trimmed
bumped us over the limit here. 41 seemed a bit too arbitrary so I bumped this to 45. I will not attempt to defend this solution.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great, thanks @ceedubs!
The build failed on 2.10 and 2.11 because MiMa complained about the added Arbitrary
instance. We can add this in a binary compatible way via a new StringInstancesBinCompat1
trait - similar how new Arbitrary
instances were added in https://github.com/fthomas/refined/pull/486/files
Codecov Report
@@ Coverage Diff @@
## master #504 +/- ##
==========================================
+ Coverage 93.15% 94.37% +1.22%
==========================================
Files 61 62 +1
Lines 672 676 +4
Branches 10 14 +4
==========================================
+ Hits 626 638 +12
+ Misses 46 38 -8
Continue to review full report at Codecov.
|
Thanks @fthomas. I've hopefully fixed the binary compatibility. |
Looks great, thanks again @ceedubs! |
This also adds
TrimmedString.trim
and is a replacement for #487 basedon the discussion there.
While we are at it I threw in an
Arbitrary
instance forTrimedString
.