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

Code quality: Fix typos #67304

Open
wants to merge 13 commits into
base: trunk
Choose a base branch
from
Open

Code quality: Fix typos #67304

wants to merge 13 commits into from

Conversation

szepeviktor
Copy link

@szepeviktor szepeviktor commented Nov 26, 2024

What?

Found few years of typos.

How?

Would you like me to work on it?

https://github.com/crate-ci/typos

Copy link

github-actions bot commented Nov 26, 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: szepeviktor <[email protected]>
Co-authored-by: gziolo <[email protected]>
Co-authored-by: t-hamano <[email protected]>
Co-authored-by: spacedmonkey <[email protected]>
Co-authored-by: Mamaduka <[email protected]>
Co-authored-by: michalczaplinski <[email protected]>
Co-authored-by: getdave <[email protected]>

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

Copy link

Warning: Type of PR label mismatch

To merge this PR, it requires exactly 1 label indicating the type of PR. Other labels are optional and not being checked here.

  • Type-related labels to choose from: [Type] Automated Testing, [Type] Breaking Change, [Type] Bug, [Type] Build Tooling, [Type] Code Quality, [Type] Copy, [Type] Developer Documentation, [Type] Enhancement, [Type] Experimental, [Type] Feature, [Type] New API, [Type] Task, [Type] Technical Prototype, [Type] Performance, [Type] Project Management, [Type] Regression, [Type] Security, [Type] WP Core Ticket, Backport from WordPress Core, Gutenberg Plugin.
  • Labels found: .

Read more about Type labels in Gutenberg. Don't worry if you don't have the required permissions to add labels; the PR reviewer should be able to help with the task.

@github-actions github-actions bot added the First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository label Nov 26, 2024
Copy link

👋 Thanks for your first Pull Request and for helping build the future of Gutenberg and WordPress, @szepeviktor! In case you missed it, we'd love to have you join us in our Slack community.

If you want to learn more about WordPress development in general, check out the Core Handbook full of helpful information.

Copy link
Contributor

@t-hamano t-hamano left a comment

Choose a reason for hiding this comment

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

@szepeviktor Thanks for the cleanup.

I think this PR contains a lot of unnecessary changes that need to be fixed and go through all CI. Could you address these issues?

docs/manifest.json Outdated Show resolved Hide resolved
packages/components/src/combobox-control/test/index.tsx Outdated Show resolved Hide resolved
packages/components/src/utils/strings.ts Outdated Show resolved Hide resolved
packages/react-native-editor/bin/test-e2e-setup.sh Outdated Show resolved Hide resolved
patches/react-autosize-textarea+7.1.0.patch Outdated Show resolved Hide resolved
@michalczaplinski michalczaplinski added the [Type] Code Quality Issues or PRs that relate to code quality label Nov 26, 2024
Copy link
Contributor

@michalczaplinski michalczaplinski left a comment

Choose a reason for hiding this comment

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

I'd recommend to severely limit the scope of this PR. It's very hard to review and approve 436 typos across 259 files. As previously noted, many of the "typos" are not really typos here at all.

How about starting with just the typos in markdown files and code comments?

@szepeviktor
Copy link
Author

szepeviktor commented Nov 26, 2024

How about starting with just the typos in markdown files and code comments?

This is a good idea.
Although there are approx. 0 Markdown files involved and Typos works this way: typos -w.
So there is no --do-not-touch-the-code switch.

A) I could close this PR and provide you with my Typos configuration
B) I could work on this PR to remove all false positives

Please decide!

@szepeviktor
Copy link
Author

szepeviktor commented Nov 26, 2024

I've done all I could.

Copy link
Contributor

@t-hamano t-hamano left a comment

Choose a reason for hiding this comment

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

Thanks for the update. I have left additional feedback.

Could you resolve the lint errors first to ensure it passes all CI? If you run npm run lint:js:fix, all lint errors will be resolved.

docs/manifest.json Outdated Show resolved Hide resolved
packages/eslint-plugin/utils/constants.js Outdated Show resolved Hide resolved
packages/react-native-aztec/android/settings.gradle Outdated Show resolved Hide resolved
packages/react-native-bridge/android/build.gradle Outdated Show resolved Hide resolved
packages/react-native-bridge/android/settings.gradle Outdated Show resolved Hide resolved
packages/react-native-bridge/android/settings.gradle Outdated Show resolved Hide resolved
@szepeviktor
Copy link
Author

Thanks for the update. I have left additional feedback.

I've done all I could.
Please find another contributor who will finish this PR.

@szepeviktor
Copy link
Author

All right. One last commit.

Copy link
Contributor

@getdave getdave left a comment

Choose a reason for hiding this comment

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

Thank you for all the effort here.

I would echo the comments of some other reviewers that it would be preferable to break this out into separate PRs for:

  • Markdown
  • Code comments
  • Code changes (e.g variable renaming...etc)

That would:

  • Make it easier to review
  • Easier to revert in case of Issue.

When reviewing 256 files for changes it's easy to miss how a given change might impact the file as a whole.

I'd certainly feel a lot more comfortable if it was possible.

@szepeviktor
Copy link
Author

szepeviktor commented Dec 2, 2024

Hello Dave!

The thing is this PR is a typos exercise for me.
typos works like: typos -w

We need someone who can cherrypick files for your three categories.

@szepeviktor
Copy link
Author

... maybe an LLM

docs/manifest.json Outdated Show resolved Hide resolved
@gziolo gziolo added the No Core Sync Required Indicates that any changes do not need to be synced to WordPress Core label Dec 23, 2024
@gziolo
Copy link
Member

gziolo commented Dec 23, 2024

@t-hamano, I addressed your feedback related to the slug change for the developer documentation page. I also rebased the PR with the latest changes from trunk. There are so many quality improvements that it would be worth bringing it to the finish line.

Could you resolve the lint errors first to ensure it passes all CI? If you run npm run lint:js:fix, all lint errors will be resolved.

Yes, all of the issues are reported because of differences with how Prettier formats code. By the way, it would be cool to have GitHub integration that can be triggered with the label to automatically fix such issues.

@szepeviktor, that a cool usage of the tool. Very impressive given the complexity of the Gutenberg codebase. Thank you for working on this PR.

@gziolo gziolo changed the title Fix typos Code quality: Fix typos Dec 23, 2024
@@ -3417,7 +3417,7 @@ protected static function should_override_preset( $theme_json, $path, $override

/**
* Returns the default slugs for all the presets in an associative array
* whose keys are the preset paths and the leafs is the list of slugs.
* whose keys are the preset paths and the leaves is the list of slugs.
Copy link
Contributor

Choose a reason for hiding this comment

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

Note: This typo is already fixed in the core, so a backport changelog should not be necessary.

https://github.com/WordPress/wordpress-develop/blob/07be2445e45066147105206da08acf31bcee974d/src/wp-includes/class-wp-theme-json.php#L3386

@t-hamano
Copy link
Contributor

@gziolo Thanks for the fix.

I've checked all the files again and we should be able to ship this PR.

Could you resolve the lint errors first to ensure it passes all CI? If you run npm run lint:js:fix, all lint errors will be resolved.

Yes, all of the issues are reported because of differences with how Prettier formats code. By the way, it would be cool to have GitHub integration that can be triggered with the label to automatically fix such issues.

What would it take to get the Static Analysis CI to pass? I checked out this branch and opened the file that is causing the lint error, but my code editor doesn't give any warnings 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository No Core Sync Required Indicates that any changes do not need to be synced to WordPress Core [Type] Code Quality Issues or PRs that relate to code quality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants