Repository navigation
fix: report a missing git instead of an unhandled FileNotFoundError - #620
Merged
Bachmann1234 merged 2 commits intoAug 16, 2026
Merged
Bachmann1234 merged 2 commits into
Bachmann1234 merged 2 commits into
Conversation
…achmann1234#303) subprocess.Popen sits outside the try in command_runner.execute, so when the executable itself is missing the FileNotFoundError escapes raw. Both entry points call GitPathTool.set_cwd before their own error handling begins -- diff_quality_tool.main already has `except OSError -> LOGGER.error -> return 1` further down, it simply never gets the chance to run -- so `diff-cover` and `diff-quality` print a traceback when git is not installed. Add ExecutableNotFoundError as a subclass of CommandError, so anything that already catches CommandError keeps working, and raise it from execute() only for the FileNotFoundError that Popen throws. A command that runs and then fails is untouched: tests/test_integration.py requires CommandError to escape main() in that case, and it still does. Both main() functions now wrap set_cwd and report the message through LOGGER.error, returning 1. This is the same class of fix as Bachmann1234#380 for Bachmann1234#378, which covered the "the linter is not installed" path through run_command_for_code; the "git is not installed" path through execute was left as it was.
CodeQL flagged `assert "https://git-scm.com/" in message` as py/incomplete-url-substring-sanitization. The rule is about URL checks done with substring containment, and a test assertion is written the same way as the pattern it warns about. Import GIT_INSTALL_URL and assert on the whole trailing sentence instead, which is a stricter assertion anyway, and use the constant for the negative case as well.
Owner
|
Thanks for the fix! |
renovate Bot
added a commit
to MartinBernstorff/Memium
that referenced
this pull request
Oct 27, 2026
This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [diff-cover](https://redirect.github.com/Bachmann1234/diff-cover) | `==10.0.0` → `==11.0.0` |  |  | --- ### Release Notes <details> <summary>Bachmann1234/diff-cover (diff-cover)</summary> ### [`v11.0.0`](https://redirect.github.com/Bachmann1234/diff_cover/releases/tag/v11.0.0): Version 11.0.0 [Compare Source](https://redirect.github.com/Bachmann1234/diff-cover/compare/v10.6.0...v11.0.0) #### What's Changed - fix(exclude): match a pattern against the path, not only against its basename by [@​Eljees](https://redirect.github.com/Eljees) in [Bachmann1234/diff_cover#636](https://redirect.github.com/Bachmann1234/diff_cover/pull/636) - fix(snippets): number terminal snippets from their first line by [@​Eljees](https://redirect.github.com/Eljees) in [Bachmann1234/diff_cover#637](https://redirect.github.com/Bachmann1234/diff_cover/pull/637) - Drop python 3.10, add python 3.15 by [@​Bachmann1234](https://redirect.github.com/Bachmann1234) in [Bachmann1234/diff_cover#645](https://redirect.github.com/Bachmann1234/diff_cover/pull/645) - Split quoted `--options` with shlex by [@​Don-Yin](https://redirect.github.com/Don-Yin) in [Bachmann1234/diff_cover#646](https://redirect.github.com/Bachmann1234/diff_cover/pull/646) ##### Dependency Bumps - Bump astral-sh/setup-uv from 10.1.0 to 10.2.0 by [@​dependabot](https://redirect.github.com/dependabot)\[bot] in [Bachmann1234/diff_cover#638](https://redirect.github.com/Bachmann1234/diff_cover/pull/638) - Bump github/codeql-action from 4.38.0 to 4.38.2 by [@​dependabot](https://redirect.github.com/dependabot)\[bot] in [Bachmann1234/diff_cover#639](https://redirect.github.com/Bachmann1234/diff_cover/pull/639) - Bump ruff from 0.16.8 to 0.16.9 by [@​dependabot](https://redirect.github.com/dependabot)\[bot] in [Bachmann1234/diff_cover#643](https://redirect.github.com/Bachmann1234/diff_cover/pull/643) - Bump pylint from 4.0.8 to 4.0.9 by [@​dependabot](https://redirect.github.com/dependabot)\[bot] in [Bachmann1234/diff_cover#641](https://redirect.github.com/Bachmann1234/diff_cover/pull/641) - Bump pytest-mock from 3.15.1 to 3.16.0 by [@​dependabot](https://redirect.github.com/dependabot)\[bot] in [Bachmann1234/diff_cover#640](https://redirect.github.com/Bachmann1234/diff_cover/pull/640) - Bump pyflakes from 3.4.0 to 4.0.0 by [@​dependabot](https://redirect.github.com/dependabot)\[bot] in [Bachmann1234/diff_cover#642](https://redirect.github.com/Bachmann1234/diff_cover/pull/642) #### New Contributors - [@​Don-Yin](https://redirect.github.com/Don-Yin) made their first contribution in [Bachmann1234/diff_cover#646](https://redirect.github.com/Bachmann1234/diff_cover/pull/646) **Full Changelog**: <Bachmann1234/diff_cover@v10.6.0...v11.0.0> ### [`v10.6.0`](https://redirect.github.com/Bachmann1234/diff_cover/releases/tag/v10.6.0): Version 10.6.0 [Compare Source](https://redirect.github.com/Bachmann1234/diff-cover/compare/v10.5.1...v10.6.0) #### What's Changed - refactor: harmonize linters to use ruff as the sole linter and formatter by [@​philipp-horstenkamp](https://redirect.github.com/philipp-horstenkamp) in [Bachmann1234/diff_cover#630](https://redirect.github.com/Bachmann1234/diff_cover/pull/630) - Switch over to uv by [@​Bachmann1234](https://redirect.github.com/Bachmann1234) in [Bachmann1234/diff_cover#631](https://redirect.github.com/Bachmann1234/diff_cover/pull/631) - Trying to avoid re-locking by [@​Bachmann1234](https://redirect.github.com/Bachmann1234) in [Bachmann1234/diff_cover#633](https://redirect.github.com/Bachmann1234/diff_cover/pull/633) - Add --minimum-change feature flag to diff-cover and diff-quality by [@​philipp-horstenkamp](https://redirect.github.com/philipp-horstenkamp) in [Bachmann1234/diff_cover#628](https://redirect.github.com/Bachmann1234/diff_cover/pull/628), [Bachmann1234/diff_cover#635](https://redirect.github.com/Bachmann1234/diff_cover/pull/635) ##### Dependency bumps - Bump ruff from 0.16.0 to 0.16.5 by [@​dependabot](https://redirect.github.com/dependabot)\[bot] in [Bachmann1234/diff_cover#621](https://redirect.github.com/Bachmann1234/diff_cover/pull/621) - Bump isort from 8.0.1 to 9.0.1 by [@​dependabot](https://redirect.github.com/dependabot)\[bot] in [Bachmann1234/diff_cover#622](https://redirect.github.com/Bachmann1234/diff_cover/pull/622) - Bump github/codeql-action from 4.37.3 to 4.37.9 by [@​dependabot](https://redirect.github.com/dependabot)\[bot] in [Bachmann1234/diff_cover#623](https://redirect.github.com/Bachmann1234/diff_cover/pull/623) - Bump chardet from 7.4.3 to 7.6.0 by [@​dependabot](https://redirect.github.com/dependabot)\[bot] in [Bachmann1234/diff_cover#624](https://redirect.github.com/Bachmann1234/diff_cover/pull/624) - Bump pylint from 4.0.6 to 4.0.8 by [@​dependabot](https://redirect.github.com/dependabot)\[bot] in [Bachmann1234/diff_cover#626](https://redirect.github.com/Bachmann1234/diff_cover/pull/626) - Bump pygments from 2.20.0 to 2.21.0 by [@​dependabot](https://redirect.github.com/dependabot)\[bot] in [Bachmann1234/diff_cover#625](https://redirect.github.com/Bachmann1234/diff_cover/pull/625) - Bump github/codeql-action from 4.37.9 to 4.38.0 by [@​dependabot](https://redirect.github.com/dependabot)\[bot] in [Bachmann1234/diff_cover#632](https://redirect.github.com/Bachmann1234/diff_cover/pull/632) #### New Contributors - [@​philipp-horstenkamp](https://redirect.github.com/philipp-horstenkamp) made their first contribution in [Bachmann1234/diff_cover#630](https://redirect.github.com/Bachmann1234/diff_cover/pull/630) **Full Changelog**: <Bachmann1234/diff_cover@v10.5.1...v10.6.0> ### [`v10.5.1`](https://redirect.github.com/Bachmann1234/diff_cover/releases/tag/v10.5.1): Vesion 10.5.1 [Compare Source](https://redirect.github.com/Bachmann1234/diff-cover/compare/v10.5.0...v10.5.1) #### What's Changed - perf: index the Clover file lookup instead of rescanning per source path by [@​Eljees](https://redirect.github.com/Eljees) in [Bachmann1234/diff_cover#618](https://redirect.github.com/Bachmann1234/diff_cover/pull/618) - fix: report a missing git instead of an unhandled FileNotFoundError by [@​Eljees](https://redirect.github.com/Eljees) in [Bachmann1234/diff_cover#620](https://redirect.github.com/Bachmann1234/diff_cover/pull/620) **Full Changelog**: <Bachmann1234/diff_cover@v10.5.0...v10.5.1> ### [`v10.5.0`](https://redirect.github.com/Bachmann1234/diff_cover/releases/tag/v10.5.0): Version 10.5.0 [Compare Source](https://redirect.github.com/Bachmann1234/diff-cover/compare/v10.4.2...v10.5.0) #### What's Changed - Support PHPUnit clover reports (silently reported as zero coverage) by [@​Eljees](https://redirect.github.com/Eljees) in [Bachmann1234/diff_cover#617](https://redirect.github.com/Bachmann1234/diff_cover/pull/617) #### New Contributors - [@​Eljees](https://redirect.github.com/Eljees) made their first contribution in [Bachmann1234/diff_cover#617](https://redirect.github.com/Bachmann1234/diff_cover/pull/617) **Full Changelog**: <Bachmann1234/diff_cover@v10.4.2...v10.5.0> ### [`v10.4.2`](https://redirect.github.com/Bachmann1234/diff_cover/releases/tag/v10.4.2): Version 10.4.2 [Compare Source](https://redirect.github.com/Bachmann1234/diff-cover/compare/v10.4.1...v10.4.2) #### What's Changed - fix(config): honor format option from config file by [@​Sanjays2402](https://redirect.github.com/Sanjays2402) in [Bachmann1234/diff_cover#612](https://redirect.github.com/Bachmann1234/diff_cover/pull/612) - fix(plugins): accept reports/options in diff_cover_report_quality hookspec by [@​Sanjays2402](https://redirect.github.com/Sanjays2402) in [Bachmann1234/diff_cover#613](https://redirect.github.com/Bachmann1234/diff_cover/pull/613) #### New Contributors - [@​Sanjays2402](https://redirect.github.com/Sanjays2402) made their first contribution in [Bachmann1234/diff_cover#612](https://redirect.github.com/Bachmann1234/diff_cover/pull/612) #### Dependencies - Bump github/codeql-action from 4 to 4.37.3 by [@​dependabot](https://redirect.github.com/dependabot)\[bot] in [Bachmann1234/diff_cover#616](https://redirect.github.com/Bachmann1234/diff_cover/pull/616) - Bump ruff from 0.15.20 to 0.16.0 by [@​dependabot](https://redirect.github.com/dependabot)\[bot] in [Bachmann1234/diff_cover#615](https://redirect.github.com/Bachmann1234/diff_cover/pull/615) - Bump actions/setup-python from 6 to 7 by [@​dependabot](https://redirect.github.com/dependabot)\[bot] in [Bachmann1234/diff_cover#614](https://redirect.github.com/Bachmann1234/diff_cover/pull/614) **Full Changelog**: <Bachmann1234/diff_cover@v10.4.1...v10.4.2> ### [`v10.4.1`](https://redirect.github.com/Bachmann1234/diff_cover/releases/tag/v10.4.1): Version 10.4.1 [Compare Source](https://redirect.github.com/Bachmann1234/diff-cover/compare/v10.4.0...v10.4.1) #### What's Changed - Handle low confidence chardet detection for undeclared encodings by [@​Bachmann1234](https://redirect.github.com/Bachmann1234) in [Bachmann1234/diff_cover#611](https://redirect.github.com/Bachmann1234/diff_cover/pull/611) #### Dependencies - Bump setuptools from 80.9.0 to 83.0.0 by [@​dependabot](https://redirect.github.com/dependabot)\[bot] in [Bachmann1234/diff_cover#609](https://redirect.github.com/Bachmann1234/diff_cover/pull/609) **Full Changelog**: <Bachmann1234/diff_cover@v10.4.0...v10.4.1> ### [`v10.4.0`](https://redirect.github.com/Bachmann1234/diff_cover/releases/tag/v10.4.0): Version 10.4.0 [Compare Source](https://redirect.github.com/Bachmann1234/diff-cover/compare/v10.3.0...v10.4.0) #### What's Changed - Add --branch-coverage flag to respect partial branch coverage by [@​mofr](https://redirect.github.com/mofr) in [Bachmann1234/diff_cover#608](https://redirect.github.com/Bachmann1234/diff_cover/pull/608) #### Dependency bumps - Bump ruff from 0.15.12 to 0.15.15 by [@​dependabot](https://redirect.github.com/dependabot)\[bot] in [Bachmann1234/diff_cover#602](https://redirect.github.com/Bachmann1234/diff_cover/pull/602) - Bump black from 26.3.1 to 26.5.1 by [@​dependabot](https://redirect.github.com/dependabot)\[bot] in [Bachmann1234/diff_cover#603](https://redirect.github.com/Bachmann1234/diff_cover/pull/603) - Bump actions/cache from 5 to 6 by [@​dependabot](https://redirect.github.com/dependabot)\[bot] in [Bachmann1234/diff_cover#604](https://redirect.github.com/Bachmann1234/diff_cover/pull/604) - Bump actions/checkout from 6 to 7 by [@​dependabot](https://redirect.github.com/dependabot)\[bot] in [Bachmann1234/diff_cover#605](https://redirect.github.com/Bachmann1234/diff_cover/pull/605) - Bump ruff from 0.15.15 to 0.15.20 by [@​dependabot](https://redirect.github.com/dependabot)\[bot] in [Bachmann1234/diff_cover#606](https://redirect.github.com/Bachmann1234/diff_cover/pull/606) - Bump pylint from 4.0.5 to 4.0.6 by [@​dependabot](https://redirect.github.com/dependabot)\[bot] in [Bachmann1234/diff_cover#607](https://redirect.github.com/Bachmann1234/diff_cover/pull/607) #### New Contributors - [@​mofr](https://redirect.github.com/mofr) made their first contribution in [Bachmann1234/diff_cover#608](https://redirect.github.com/Bachmann1234/diff_cover/pull/608) **Full Changelog**: <Bachmann1234/diff_cover@v10.3.0...v10.4.0> ### [`v10.3.0`](https://redirect.github.com/Bachmann1234/diff_cover/releases/tag/v10.3.0): Version 10.3.0 [Compare Source](https://redirect.github.com/Bachmann1234/diff-cover/compare/v10.2.1...v10.3.0) #### What's Changed - Add --show-covered flag to highlight covered diff lines in HTML report by [@​duxiaocheng](https://redirect.github.com/duxiaocheng) in [Bachmann1234/diff_cover#600](https://redirect.github.com/Bachmann1234/diff_cover/pull/600) - Document previously undocumented CLI flags in README by [@​Bachmann1234](https://redirect.github.com/Bachmann1234) in [Bachmann1234/diff_cover#601](https://redirect.github.com/Bachmann1234/diff_cover/pull/601) **Full Changelog**: <Bachmann1234/diff_cover@v10.2.1...v10.3.0> ### [`v10.2.1`](https://redirect.github.com/Bachmann1234/diff_cover/releases/tag/v10.2.1): Version 10.2.1 [Compare Source](https://redirect.github.com/Bachmann1234/diff-cover/compare/v10.2.0...v10.2.1) #### What's Changed - Fix --help hiding most CLI options in diff-cover/diff-quality by [@​duxiaocheng](https://redirect.github.com/duxiaocheng) in [Bachmann1234/diff_cover#599](https://redirect.github.com/Bachmann1234/diff_cover/pull/599) #### New Contributors - [@​duxiaocheng](https://redirect.github.com/duxiaocheng) made their first contribution in [Bachmann1234/diff_cover#599](https://redirect.github.com/Bachmann1234/diff_cover/pull/599) #### Dependency bumps - Bump tomli from 2.3.0 to 2.4.0 by [@​dependabot](https://redirect.github.com/dependabot)\[bot] in [Bachmann1234/diff_cover#575](https://redirect.github.com/Bachmann1234/diff_cover/pull/575) - Bump ruff from 0.14.10 to 0.14.14 by [@​dependabot](https://redirect.github.com/dependabot)\[bot] in [Bachmann1234/diff_cover#576](https://redirect.github.com/Bachmann1234/diff_cover/pull/576) - Bump isort from 6.1.0 to 7.0.0 by [@​dependabot](https://redirect.github.com/dependabot)\[bot] in [Bachmann1234/diff_cover#577](https://redirect.github.com/Bachmann1234/diff_cover/pull/577) - Update black to 26.1 by [@​Bachmann1234](https://redirect.github.com/Bachmann1234) in [Bachmann1234/diff_cover#579](https://redirect.github.com/Bachmann1234/diff_cover/pull/579) - Bump actions/download-artifact from 7 to 8 by [@​dependabot](https://redirect.github.com/dependabot)\[bot] in [Bachmann1234/diff_cover#582](https://redirect.github.com/Bachmann1234/diff_cover/pull/582) - Bump actions/upload-artifact from 6 to 7 by [@​dependabot](https://redirect.github.com/dependabot)\[bot] in [Bachmann1234/diff_cover#583](https://redirect.github.com/Bachmann1234/diff_cover/pull/583) - Bump chardet from 5.2.0 to 6.0.0.post1 by [@​dependabot](https://redirect.github.com/dependabot)\[bot] in [Bachmann1234/diff_cover#584](https://redirect.github.com/Bachmann1234/diff_cover/pull/584) - Bump isort from 7.0.0 to 8.0.1 by [@​dependabot](https://redirect.github.com/dependabot)\[bot] in [Bachmann1234/diff_cover#585](https://redirect.github.com/Bachmann1234/diff_cover/pull/585) - Bump pylint from 4.0.4 to 4.0.5 by [@​dependabot](https://redirect.github.com/dependabot)\[bot] in [Bachmann1234/diff_cover#586](https://redirect.github.com/Bachmann1234/diff_cover/pull/586) - Bump ruff from 0.14.14 to 0.15.4 by [@​dependabot](https://redirect.github.com/dependabot)\[bot] in [Bachmann1234/diff_cover#587](https://redirect.github.com/Bachmann1234/diff_cover/pull/587) - Bump black from 26.1.0 to 26.3.1 by [@​dependabot](https://redirect.github.com/dependabot)\[bot] in [Bachmann1234/diff_cover#589](https://redirect.github.com/Bachmann1234/diff_cover/pull/589) - Bump pygments from 2.19.2 to 2.20.0 by [@​dependabot](https://redirect.github.com/dependabot)\[bot] in [Bachmann1234/diff_cover#591](https://redirect.github.com/Bachmann1234/diff_cover/pull/591) - Bump geekyeggo/delete-artifact from 5 to 6 by [@​dependabot](https://redirect.github.com/dependabot)\[bot] in [Bachmann1234/diff_cover#592](https://redirect.github.com/Bachmann1234/diff_cover/pull/592) - Bump ruff from 0.15.4 to 0.15.8 by [@​dependabot](https://redirect.github.com/dependabot)\[bot] in [Bachmann1234/diff_cover#593](https://redirect.github.com/Bachmann1234/diff_cover/pull/593) - Bump tomli from 2.4.0 to 2.4.1 by [@​dependabot](https://redirect.github.com/dependabot)\[bot] in [Bachmann1234/diff_cover#594](https://redirect.github.com/Bachmann1234/diff_cover/pull/594) - Bump pytest-cov from 7.0.0 to 7.1.0 by [@​dependabot](https://redirect.github.com/dependabot)\[bot] in [Bachmann1234/diff_cover#596](https://redirect.github.com/Bachmann1234/diff_cover/pull/596) - Bump ruff from 0.15.8 to 0.15.12 by [@​dependabot](https://redirect.github.com/dependabot)\[bot] in [Bachmann1234/diff_cover#598](https://redirect.github.com/Bachmann1234/diff_cover/pull/598) **Full Changelog**: <Bachmann1234/diff_cover@v10.2.0...v10.2.1> ### [`v10.2.0`](https://redirect.github.com/Bachmann1234/diff_cover/releases/tag/v10.2.0): Version 10.2.0 [Compare Source](https://redirect.github.com/Bachmann1234/diff-cover/compare/v10.1.0...v10.2.0) #### What's Changed - Convert violation to relative path for subfolder support by [@​eacherkan-via](https://redirect.github.com/eacherkan-via) in [Bachmann1234/diff_cover#574](https://redirect.github.com/Bachmann1234/diff_cover/pull/574) #### Dependency Bumps - Bump actions/download-artifact from 6 to 7 by [@​dependabot](https://redirect.github.com/dependabot)\[bot] in [Bachmann1234/diff_cover#566](https://redirect.github.com/Bachmann1234/diff_cover/pull/566) - Bump actions/cache from 4 to 5 by [@​dependabot](https://redirect.github.com/dependabot)\[bot] in [Bachmann1234/diff_cover#567](https://redirect.github.com/Bachmann1234/diff_cover/pull/567) - Bump actions/upload-artifact from 5 to 6 by [@​dependabot](https://redirect.github.com/dependabot)\[bot] in [Bachmann1234/diff_cover#568](https://redirect.github.com/Bachmann1234/diff_cover/pull/568) - Bump doc8 from 1.1.2 to 2.0.0 by [@​dependabot](https://redirect.github.com/dependabot)\[bot] in [Bachmann1234/diff_cover#569](https://redirect.github.com/Bachmann1234/diff_cover/pull/569) - Bump pylint from 3.3.9 to 4.0.4 by [@​dependabot](https://redirect.github.com/dependabot)\[bot] in [Bachmann1234/diff_cover#570](https://redirect.github.com/Bachmann1234/diff_cover/pull/570) - Bump ruff from 0.14.7 to 0.14.10 by [@​dependabot](https://redirect.github.com/dependabot)\[bot] in [Bachmann1234/diff_cover#571](https://redirect.github.com/Bachmann1234/diff_cover/pull/571) - Bump black from 25.11.0 to 25.12.0 by [@​dependabot](https://redirect.github.com/dependabot)\[bot] in [Bachmann1234/diff_cover#572](https://redirect.github.com/Bachmann1234/diff_cover/pull/572) #### New Contributors - [@​eacherkan-via](https://redirect.github.com/eacherkan-via) made their first contribution in [Bachmann1234/diff_cover#574](https://redirect.github.com/Bachmann1234/diff_cover/pull/574) **Full Changelog**: <Bachmann1234/diff_cover@v10.1.0...v10.2.0> ### [`v10.1.0`](https://redirect.github.com/Bachmann1234/diff_cover/releases/tag/v10.1.0): Version 10.1.0 [Compare Source](https://redirect.github.com/Bachmann1234/diff-cover/compare/v10.0.0...v10.1.0) #### What's Changed - Update required Python to >=3.10 by [@​nicoddemus](https://redirect.github.com/nicoddemus) in [Bachmann1234/diff_cover#563](https://redirect.github.com/Bachmann1234/diff_cover/pull/563) - Fix installation command formatting in README by [@​jlosito](https://redirect.github.com/jlosito) in [Bachmann1234/diff_cover#564](https://redirect.github.com/Bachmann1234/diff_cover/pull/564) - Add support for floating-point total percentage in reports by [@​tilaven](https://redirect.github.com/tilaven) in [Bachmann1234/diff_cover#565](https://redirect.github.com/Bachmann1234/diff_cover/pull/565) #### New Contributors - [@​jlosito](https://redirect.github.com/jlosito) made their first contribution in [Bachmann1234/diff_cover#564](https://redirect.github.com/Bachmann1234/diff_cover/pull/564) - [@​tilaven](https://redirect.github.com/tilaven) made their first contribution in [Bachmann1234/diff_cover#565](https://redirect.github.com/Bachmann1234/diff_cover/pull/565) **Full Changelog**: <Bachmann1234/diff_cover@v10.0.0...v10.1.0> </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/MartinBernstorff/Memium). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4xODQuMSIsInVwZGF0ZWRJblZlciI6IjQ0LjE4NC4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #303.
Problem
With git not installed (or not on
PATH), both entry points end in a traceback:Two things are going on:
command_runner.executeputssubprocess.Popen(...)outside thetry. Thetryonly coversprocess.communicate(), so theFileNotFoundErrorthatPopenraises when the executable does not exist escapes untouched.
Both
main()functions callGitPathTool.set_cwd(directory)before their ownerror handling starts.
diff_quality_tool.mainalready hasand
FileNotFoundErroris anOSError— the handler for this case is alreadywritten, the failure just happens a few lines above the block that would catch it.
diff_cover_tool.mainhas no handling at that point at all.Precedent
This is the same class of defect as #378 ("Running diff-quality with a tool which is
not installed gives FileNotFoundError rather than helpful message"), fixed by #380.
That fix landed in
run_command_for_codeand covers "the linter is not installed";the "git is not installed" path goes through
executeand was left as it was.Fix
ExecutableNotFoundError(CommandError)— a subclass, sogit_diff.py'sexcept CommandErrorand every other existing handler keep working unchanged.execute()raises it for theFileNotFoundErrorfromPopenonly, with the messageImprove error reporting when "git" is not found #303 asked for. The git-scm.com link is added only when the missing binary is
git.main()functions wrapset_cwdand report throughLOGGER.error, returning 1.The narrow catch is deliberate
My first version caught
CommandErrorwholesale inmain(), and two of your existingtests rejected it —
tests/test_integration.py::TestDiffCoverIntegration::test_git_diff_errorand::TestDiffQualityIntegration::test_git_diff_error_diff_quality. Both set up a git thatruns and exits 1, and both require
CommandErrorto propagate out ofmain(). That isthe project saying "the command ran and failed" and "there is no command to run" are
different things, which is where the separate subclass came from. Both tests pass here.
Tests
tests/test_command_runner_missing_executable.py, six cases:execute(), a non-gitbinary getting no git link, the subclass relationship, both
main()functions, andwhich is green on both sides — that is what shows the error semantics did not move.
Verification
main(e34eec3, release 10.5.0), whole suiteFileNotFoundErrorescapedexecute()and bothmain()sCommandError— silent, as it must bemainblack,isort,doc8)ruffandpylintarecontinue-on-error: trueinverify.yaml, so I checked theblocking three;
diff-qualityon this diff reports 100% for pyflakes.