Closed PawelLipski closed 4 years ago
Hi @PawelLipski , thanks a lot for your work! it looks pretty useful!
I will find time to cover this by unit tests and fix build errors, unfortunately, now I'm very busy (a lot of work this week), maybe I can do it next week.
Ok! let me know if you agree with the general design, I can also provide docs for this as well
Merging #14 into master will increase coverage by
0.21%
. The diff coverage is96.42%
.
@@ Coverage Diff @@
## master #14 +/- ##
============================================
+ Coverage 91.89% 92.10% +0.21%
+ Complexity 54 52 -2
============================================
Files 6 6
Lines 148 152 +4
Branches 16 16
============================================
+ Hits 136 140 +4
Misses 7 7
Partials 5 5
Impacted Files | Coverage Δ | Complexity Δ | |
---|---|---|---|
.../antkorwin/betterstrings/ast/ExpressionParser.java | 92.50% <90.00%> (+1.32%) |
3.00 <1.00> (ø) |
|
...ntkorwin/betterstrings/BetterStringsProcessor.java | 100.00% <100.00%> (ø) |
10.00 <0.00> (-1.00) |
|
...etterstrings/ast/InnerStringVarsAstTranslator.java | 86.79% <100.00%> (+0.79%) |
26.00 <1.00> (ø) |
|
...a/com/antkorwin/betterstrings/tokenizer/Token.java | 88.88% <100.00%> (-1.12%) |
4.00 <1.00> (-1.00) |
|
...m/antkorwin/betterstrings/tokenizer/Tokenizer.java | 96.29% <100.00%> (-0.14%) |
8.00 <2.00> (ø) |
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 d346269...8d41986. Read the comment docs.
Also, I fixed the build (see the latest commit), apparently com.sun.tools.javac.api.JavacTaskImpl#parse
is declared throwing or not throwing IOException
depending on the exact environment (Java version? I develop on OpenJDK/JBR 11.0.6)
@antkorwin added tests for the newly-added option; they depends on https://github.com/jupiter-tools/compile-test/pull/1 getting released as v0.2 first, however (that's why Travis isn't passing as for now)
... and docs as well :) I'd appreciate your feedback since one of our projects would greatly benefit from this feature getting released
Hey @antkorwin :smile: how does the work go? when can we get it merged?
@antkorwin long time no hear... how's going?
Hi, @PawelLipski I'm so sorry about long delay
It looks great! Thanks a lot for your patience!
I will check it today and deploy the next version to maven central...
@PawelLipski @mkondratek thanks a lot for your contribution!
the next release already published to the maven central https://github.com/antkorwin/better-strings/releases/tag/v0.4
I found it pretty useful e.g. for static code analyzers to make sure that an explicit
toString
call is always present. E.g. in our project we'd like to forbidtoString
calls on certain classes (likeOption(al)
), since it's usually not intended (and in case ofOption
, it can result in a literalSome(...)
being rendered in user-facing strings in the UI).Plus also resolve a bug related to reported positions of compilation errors within interpolated strings & improve code style in a few places.
Depends on https://github.com/jupiter-tools/compile-test/pull/1