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

YoastCS: always flag comma spacing in function calls #378

Merged

Conversation

jrfnl
Copy link
Collaborator

@jrfnl jrfnl commented Apr 7, 2024

The Universal.WhiteSpace.CommaSpacing has modular error codes to allow for preventing duplicate error messages about the same issue from different sniffs.

WordPressCS excludes the "function call" related error codes from the sniff to prevent an overlap with the Generic.Functions.FunctionCallArgumentSpacing sniff, but this doesn't play nice with a code base using short arrays as the spacing after commas in a short array being passed as a parameter in a function call will then also be skipped.

This change prevents this issue and ensures that the spacing around those commas will be checked correctly.

The `Universal.WhiteSpace.CommaSpacing` has modular error codes to allow for preventing duplicate error messages about the same issue from different sniffs.

WordPressCS excludes the "function call" related error codes from the sniff to prevent an overlap with the `Generic.Functions.FunctionCallArgumentSpacing` sniff, but this doesn't play nice with a code base using short arrays as the spacing after commas in a short array being passed as a parameter in a function call will then also be skipped.

This change prevents this issue and ensures that the spacing around those commas will be checked correctly.
@jrfnl jrfnl added this to the 3.x Next milestone Apr 7, 2024
@jrfnl jrfnl merged commit 159ccc1 into develop Apr 7, 2024
30 checks passed
@jrfnl jrfnl deleted the feature/yoastce-ruleset-ensure-commaspacing-is-checked branch April 7, 2024 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant