Skip to content

[Update] Documentation for sniff WordPress.Files.FileName#2590

Open
jasonkenison wants to merge 11 commits into
WordPress:developfrom
jasonkenison:docs/WordPress/Files/FileNameStandard
Open

[Update] Documentation for sniff WordPress.Files.FileName#2590
jasonkenison wants to merge 11 commits into
WordPress:developfrom
jasonkenison:docs/WordPress/Files/FileNameStandard

Conversation

@jasonkenison

@jasonkenison jasonkenison commented Aug 26, 2025

Copy link
Copy Markdown
Contributor

Related to #1722
Continuing updates from #2492

  1. Grouped all checks into individual standards.
  2. Included additional standards not previously included
  3. Added more check valid and invalid examples

Closes #2492

@jrfnl jrfnl changed the title Docs/word press/files/file name standard [Update] Documentation for sniff WordPress.Files.FilesName Aug 26, 2025
@jrfnl jrfnl mentioned this pull request Aug 26, 2025
61 tasks

@rodrigoprimo rodrigoprimo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for working on this PR, @jasonkenison! I left some comments with suggestions. Let me know if you have any questions.

Comment thread WordPress/Docs/Files/FileNameStandard.xml Outdated
Comment thread WordPress/Docs/Files/FileNameStandard.xml Outdated
Comment thread WordPress/Docs/Files/FileNameStandard.xml Outdated
Comment thread WordPress/Docs/Files/FileNameStandard.xml Outdated
Comment thread WordPress/Docs/Files/FileNameStandard.xml Outdated
Comment thread WordPress/Docs/Files/FileNameStandard.xml Outdated
Comment thread WordPress/Docs/Files/FileNameStandard.xml Outdated
Comment thread WordPress/Docs/Files/FileNameStandard.xml Outdated
Comment thread WordPress/Docs/Files/FileNameStandard.xml Outdated
@rodrigoprimo

Copy link
Copy Markdown
Contributor

@jasonkenison, 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!

Comment thread WordPress/Docs/Files/FileNameStandard.xml
@rodrigoprimo

Copy link
Copy Markdown
Contributor

@jasonkenison, I reacted with 👍 in the last comment of all the conversations where you already addressed my suggestion. When you have a moment, could you please resolve those? I also replied to your question and provided an example.

I believe there is still one comment that was not addressed: #2590 (comment)

Thanks for your contributions!

@rodrigoprimo rodrigoprimo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for addressing the last comment and for all your work, @jasonkenison! This PR looks good to me.

@rodrigoprimo

Copy link
Copy Markdown
Contributor

@dingo-d, @GaryJones, and @jrfnl, just noting that @jasonkenison addressed all the points that I raised a while ago, and this PR is ready for review whenever any of you have the time to check it. Thanks!

@GaryJones GaryJones changed the title [Update] Documentation for sniff WordPress.Files.FilesName [Update] Documentation for sniff WordPress.Files.FileName Dec 19, 2025

@jrfnl jrfnl left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks @jasonkenison for continuing to work on this and @rodrigoprimo for doing the initial reviews!

This is mostly looking good.

I'm not 100% convinced that the // Bulk_Updater. comments after the file names for the second <standard> block actually make it clear what is expected.

I've left some suggestions in-line on how I believe these code samples can be improved, but if I'm honest, I think splitting the single <code_comparison> block into three separate <code_comparison> blocks with descriptive valid/invalid titles would make this even clearer.

Other than that, I think it may be worthwhile to make it clear that the -template suffix rule only applies to specific files in WP Core and is not applicable for plugins/themes etc.

Hope this feedback helps!

Comment on lines +35 to +37
<em>class-bulk-updater</em>.php // `Bulk_Updater`.
<em>class-user-profile</em>.php // `User_Profile`.
<em>class-export-data</em>.php // `Export_Data`.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
<em>class-bulk-updater</em>.php // `Bulk_Updater`.
<em>class-user-profile</em>.php // `User_Profile`.
<em>class-export-data</em>.php // `Export_Data`.
// File: <em>class-bulk-updater</em>.php
<?php
class Bulk_Updater {
...
}
// File: <em>class-user-profile</em>.php
<?php
class User_Profile{
...
}
// File: <em>class-export-data</em>.php
<?php
class Export_Data{
...
}

Comment on lines +42 to +44
class-<em>update-in-bulk</em>.php // `Bulk_Updater`.
<em></em>user-profile.php // `User_Profile`.
<em>class.</em>export-data.php // `Export_Data`.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
class-<em>update-in-bulk</em>.php // `Bulk_Updater`.
<em></em>user-profile.php // `User_Profile`.
<em>class.</em>export-data.php // `Export_Data`.
// File: class-<em>update-in-bulk</em>.php
<?php
class Bulk_Updater {
...
}
// File: <em></em>user-profile.php
<?php
class User_Profile{
...
}
// File: <em>class.</em>export-data.php
<?php
class Export_Data{
...
}

Comment thread WordPress/Docs/Files/FileNameStandard.xml Outdated
@rodrigoprimo

Copy link
Copy Markdown
Contributor

@jasonkenison, 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!

accepted revision

Co-authored-by: Juliette <663378+jrfnl@users.noreply.github.com>
@rodrigoprimo

Copy link
Copy Markdown
Contributor

Hi, @jasonkenison. I see you made a commit after my last comment, but there are still some outstanding items from the last review. Just checking if you are still planning to finish this. 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!

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