Problem/Motivation

As title, visit #3122088: [Meta] Remove spelling errors from dictionary.txt and fix them for the background.

Proposed resolution

  • Remove typos exeption|gaurd|ouptut|withut|defintion from core/misc/cspell/dictionary.txt
  • Replace exeption with exception
  • Replace gaurd with guard
  • Replace ouptut with output
  • Replace withut with without
  • Replace defintion with definition

Command recommended for searching typos:

$ grep -irEn --exclude-dir=core/node_modules "exeption|gaurd|ouptut|withut|defintion" core composer composer.json

Verification:

Run cd core && yarn install && yarn run spellcheck:core to make sure that spelling check passes.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Comments

jungle created an issue. See original summary.

jameszhang023’s picture

working on this

jungle’s picture

Title: Fix typoes: "prefech|traslation|commmand|exeption|gaurd|ouptut|inorrect|withut" in core » Fix typos: "prefech|traslation|commmand|exeption|gaurd|ouptut|inorrect|withut" in core
Issue summary: View changes
jameszhang023’s picture

Assigned: Unassigned » jameszhang023
StatusFileSize
new7.5 KB
jungle’s picture

Issue summary: View changes
Status: Active » Needs work
+++ b/core/misc/cspell/dictionary.txt
@@ -327,7 +327,7 @@ comida
 commenters
-commmand
+command

@@ -605,7 +605,7 @@ evenodd
-exeption
+exception

@@ -726,7 +726,7 @@ funic
-gaurd
+guard

@@ -854,7 +854,7 @@ indrelid
-inorrect
+incorrect

@@ -1292,7 +1292,7 @@ othername
-ouptut
+output

@@ -1396,7 +1396,7 @@ preconfigured
-prefech
+prefetch

@@ -1935,7 +1935,7 @@ transitionend
-traslation
+translation

@@ -2157,7 +2157,7 @@ wiget
-withut
+without

Sorry, for typoes in core/misc/cspell/dictionary.txt, they should be removed. Updating the Proposed resolution section in the issue summary about this.

jungle’s picture

Title: Fix typos: "prefech|traslation|commmand|exeption|gaurd|ouptut|inorrect|withut" in core » Fix typos: "exeption|gaurd|ouptut|withut" in core
Issue summary: View changes

Rescoping due to 4 of them are covered by #3156266: Fix 70 spelling mistakes.

jungle’s picture

Title: Fix typos: "exeption|gaurd|ouptut|withut" in core » Fix typos: "exeption|gaurd|ouptut|withut|defintion" in core
Issue summary: View changes

Add one more: defintion -> definition

jungle’s picture

Add one more: defintion -> definition, I think this is enough for a new contributor.

jungle’s picture

Issue summary: View changes

Forgot to update the command recommended for searching typos.

jameszhang023’s picture

Assigned: jameszhang023 » Unassigned
Status: Needs work » Needs review
StatusFileSize
new8.66 KB
jameszhang023’s picture

StatusFileSize
new8.58 KB

Status: Needs review » Needs work

The last submitted patch, 11: 3159528-11.patch, failed testing. View results

jungle’s picture

gaurd hasn't been removed from the dictionary. #11 is a random failure, re-queued.

longwave’s picture

