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
Duplicate class definition detection generates false-positives in media queries #985
Comments
Tried again in 87efecd (2016-05-31). Bug still exists exactly as reported. |
That would be because I haven't fixed it :) I am 100% certain that this isn't going to be fixed by accident due to where the code is. So unless I update this bug report with a fix, you should consider it unfixed. I don't know when I will get time to look at it, but I did briefly look into it when I tagged it and it looked tricky at the time. |
I noticed this too long ago, but it never occured to me to fix it... |
FYI: The first class definition in a media query also contained the media query itself in the name,. Thus no error was generated for the first position, but the others. |
Fixed by PR #1131 |
Steps to reproduce
Invoke phpcs on the test code:
Test code
Produces output
Expected output
No output
Notes:
The following code does NOT produce any errors even though it's functionally equivalent to the test code above. All I did was swap line 3 and line 4.
This leads me to believe that the error lies in how
@media() {...}
is being processed; it seems to think the@media
block ends at the first}
it sees, OR it doesn't consider a@media
block as a separate CSS document.Found in phpcs version f4e18d4 (2016-04-27)
The text was updated successfully, but these errors were encountered: