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

Fixes various typos with codespell #10177

Merged
merged 4 commits into from Dec 13, 2021
Merged

Conversation

lerni
Copy link
Contributor

@lerni lerni commented Dec 12, 2021

Mostly fixes typos in strings, docs & comments

Also some variablenames are renamed:

  • famework/src/Core/CoreKernel.php $environment
  • vendor/silverstripe/framework/src/ORM/DataObject.php $identifier
  • vendor/silverstripe/framework/tests/php/Forms/GridField/GridFieldSortableHeaderTest.php $component

Had a play with codespell - this PR is the outcome. Hopefully someone is willing to review - it's a lot.

@michalkleiner
Copy link
Contributor

Thanks @lerni, nice job. Been thinking of going through the codebase of the core modules at some point, too.

I've started reviewing the changes, got to 30 files so far, the majority is looking good. Should get through the rest today.

Copy link
Contributor

@michalkleiner michalkleiner left a comment

Choose a reason for hiding this comment

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

Ok, went over all the changes.

@lerni the change in GridFieldSortableHeaderTest needs further work, the PR only renames the initial variable when created, but not when used. I've added two change suggestions, but you'd need to go through the class and update all the occurrences.

@michalkleiner
Copy link
Contributor

michalkleiner commented Dec 13, 2021

Three minor things to confirm with @maxime-rainville or @emteknetnz:

  1. The change to CoreKernel about renaming the protected $enviroment variable. Within the framework, I'd say this change is fine, but people might have their own kernels extending CoreKernel and not using the getter/setter methods. Though targetting 4 I'd be happy to mention this in the docs and keep the fix.
  2. Fixing typos in changelogs where they were basically generated from commit messages including the same typos, it would become disconnected, though the commit hash still stays valid. For better legibility of past changelogs, I'd be for keeping the spelling fixes, I don't expect people searching the history of the repo for exact commit message matches.
  3. Inner-method variable name change in DataObject is fine with me, but a confirmation would be good.

@emteknetnz
Copy link
Member

Yup agree with what @michalkleiner has said re 1. and 2. 3. is fine with the rename

Copy link
Contributor

@michalkleiner michalkleiner left a comment

Choose a reason for hiding this comment

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

Thanks @lerni, appreciate the contribution.

@michalkleiner michalkleiner merged commit 552cf59 into silverstripe:4 Dec 13, 2021
@lerni
Copy link
Contributor Author

lerni commented Dec 13, 2021

@michalkleiner thank you for reviewing it so fast: I'm impressed! 💯 ❤️ May this motivates me checking others like CMS with codespell as well 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants