Skip to content

Conversation

@richardkorthuis
Copy link
Contributor

Related to #1722

Copy link
Member

@jrfnl jrfnl left a comment

Choose a reason for hiding this comment

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

Hi @richardkorthuis, thanks for working on this PR and my apologies that it took me a while to get to reviewing it.

On the whole, looking good!

There are just two small remarks/questions:

  1. The inline remark about the second code comparison blocks missing the <em> tags.
  2. As the sniff flags both variable _declaration_s as well as the use of variables which don't comply, I'm wondering if it would make sense to add a second code sample to the code comparison with an echo statement using a variable or a function call being passed a variable ?

@richardkorthuis
Copy link
Contributor Author

@jrfnl I have added the extra code sample with an echo.

@jrfnl
Copy link
Member

jrfnl commented Aug 12, 2024

@jrfnl I have added the extra code sample with an echo.

Thanks for the update @richardkorthuis !

Looks good, I'd just like to combine the third code comparison with the first as they basically highlight the same issue. (A code comparison can contain multiple code samples within each <code> block).

@rodrigoprimo
Copy link
Collaborator

@richardkorthuis, I was just wondering if you'll have a chance to finish this off in the near future. It would be great if this PR could be included in the next WPCS release.

If you haven't got time or lost interest, please let us know and we'll see if we can find someone to take over. Thanks!

@richardkorthuis
Copy link
Contributor Author

@rodrigoprimo Thank you for the reminder, this PR completely lost my focus. I have updated the PR with the combined code comparisons.

Copy link
Member

@jrfnl jrfnl left a comment

Choose a reason for hiding this comment

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

@richardkorthuis Thanks for making that update! Looks great. Happy to get this merged.

@jrfnl jrfnl added this to the 3.2.0 milestone Feb 11, 2025
@dingo-d dingo-d merged commit eb39475 into WordPress:develop Feb 12, 2025
39 checks passed
lesterchan added a commit to lesterchan/WordPress-Coding-Standards that referenced this pull request Jun 8, 2025
* upstream/develop: (428 commits)
  Rulesets: update schema URL
  GH Actions: use the xmllint-validate action runner and enhance checks (WordPress#2522)
  AbstractFunctionParameterSniff: fix first class callables and function imports (WordPress#2518)
  DontExtractStandard.xml file creation (WordPress#2456)
  Add documentation for WordPress.NamingConventions.ValidVariableName (WordPress#2457)
  Remove unused variables from a few sniffs (WordPress#2514)
  I18nTextDomainFixer: remove unnecessary variable initialization (WordPress#2513)
  GH Actions: Bump codecov/codecov-action from 4 to 5 (WordPress#2510)
  GH Actions: PHP 8.4 has been released
  CS/QA: remove redundant condition
  GH Actions: use explicit PHPStan major
  Various sniffs: simplify skipping the rest of the file
  GH Actions: always quote variables
  Release checklist: add new action item
  AbstractClassRestrictionsSniff: fix insufficient defensive coding (WordPress#2500)
  ✨ New WordPress.WP.GetMetaSingle sniff (WordPress#2465)
  Fix typo in AbstractFunctionRestrictionsSniff::is_targetted_token() DocBlock (WordPress#2477)
  Fix typos (WordPress#2472)
  Documentation: capitalization consistency fixes (WordPress#2469)
  [Documentation]: WordPress.DB.PreparedSQL (WordPress#2454)
  ...
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.

4 participants