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

Reporting method curly braces ( { and }) as not covered, but method content as covered #56

Open
fleuryc opened this issue Oct 23, 2020 · 2 comments

Comments

@fleuryc
Copy link

fleuryc commented Oct 23, 2020

Hi !

Very weird : since a few weeks/months, method curly braces ( { and }) are reported as not covered , even if the method declaration and content are reported as covered (and they are actually covered).

Command used :

php \
            -d pcov.enabled=1 \
            -d pcov.directory=src \
            -d pcov.initial.files=2048	\
            -d memory_limit=-1 \
            bin/phpunit --log-junit junit.xml --coverage-clover clover.xml -c phpunit.xml.dist

The coverage is then sent to SonarCloud, and the uncovered lines break our Quality Gate.

Fro example, this DTO :

image

What's going on ?
How can I fix this ?
Is it a configuration issue or a bug ?

Thanks for your help !

@gitnchez
Copy link

Hi
Check your newlines, this happens when you have windows-style line separators- CLRF (\r\n) instead of linux (\n)

@nymo
Copy link

nymo commented Oct 9, 2023

We have the same issue. Our line separators are linux style. Are there any other ideas where the problem comes from?

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

3 participants