Comments (3)
This is the stack, fwiw:
Traceback (most recent call last):
File "/Users/beau/.envs/home/bin/diff-cover", line 10, in <module>
sys.exit(main())
File "/Users/beau/.envs/home/lib/python3.7/site-packages/diff_cover/tool.py", line 350, in main
src_roots=arg_dict['src_roots'],
File "/Users/beau/.envs/home/lib/python3.7/site-packages/diff_cover/tool.py", line 279, in generate_coverage_report
reporter.generate_report(output_file)
File "/Users/beau/.envs/home/lib/python3.7/site-packages/diff_cover/report_generator.py", line 215, in generate_report
report = template.render(self._context())
File "/Users/beau/.envs/home/lib/python3.7/site-packages/diff_cover/report_generator.py", line 259, in _context
src: self._src_path_stats(src) for src in self.src_paths()
File "/Users/beau/.envs/home/lib/python3.7/site-packages/diff_cover/report_generator.py", line 83, in src_paths
return {src for src, summary in self._diff_violations().items()
File "/Users/beau/.envs/home/lib/python3.7/site-packages/diff_cover/report_generator.py", line 175, in _diff_violations
for src_path in self._diff.src_paths_changed()
File "/Users/beau/.envs/home/lib/python3.7/site-packages/diff_cover/diff_reporter.py", line 147, in src_paths_changed
diff_dict = self._git_diff()
File "/Users/beau/.envs/home/lib/python3.7/site-packages/diff_cover/diff_reporter.py", line 198, in _git_diff
diff_dict = self._parse_diff_str(diff_str)
File "/Users/beau/.envs/home/lib/python3.7/site-packages/diff_cover/diff_reporter.py", line 248, in _parse_diff_str
sections_dict = self._parse_source_sections(diff_str)
File "/Users/beau/.envs/home/lib/python3.7/site-packages/diff_cover/diff_reporter.py", line 286, in _parse_source_sections
src_path = self._parse_source_line(line)
File "/Users/beau/.envs/home/lib/python3.7/site-packages/diff_cover/diff_reporter.py", line 410, in _parse_source_line
raise GitDiffError(msg)
diff_cover.git_diff.GitDiffError: Could not parse source path in line 'diff --git home-app/.coveragerc home-app/.coveragerc'
from diff_cover.
Looks like there's precedent to setting git
options in GitDiffTool
already:
return execute([
'git', '-c', 'diff.mnemonicprefix=no', 'diff',
"{branch}...HEAD".format(branch=compare_branch),
'--no-color',
'--no-ext-diff'
])[0]
Disabling noprefix
here fixed my problem:
return execute([
'git', '-c', 'diff.mnemonicprefix=no', '-c',
'diff.noprefix=no', 'diff',
"{branch}...HEAD".format(branch=compare_branch),
'--no-color',
'--no-ext-diff'
])[0]
from diff_cover.
(will have a PR for this today, likely)
from diff_cover.
Related Issues (20)
- Title for diff reports does not incorporate diff-range-notation HOT 2
- 7.0.0: pytest is failing in 4 units HOT 2
- Multiple options with `--options` HOT 1
- Empty XML report return no lines
- Add support for report generator plugins that process modified files as a batch, rather than individually
- Improve error reporting when "git" is not found
- diff-quality plugins should support "--options" and report files HOT 2
- TypeError: diff_cover_report_quality() got an unexpected keyword argument 'reports' HOT 8
- Blank lines not factored into range HOT 2
- Few tests fails in rmtree HOT 6
- 7.3.1: test suite is failing in `tests/test_integration.py::TestDiffQualityIntegration::test_html_with_external_css` unit HOT 2
- Make chardet a optional dependency HOT 1
- In cpp file,The coverage of changed lines is not being counted HOT 2
- any ways to get all measured lines' numbers from json report HOT 2
- Feature request — Invert output to find flaky tests and help determine test failures HOT 1
- does this tool support C++ opencppcoverage? cppcoverage has html, cobertura reports. HOT 1
- urgent!! work environment!!No lines with coverage information in this diff. HOT 2
- new Github action for diff-cover HOT 1
- There is a folder code that cannot be counted. It has been analyzed for a long time, please help HOT 1
- 5 tests fail HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from diff_cover.