Add errors on separate lines for coverage#4301
Add errors on separate lines for coverage#4301MichaelChirico wants to merge 23 commits intomasterfrom
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #4301 +/- ##
========================================
Coverage 99.61% 99.61%
========================================
Files 72 72
Lines 13916 14088 +172
========================================
+ Hits 13862 14034 +172
Misses 54 54 ☔ View full report in Codecov by Sentry. |
|
wow! 62% (176/285) of these branches were uncovered. looks like it's paying off already in terms of understanding spurious coverage. |
|
|
||
| # fread dec=',' e.g. France | ||
| test(1439, fread("A;B\n1;2,34\n", dec="12"), error="nchar(dec) == 1L is not TRUE") | ||
| test(1440, fread("A;B\n8;2,34\n", dec="1"), data.table(A=8L, B="2,34")) |
There was a problem hiding this comment.
!dec %chin% c('.', ',') is implied incorrect by L1179 of fread.c @ master:
dec='' not allowed. Should be '.' or ','
?fread is not as strict:
The decimal separator as in utils::read.csv. If not "." (default) then usually ",". See details.
Took a conservative approach for now, and blocked !dec %chin% c(',', '.'). But that broke two tests (1440 and 1444.2 here).
dec='1' and dec='*' ran without errors... happy to restore this to work, and change the error/message found in fread.c.
| char buffer[69]; | ||
| int j; | ||
| if (!isReal(x)) error(_("x must be type 'double'")); | ||
| if (!isReal(x)) |
There was a problem hiding this comment.
This function binary( isn't used anywhere... just for debugging?
|
Don't know how to cover this line so leaving this PR here: |
|
Heads up that there will be a ton of conflicts between this one and #4306 (I count 20 at the moment). Let's merge this one first, since this one adds a bunch of internal errors. |
|
@jangorecki any thoughts on the third point -- should we put verbose messaging on its own line as well? |
|
@MichaelChirico I don't think it is so important. I would just keep that in mind when coding new stuff, but not necessarily touch all the existing one. |
|
What would it take to make C coverage cover branches within one line; i.e. like R coverage already does? |
…me-line-branch codecov #4301 (comment)
|
Too many conflicts here. This is being handled incrementally for now. If needed, when the PR queue is emptier, we can start this from scratch & add a linter to prevent backsliding. |
Is not caught by Codecov because it doesn't build a proper AST for C code. So we have to put
errorbranches on their own line to be properly detected by Codecov.Only done this for
errorso far. A few more patterns could be included:warningSTOPinfread.cRprintfetc, not sure how important it is to cover these... I see about 100 more lines withDTPRINTandRprintf