Closed xescugc closed 4 years ago
Merging #35 into master will increase coverage by
0.00%
. The diff coverage is0.00%
.
@@ Coverage Diff @@
## master #35 +/- ##
=======================================
Coverage 66.14% 66.15%
=======================================
Files 3 3
Lines 449 452 +3
=======================================
+ Hits 297 299 +2
- Misses 140 142 +2
+ Partials 12 11 -1
Impacted Files | Coverage Δ | |
---|---|---|
stringer.go | 61.26% <0.00%> (+0.04%) |
:arrow_up: |
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 9741c5a...cb6196d. Read the comment docs.
This change looks great. I'm going to merge this in, I wonder how many people were using a transformer to try and get a empty value, it sounds little crazy. At least anyone that is hit by this will know there is a issue and can quickly downgrade and report a the issue
I've added the test to the
linecomment
on thegolden_test.go
which fixes #27 and closes #34And added the logic to name it fail when generating the code with the transformers. There is no way to test this now as nothing returns
error
and it has to "fail" to actually output.I tested it by adding another parameter to the
runGoldenTest
which was the transformer and used instead of thenoop
and so I wrote a test and see that it failed withsnake
transformer and code like:And the error was
2020/06/08 21:17:50 transformation of "-" (LeftOnly) got an empty result
I meant to allow
//
as an option so it'll only fail if the actuallinecomment
was defined with a value (so empty values are allowed).Another solution that I thought while implementing was to, instead of FAIL, use the previous value (before the transformation) but that would still have had an incorrect behavior.
If there is a way to test that let me know and I'll write the test, for what I've seen the
endtoend_test.go
is also not possible to test it.