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

The warning for no whitelist is displayed when it should not #347

Closed
stof opened this issue Jun 8, 2015 · 12 comments
Closed

The warning for no whitelist is displayed when it should not #347

stof opened this issue Jun 8, 2015 · 12 comments

Comments

@stof
Copy link

stof commented Jun 8, 2015

See https://travis-ci.org/Incenteev/IncenteevTranslationCheckerBundle/jobs/65867671 displaying Warning: No whitelist configured for code coverage while the config contains it: https://github.com/Incenteev/IncenteevTranslationCheckerBundle/blob/a5be86105f118f843e5fd4d4cd76520f8da1db45/phpunit.xml.dist

@sebastianbergmann
Copy link
Owner

I can only reproduce this when Xdebug is not loaded.

sebastianbergmann added a commit to sebastianbergmann/phpunit that referenced this issue Jun 8, 2015
@stof
Copy link
Author

stof commented Jun 8, 2015

indeed. It was not showing it locally with XDebug loaded

@rnowosielski
Copy link

Can you say something more about it ? I am running into a similar issue, where I get a warning Warning: No whitelist configured for code coverage but the code coverage is generated properly for all classes.

I do have xdebug loaded although I am not sure if I maybe I would need to so something more ?

@sebastianheise
Copy link

@rnowosielski - Same here unfortunately. Must be another unrelated bug though...

@sebastianbergmann
Copy link
Owner

Are you saying that you have a whitelist configured but get the warning that you have not?

@sebastianheise
Copy link

Morning Sebastian,
I (thought I) had the whitelist configured, but I did get the warning anyway.

However, I just solved it a few minutes ago and it turns out to be a misconfiguration (of course).

Unfortunately phpunit is not very talkative (not even in debug mode) when it comes to configuration issues.

For me it was an incorrect path definition. My configuration was lacking the trailing slashes in the "directory" directive.
I incorrectly assumed that since the directive is called "directory" a simple value of "../module" would be sufficient. But it had to be "../module/" however.

@rnowosielski
Copy link

Thanks! It helped me - somehow I haven't thought of it. I think it was a little bit confusing: warning said there is no configuration. In my case there was configuration it was just not proper...

@KorvinSzanto
Copy link

Oh Lord, this took me way too long. Thank you!

@lucidlogic
Copy link

+1 saved me pain and suffering

@bluesliverx
Copy link

+1, but mine was just an incorrect path. It turns out it uses the path of the XML config file when you are doing the whitelist. This should be documented or the logging improved :)

@flancer64
Copy link

it was an incorrect path in my case (relative to phpunit.dist.xml, not to shell script that runs tests).

@dancinmoonlit
Copy link

Incorrect path in my case too. Thanks didnt realize that would really cause an havoc

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

9 participants