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
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | 3337327-4.9.5.x.patch | 472 bytes | spokje |
| #3 | 3337327-3.10.0.x.patch | 1.05 KB | spokje |
| #2 | 3337327-2.10.1.x.patch | 1.27 KB | spokje |
Comments
Comment #2
spokjeComment #3
spokjeComment #4
spokjeComment #5
spokjeComment #6
smustgrave commentedChange looks good.
Comment #7
jungleIt 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?
Comment #8
spokjeAgreed, but over in #336828: Timezone settings via Install profile? and #336828: Timezone settings via Install profile? it looks like it was decided it's taking too long. #3336828: File dictionary.txt is not sorted
Comment #9
longwaveIn the 10.x patches:
Where is this coming from, and why isn't it currently picked up as an error?
Comment #10
spokjeGood questions @longwave (rather unsurprising, since that's usually the case).
This seems to be coming from here: https://git.drupalcode.org/project/drupal/-/blob/10.1.x/core/tests/Drupa...
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-dictafterwards.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.shdo ayarn spellcheck:make-drupal-dictwhenever 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?Comment #11
quietone commentedWe 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.
Comment #12
spokjeThanks @quietone, makes perfect sense.
I've opened #3338155: Run CSpell on all files when CSpell-related files change for that, removing
Needs followuptag.Comment #15
catchFollow-up is a good idea.
Committed/pushed the respective three patches to the respective three branches, thanks!