+++ b/core/tests/Drupal/Tests/Core/Plugin/PluginWithFormsTraitTest.php
@@ -42,7 +42,7 @@ public function providerGetFormClass() {
       'block plugin without forms, "tickle" operation'    => [$block_plugin_without_forms, 'tickle', NULL],
-      'block plugin withut forms, "poke" operation'       => [$block_plugin_without_forms, 'poke', NULL],
+      'block plugin without forms, "poke" operation'       => [$block_plugin_without_forms, 'poke', NULL],

This line also needs realigning with the previous one.

jungle’s picture

+++ b/core/tests/Drupal/Tests/Core/Plugin/PluginWithFormsTraitTest.php
@@ -42,7 +42,7 @@ public function providerGetFormClass() {
       'block plugin without forms, "configure" operation' => [$block_plugin_without_forms, 'configure', TestClass::class],
       'block plugin without forms, "tickle" operation'    => [$block_plugin_without_forms, 'tickle', NULL],
...
       'block plugin with forms, "configure" operation' => [$block_plugin_with_forms, 'configure', TestClass::class],
       'block plugin with forms, "tickle" operation'    => [$block_plugin_with_forms, 'tickle', NULL],
       'block plugin with forms, "poke" operation'      => [$block_plugin_with_forms, 'poke', static::class],

Thanks @longwave for the review. Re #14. If so, I would suggest removing the redundant whitespaces before all =>s in providerGetFormClass()

jameszhang023’s picture

StatusFileSize
new8.98 KB
new1.74 KB

I was too careless, I have uploaded a new patch, thank you @jungle and @longwave for pointing out the problem.

jungle’s picture

Status: Needs work » Reviewed & tested by the community
$ grep -irEn --exclude-dir=core/node_modules "exeption|gaurd|ouptut|withut|defintion" core composer composer.json
[no output]

$ cd core && yarn install && yarn run spellcheck:core
yarn install v1.22.4
[1/5] 🔍  Validating package.json...
[2/5] 🔍  Resolving packages...
success Already up-to-date.
✨  Done in 0.66s.
yarn run v1.22.4
$ cspell "**/*" "../composer/**/*" "../composer.json"
CSpell: Files checked: 14625, Issues found: 0 in 0 files
✨  Done in 270.88s.


All changes are tests relevant, no CS violations. It's good to go.

Thanks!

jameszhang023’s picture

@jungle thanks for mentoring:)

alexpott’s picture

Version: 9.1.x-dev » 8.9.x-dev
Status: Reviewed & tested by the community » Fixed

Committed 38d02d6 and pushed to 9.1.x. Thanks!
Committed e8afa49 and pushed to 9.0.x. Thanks!

Backported to 8.9.x without the dictionary change and fixing the conflicts in ConfigSchemaTest

The whitespace change in PluginWithFormsTraitTest on unrelated lines is out-of-scope. Our standards allow aligning of arrays like this.

diff --git a/core/tests/Drupal/Tests/Core/Plugin/PluginWithFormsTraitTest.php b/core/tests/Drupal/Tests/Core/Plugin/PluginWithFormsTraitTest.php
index 86018d1f83..2a78baca9f 100644
--- a/core/tests/Drupal/Tests/Core/Plugin/PluginWithFormsTraitTest.php
+++ b/core/tests/Drupal/Tests/Core/Plugin/PluginWithFormsTraitTest.php
@@ -41,11 +41,11 @@ public function providerGetFormClass() {
     ]);
     return [
       'block plugin without forms, "configure" operation' => [$block_plugin_without_forms, 'configure', TestClass::class],
-      'block plugin without forms, "tickle" operation' => [$block_plugin_without_forms, 'tickle', NULL],
-      'block plugin without forms, "poke" operation' => [$block_plugin_without_forms, 'poke', NULL],
+      'block plugin without forms, "tickle" operation'    => [$block_plugin_without_forms, 'tickle', NULL],
+      'block plugin without forms, "poke" operation'      => [$block_plugin_without_forms, 'poke', NULL],
       'block plugin with forms, "configure" operation' => [$block_plugin_with_forms, 'configure', TestClass::class],
-      'block plugin with forms, "tickle" operation' => [$block_plugin_with_forms, 'tickle', NULL],
-      'block plugin with forms, "poke" operation' => [$block_plugin_with_forms, 'poke', static::class],
+      'block plugin with forms, "tickle" operation'    => [$block_plugin_with_forms, 'tickle', NULL],
+      'block plugin with forms, "poke" operation'      => [$block_plugin_with_forms, 'poke', static::class],
     ];
   }
 

Changed back on commit.

  • alexpott committed 38d02d6 on 9.1.x
    Issue #3159528 by jameszhang023, jungle, longwave: Fix typos: "exeption|...

  • alexpott committed e8afa49 on 9.0.x
    Issue #3159528 by jameszhang023, jungle, longwave: Fix typos: "exeption|...

  • alexpott committed 017a815 on 8.9.x
    Issue #3159528 by jameszhang023, jungle, longwave: Fix typos: "exeption|...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.