- Issue created by @spokje
- Issue was unassigned.
- π³πΏNew Zealand quietone
I thought that this was fixed but on doing some research I see that I did an incorrect reroll at #3328741-28: Add a dictionary for Drupal-specific words β .
+++ b/core/scripts/dev/commit-code-check.sh @@ -176,7 +176,7 @@ - if [[ $FILE == "core/misc/cspell/dictionary.txt" || $FILE == "core/.cspell.json" ]]; then + if [[ $FILE == "core/misc/cspell/dictionary.txt" || $FILE == "core/misc/cspell/drupal-dictionary.txt" ]]; then
The error was to remove the check on
core/.cspell.json
. That should be restored.Anything else?
- π³πΏNew Zealand quietone
I think we need to spell check core when
"core/.cspell.json"
changes, which isn't currently done. - First commit to issue fork.
- Merge request !10812#3338155 Run CSpell on all files when core dictionaries or cspell config file are changed β (Closed) created by jonathan1055
- π¬π§United Kingdom jonathan1055
I have made the suggested change to check if core/.cspell.json is one of the files that is changed.
First test just changing one other real file - all others are taken from cache. One failure reported as expected
https://git.drupalcode.org/issue/drupal-3338155/-/jobs/3899895Make a change to .cspell.json - every file is tested (not from cache) - still only 1 error, as expected
https://git.drupalcode.org/issue/drupal-3338155/-/jobs/3899954Undo the addition of the incorrect word - all files checked, all pass
https://git.drupalcode.org/issue/drupal-3338155/-/jobs/3900011Remove one word from the core dictionary - all files checked, 76 occurrences reported
https://git.drupalcode.org/issue/drupal-3338155/-/jobs/3900133Put back the dropped dictionary word and add 'unusual' to the flagwords. This shows that only a change to .cspell.json (and not the dictionary) is sufficient to test all files. Cache is not used, and six words reported as expected
https://git.drupalcode.org/issue/drupal-3338155/-/jobs/3900261Temporary flagwords change removed. All files read from cache. Back to green.
https://git.drupalcode.org/issue/drupal-3338155/-/jobs/3900371As a side note, I found it quite tedious to discover which files and words were being reported. With 15,800 file names beig displayed (you need to view the whole log) it is not easy see them. I had the advantage that I knew what the mis-spelled word(s) were that could search for, but if this was an ordinary pipeline job, and I had made a typo it would take internal knowledge of the cspell message text to be able to find them. A really nice improvement would be if the cspell detects any words than it is run again, without displaying the file names of every file being checked, and also has the --suggest option added, so it is easy to fix the errors. But that is for another issue.
This is ready for review.
- π¬π§United Kingdom jonathan1055
I wanted to check the existing behavior, with a change to .cspell.json but not to commit-code-check.sh
and I was surprised to see that all files seem to be checked.
https://git.drupalcode.org/issue/drupal-3338155/-/jobs/3900589
Then I realised that this script is not controlling the pipeline cspell job at all, it is for local use only. So all the testing above was pretty much a waste of time :-)Still, this is ready for review anyway.
- πΊπΈUnited States smustgrave
Seems pretty straight forward and makes sense to run.
- π¬π§United Kingdom jonathan1055
Thanks @smustgrave
I would like to use this MR for another spelling check. Then I will restore and put back to RTBC.
Jonathan - π¬π§United Kingdom jonathan1055
I've removed the test files added in #12, so back to the state of RTBC from #11
-
longwave β
committed 2264713d on 11.x
Issue #3338155 by jonathan1055, spokje, quietone: Run CSpell on all...
-
longwave β
committed 2264713d on 11.x
Automatically closed - issue fixed for 2 weeks with no activity.