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

Update Squiz.CSS.DuplicateClassDefinitionSniff #2639

Merged
merged 1 commit into from Oct 30, 2019

Conversation

rhorber
Copy link
Contributor

@rhorber rhorber commented Oct 6, 2019

Remove comments from class names, before searching for @media and checking for duplicates.

This closes #2638.
The fix of #1657 is still in place.

Remove comments from class names,
before searching for @media and checking for duplicates.
@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
@gsherwood
Copy link
Member

The test cases in this PR pass without any modification to the sniff itself, so they are not replicating the problem that the PR aims to solve. I will take a look into them a bit more and see if I can figure out what's going on.

@gsherwood
Copy link
Member

Ah, I see what went wrong. The comments in the test file are all the same, so they always look like they match. I will change them to ensure the current code sees them as different classes.

gsherwood added a commit that referenced this pull request Oct 30, 2019
@gsherwood gsherwood merged commit 32d11c7 into squizlabs:master Oct 30, 2019
PHPCS v3 Development automation moved this from Backlog to Ready for Release Oct 30, 2019
@gsherwood
Copy link
Member

Thanks for the PR. Fix worked well after the tests were changed.

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 this pull request may close these issues.

Squiz.CSS.DuplicateClassDefinitionSniff sees comments as part of the class name
2 participants