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

Core: add sniffs to check there is no blank line before a function close brace #2098

Merged

Conversation

jrfnl
Copy link
Member

@jrfnl jrfnl commented Oct 28, 2022

  1. There should be no blank line between the content of a function and the function’s closing brace.

Includes removing this rule from the WPCS native ruleset in which we already enforced it (as it will now be inherited from the WordPress ruleset).

Refs:

Loosely related to #1101

…ose brace

> 1. There should be no blank line between the content of a function and the function’s closing brace.

Includes removing this rule from the WPCS native ruleset in which we already enforced it (as it will now be inherited from the `WordPress` ruleset).

Refs:
* https://make.wordpress.org/core/2020/03/20/updating-the-coding-standards-for-modern-php/ - Function closing brace section
* https://developer.wordpress.org/coding-standards/wordpress-coding-standards/php/#remove-trailing-spaces
* WordPress/wpcs-docs#110

Loosely related to #1101
Copy link
Member

@GaryJones GaryJones left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@GaryJones GaryJones merged commit 2e24846 into develop Oct 28, 2022
@GaryJones GaryJones deleted the feature/core-add-no-blank-line-at-end-of-function branch October 28, 2022 10:01
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.

3 participants