You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reads any sequence of +++ as a file boundary. Since git diff puts a + at the start of new lines, and new line that starts with ++ will get treated as file boundary.
If the line contains no spaces, this leads to an error like:
Traceback (most recent call last):
File "/srv/buildslave/flocker-coverage/venv/bin/coverage-reporter", line 5, in <module>
__main__.main(sys.argv)
File "/srv/buildslave/flocker-coverage/venv/lib/python2.7/site-packages/coverage_reporter/__main__.py", line 63, in main
data = filter_coverage(data, plugins.get_filters())
File "/srv/buildslave/flocker-coverage/venv/lib/python2.7/site-packages/coverage_reporter/__main__.py", line 36, in filter_coverage
data = filter.filter(data)
File "/srv/buildslave/flocker-coverage/venv/lib/python2.7/site-packages/coverage_reporter/filters/patch.py", line 13, in filter
return filter_by_patch(coverage_data, self.patch, self.patch_level)
File "/srv/buildslave/flocker-coverage/venv/lib/python2.7/site-packages/coverage_reporter/filters/patch.py", line 20, in filter_by_patch
lines = _get_lines_from_patch(patch_file, patch_level)
File "/srv/buildslave/flocker-coverage/venv/lib/python2.7/site-packages/coverage_reporter/filters/patch.py", line 40, in _get_lines_from_patch
new_file = line.split(None, 1)[1]
IndexError: list index out of range
I haven't observed what happens if there is a space in the line, but it should be different to this IndexError.
The text was updated successfully, but these errors were encountered:
The parsing in
coverage-reporter/coverage_reporter/filters/patch.py
Lines 36 to 40 in 18ecc91
+++
as a file boundary. Sincegit diff
puts a+
at the start of new lines, and new line that starts with++
will get treated as file boundary.If the line contains no spaces, this leads to an error like:
I haven't observed what happens if there is a space in the line, but it should be different to this IndexError.
The text was updated successfully, but these errors were encountered: