Bachmann1234 / diff_cover

Automatically find diff lines that need test coverage.
Apache License 2.0
713 stars 191 forks source link

#412 Add path validation in untracked files processing #413

Closed MihailPereverza closed 4 months ago

MihailPereverza commented 4 months ago

Fixes #412

MihailPereverza commented 4 months ago

I've implemented a function _get_file_lines that emulates the behavior of self._git_diff(), which returns an empty list for binary files. Additionally, the function _validate_path_to_diff leverages the basic path validation mechanisms used in self._git_diff() to ensure consistency.

Bachmann1234 commented 4 months ago

This is looking alright. Can you add a test and make sure to run isort and black?

MihailPereverza commented 4 months ago

Yes, it's ready. I have added the tests and ran the linters using the script poetry run bash -x verify.sh.

Bachmann1234 commented 4 months ago

Alright, lets get this out there. Thanks for the PR!

Bachmann1234 commented 4 months ago

Released https://pypi.org/project/diff-cover/9.1.1/ Thanks again!