Problem/Motivation

As discovered in #3336828: File dictionary.txt is not sorted our CSpell dictionary core/misc/cspell/dictionary.txt is being edited manually.

I've ran $ yarn spellcheck:make-drupal-dict on each active core branch and it looks like we're a bit out of sync.
Let's update the dictionaries in this issue.

Steps to reproduce

Run $ yarn spellcheck:make-drupal-dict and see the differences in core/misc/cspell/dictionary.txt.

Proposed resolution

Run $ yarn spellcheck:make-drupal-dict and commit core/misc/cspell/dictionary.txt.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Comments

Spokje created an issue. See original summary.

spokje’s picture

StatusFileSize
new1.27 KB
spokje’s picture

StatusFileSize
new1.05 KB
spokje’s picture

StatusFileSize
new472 bytes
spokje’s picture

Status: Active » Needs review
smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Change looks good.

jungle’s picture

It took about 90s to run the command on my local `yarn spellcheck:make-drupal-dict`. So, is it necessary/worth writing a test to avoid regression?

spokje’s picture

longwave’s picture

In the 10.x patches:

+++ b/core/misc/cspell/dictionary.txt
@@ -302,6 +300,7 @@ dependees
+derp

Where is this coming from, and why isn't it currently picked up as an error?

spokje’s picture

Good questions @longwave (rather unsurprising, since that's usually the case).

Where is this coming from

This seems to be coming from here: https://git.drupalcode.org/project/drupal/-/blob/10.1.x/core/tests/Drupa...

and why isn't it currently picked up as an error?

Since it's been there since 14/11/2012, I can only imagine we upped our CSpell version (on 10.x) at some point in time and did _not_ ran a yarn spellcheck:make-drupal-dict afterwards.
In that new version, somehow somewhere, derp got deleted from a dictionary within CSpell.

Afterwards the file never changed, so was never checked by CSpell and was never flagged for the, now unknown, word "derp".

I think if we can make core/scripts/dev/commit-code-check.sh do a yarn spellcheck:make-drupal-dict whenever the version of CSpell is bumped, we'll never have this problem again.

Since we basically only bump (nodeJS)-dependencies just before a new release, it's a rather rarely occurring event, so that might weigh up against the time we would need to spend to do a yarn spellcheck:make-drupal-dict?

quietone’s picture

Issue tags: +Needs followup

We also need to rebuild the dictionary when cspell.json changes, #3308419-22: Use all the included dictionaries with cspell

Tagging for a followup to make sure the dictionary is rebuilt when needed.

spokje’s picture

Thanks @quietone, makes perfect sense.

I've opened #3338155: Run CSpell on all files when CSpell-related files change for that, removing Needs followup tag.

  • catch committed fb79f6cc on 10.0.x
    Issue #3337327 by Spokje: CSpell dictionary is out of sync
    

  • catch committed 0daf7963 on 9.5.x
    Issue #3337327 by Spokje: CSpell dictionary is out of sync
    
catch’s picture

Status: Reviewed & tested by the community » Fixed

Follow-up is a good idea.

Committed/pushed the respective three patches to the respective three branches, thanks!

  • catch committed 3db0d4bf on 10.1.x
    Issue #3337327 by Spokje: CSpell dictionary is out of sync
    

Status: Fixed » Closed (fixed)

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