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

Added check for case sensitive duplicated file names #711

Merged
merged 18 commits into from
Jan 9, 2025

Conversation

davidperezgar
Copy link
Member

Fixes #710

@davidperezgar davidperezgar linked an issue Oct 9, 2024 that may be closed by this pull request
@davidperezgar
Copy link
Member Author

@swissspidy this is the part of badly names that suggested @ernilambar to move it away, so we can work on reflection tests.

@davidperezgar davidperezgar added the Needs Testing Anything that needs testing from a developer perspective label Nov 3, 2024
@ernilambar
Copy link
Member

ernilambar commented Nov 22, 2024

@davidperezgar I have updated the test for the check. But I noticed current check does not account for the duplicated folder name. Example:

UNIT_TESTS_PLUGIN_DIR . 'test-plugin-file-type-badly-named-files-errors/sub directory/file-1.php'
UNIT_TESTS_PLUGIN_DIR . 'test-plugin-file-type-badly-named-files-errors/Sub Directory/file-2.php'

I think we should also check for folder. We should refine the check along with error code - "duplicated_files"

@davidperezgar
Copy link
Member Author

Hey awesome! It's ready then to review!

@davidperezgar davidperezgar marked this pull request as ready for review November 22, 2024 19:00
Copy link

github-actions bot commented Nov 22, 2024

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: davidperezgar <davidperez@git.wordpress.org>
Co-authored-by: ernilambar <rabmalin@git.wordpress.org>
Co-authored-by: swissspidy <swissspidy@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@davidperezgar
Copy link
Member Author

Updated check for duplicated folders.

@swissspidy
Copy link
Member

This check and its error messages are a bit confusing. It says „duplicated file names are not permitted“, which could led one to believe that „foo/bar.php“ und „baz/bar.php“ is not OK. Bit this is only about mixed case like „bar.php“ and „BAR.php“. I recommend clarifying the error messages here, maybe even include an example in it.

@davidperezgar
Copy link
Member Author

Ok!

@davidperezgar
Copy link
Member Author

Yes, you're right. The error message wasn't good enough. I've clarified the Case-Sensitive idea.

@davidperezgar davidperezgar changed the title Added check for duplicated file names Added check for case sensitive file names Jan 8, 2025
@davidperezgar davidperezgar changed the title Added check for case sensitive file names Added check for case sensitive duplicated file names Jan 8, 2025
davidperezgar and others added 3 commits January 9, 2025 19:39
Co-authored-by: Pascal Birchler <pascalb@google.com>
Co-authored-by: Pascal Birchler <pascalb@google.com>
@davidperezgar davidperezgar merged commit c7348a9 into trunk Jan 9, 2025
23 checks passed
@davidperezgar davidperezgar deleted the 710-check-look-for-duplicated-filenames branch January 9, 2025 22:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Testing Anything that needs testing from a developer perspective
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Check: Look for case sensitive duplicated filenames
3 participants