Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing on file where all changes are lines removal #434

Open
alexandre-orca opened this issue Jan 27, 2025 · 1 comment
Open

Failing on file where all changes are lines removal #434

alexandre-orca opened this issue Jan 27, 2025 · 1 comment

Comments

@alexandre-orca
Copy link

Hi! We have PR where we only removed some lines of code, and no lines were added or changed. The file does not have good coverage and was written way before diff-cover was introduced into our CI, but it looks like it was detected as an uncovered and failed pipeline.

Do you know if this behavior is intended? IMO, when devs remove a bunch of code during refactoring in aged repos, it's not fair to ask them to cover all files uncovered before him just for deletion. But I understand an entirely valid point about failing the lint in cases where some lines were added or changed.

Also, is there any workaround to skip the linter using any keywords in the commit message?

@alexandre-orca alexandre-orca changed the title Failing on file where all changes are removal Failing on file where all changes are lines removal Jan 27, 2025
@Bachmann1234
Copy link
Owner

So this behavior is a bit surprising to me. I would assume we only cared about additions/changes when looking at coverage or linting issues.

If you could construct an example repo showing this I can take a look and try and pinpoint exactly whats going on.

Right now there is not a workaround to skip the check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants