-
Notifications
You must be signed in to change notification settings - Fork 238
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
Coverage Service for Cobertura XML #30
Conversation
Contains simple parser to bundle the file's lines of code by methods. TODOs: - ignore comments inside methods - skip lines between '/*' and '*/'
…her into feature/cobertura_reporter
Needs refactoring.
…tection algoritm. Refactored rate calculation.
Ok. I have made the changes - and added some fixes too. |
data.gsub(/^function(.*) called [0-9]+ returned [0-9]+% blocks executed(.*)$/, '') | ||
end | ||
|
||
def coverage_for_line(line) |
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.
Is overriding the super class' implementation necessary here?
Move code from for cobertura_coverage_file_spec into coverage_file_spec.
Ok. Merged CoberturaCoverageFile into CoverageFile.
|
gcov_data | ||
end | ||
end | ||
|
||
def coverage_data | ||
def line_coverage_data | ||
if gcov_data |
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.
if cleaned_gcov_data
might be better now that we're using that below :)
Use integer for line_number in branch_coverage_data. Use cleaned_gcov_data. Simplified collection operations. Ruby-ficated implementation of num_branches_testable and num_branches_tested. Add devision by zero checks.
Extracts line of code with branch statement and all following "branch X taken / never excuted" annotations.
tarbrain, thanks so much! This is a really good addition and you even learned some Ruby along the way! |
Coverage Service for Cobertura XML
Hi marklarr,
as promised here is the pull request for the Cobertura XML coverage service.
It generates a nice xml report conforming to the dtd (see here) including line and branch coverage.
Have a look at it and tell me what you think.
Cheers
tarbrain