-
Notifications
You must be signed in to change notification settings - Fork 191
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
native support lcov.info files #297
Conversation
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.
Looks pretty good! Thanks for this! It's a significant feature!
My only comment so far is id rather not break backwards compatibility.
|
||
The path strings may or may not exist. | ||
""" | ||
parser = argparse.ArgumentParser(description=DESCRIPTION) | ||
|
||
parser.add_argument("coverage_xml", type=str, help=COVERAGE_XML_HELP, nargs="+") | ||
parser.add_argument("coverage_file", type=str, help=COVERAGE_FILE_HELP, nargs="+") |
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.
I'd prefer some attempt to preserve backwards compatibility.
Perhaps including the coverage xml file as an alternative argument but that does the same thing (if both are provided I'm fine with preferring coverage_file
. Or maybe throw an error if both are provided?)
Renaming the arg everywhere else makes sense. I just would like the command line to support coverage_xml as an alternate form
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.
Thanks for the feedback, I'll take care of it.
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.
btw, can you please enable the workflows for this PR?
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.
I got a bit confused. This line defines a positional argument (see ArgumentParser.add_argument), therefore nobody will call it with the argument name; it will only define the key in the resulting structure, which is only used internally.
Looking at test_diff_cover_tool.py#L9 shows that nothing changed about how to call the function, therefore there's no backward compatibility issue.
Can you please double-check if my understanding is correct?
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.
Yeah, I think you are right. Sorry. Misread the argparse code :-)
Support lcov.info files, as described in https://ltp.sourceforge.net/coverage/lcov/geninfo.1.php
Potential future improvements: let users mix lcov.info and xml reports.