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

Squiz.CSS.DuplicateClassDefinitionSniff sees comments as part of the class name #2638

Closed
rhorber opened this issue Oct 6, 2019 · 2 comments · Fixed by #2639
Closed

Squiz.CSS.DuplicateClassDefinitionSniff sees comments as part of the class name #2638

rhorber opened this issue Oct 6, 2019 · 2 comments · Fixed by #2639

Comments

@rhorber
Copy link
Contributor

rhorber commented Oct 6, 2019

This sniff threw false-positives in my code. After #985 was fixed, they disappeared. After the fix of #1657 they rose again.

The difference between my code and the same in #1657 is, that I have the comments before the class name:
/* any comment */ .foo { color: red; }

@gsherwood
Copy link
Member

Thanks for the report, and the PR.

Just a warning that CSS and JS sniffing will be removed in version 4. That's quite a while away (no date set), but it would be worth thinking about switching to a different CSS linter when you get a chance.

@gsherwood gsherwood added this to Idea Bank in PHPCS v3 Development via automation Oct 9, 2019
@gsherwood gsherwood added this to the 3.5.2 milestone Oct 9, 2019
@gsherwood gsherwood moved this from Idea Bank to Backlog in PHPCS v3 Development Oct 9, 2019
@rhorber
Copy link
Contributor Author

rhorber commented Oct 11, 2019

Okay, thank you for the heads-up.

@gsherwood gsherwood changed the title Squiz.CSS.DuplicateClassDefinitionSniff and comments Squiz.CSS.DuplicateClassDefinitionSniff sees comments as part of the class name Oct 30, 2019
PHPCS v3 Development automation moved this from Backlog to Ready for Release Oct 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
PHPCS v3 Development
Ready for Release
Development

Successfully merging a pull request may close this issue.

2 participants