Improve CSPELL

Issue information

From user: jonathan1055

Related to !131 (merged)

Contribution record

Fork management

Problem/Motivation

Following from #3405955: Add job for CSPELL in contrib pipeline we can improve the output and make it easier for maintainers to use the job and start fixing the mis-spelled words.

[edit] During the work here a problem was found where the files in the top-level project folder are not being checked.

Proposed resolution

1. Write the number of mis-spellled words to the log
It would be really informative to show the number of different unrecognised words in the log, right after the cspell summary. This shows instant feedback on how the latest change performed, gives a measure of progress and serves as encouragement to get the number lower.

2. Use a better .cspell.json
Currently if the project does not contain a .cspell.json we create a very plain one, with no dictionaries defined. This means that Drupal words for theme names, and php function names are all reported as unrecognised. Core uses two dictionaries core/misc/cspell/drupal-dictionary.txt and core/misc/cspell/dictionary.txt and other pre-defined dictionaries. These could be added by default as there is no project that can run cspell and will not need these two dictionaries.

3. Check the files in the top-level folder
See issue comment #7-12 for details.

Remaining tasks

All three tasks above are done.

Edited by drupalbot
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information