-
Notifications
You must be signed in to change notification settings - Fork 78
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
Rewrote squeeze to avoid commons-lang dependency #1992
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1992 +/- ##
=======================================
Coverage 49% 49%
- Complexity 6306 6313 +7
=======================================
Files 664 664
Lines 59586 59601 +15
Branches 8643 8646 +3
=======================================
+ Hits 29475 29484 +9
Misses 27900 27900
- Partials 2211 2217 +6 ☔ View full report in Codecov by Sentry. |
07662e2
to
274e623
Compare
@jurgenvinju I've rewritten it back in java. |
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.
Nice fix!
It's strange that we use strings for character classes while the concept is built-in to our type system. We could use #[a-z0-9]
as a an actual parameter instead of a string for good measure. The formal parameter would be type[![]] class
so any subset of the full Unicode 24 table. Shall we do that in another PR?
Agreed, this function is strange to begin with. it was added 11y ago, and I cannot find a place where it's used. |
I noticed we still had a commons-lang dependency. I thought we got rid of that 10y back when most of their string functions weren't safe for unicode.
There was on function still using it, so I rewrote that in regular rascal. I see no reasson to keep this in Java, unless it becomes a bottleneck.
And I added tests for it (that I first tested on the original code).