Giter Club home page Giter Club logo

Comments (3)

beaugunderson avatar beaugunderson commented on July 3, 2024

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.

beaugunderson avatar beaugunderson commented on July 3, 2024

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.

beaugunderson avatar beaugunderson commented on July 3, 2024

(will have a PR for this today, likely)

from diff_cover.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.