Commits
Click on a commit to change the comparison rangefeat: return warnings in parsing info
we want to be able to return warnings when parsing a file, this is for
cases where we want to let the user know something's wrong but
continue parsing the rest of the JUnit XML because it may be partially
valid
this is being implemented because I realized that failing to parse the
entire file because one test case might have a really long name is not
ideal for users, but we shouldn't silently skip including that test
case either, we still want to let them know that something's in their
JUnit XML isn't being parsed
this commit also includes changes to the attribute parsing so we can
error when we fail to parse attributes, and return warnings when we
fail to validate the attribute's value (see AttrsOrWarning)
this also means that i added logic for signalling that we're ignoring
the test case we're currently parsing by making saved_testrun an enum
(see TestrunOrSkipped)
I'm not sure if making warnings an Option<Vec<String>> would be better
than making it a Vec<String> and having it be empty
also the fact that we have to pass WarningInfo objects back from the
use_reader function then format it to include location info is
unfortunate but it lets us avoid iterating over the buffer to get the
line/col every time we want to create a warning
also the decision to include the warnings in the parsing info is to
avoid breaking the interface of the parse_raw_upload function, which
still returns the same tuple3 months ago
by joseph-sentry fix: improve warning location accuracy2 months ago
by joseph-sentry fix: address feedback
parse_testcase_attrs returns a custom Result<ParseAttrsError> now
and the calling function is responsible for ignoring the Error that's
actually a warning2 months ago
by joseph-sentry