Closed (fixed)
Project:
Coding Standards
Component:
Miscellaneous
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
30 May 2025 at 14:07 UTC
Updated:
16 Jun 2025 at 22:29 UTC
Jump to comment: Most recent
This is a follow-up to #3521924: Convert Coding Standards to GitLab pages. We need to run cspell to check spelling in all the documentation files.
These are the remaining misspelled words.
rdbms - Valid abbrevation,
Person's name
likely to be removed in #3324368: Update CSS coding standards to include PostCSS and Drupal 10
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
jonathan1055 commented[removed]
Comment #4
jonathan1055 commentedI have pushed an initial commit to check what happens with no customized skip or opt-in settings. The four validation/linting jobs that are run are:
The two validation/linting jobs which do not get run are phpstan (we have no .php files) and stylelint (we have no .css files)
MR2 is ready for review and feedback.
Comment #5
jonathan1055 commentedInitial cspell results
The shortest wordlength defaults to 4, so for some made-up ids we can shorten it from 4 to 3 letters. I fixed the 'lorem ipsum' phrases. The words are in a standard dictionary, but the pages were not using the generally agreed spellings, so I fixed that. Plus some actually misspelled words, and UK -> US English variants. Re-run and we have the reduced counts:
There are various ways to proceed here, we can create a project words file to add the unrocognised words, but its probably better to make the docs use real words if possible. Some words may need to be added to a custom dictionary, but not all of them.
Comment #6
jonathan1055 commentedIgnoring the section of the file that has SQL keywords made a big improvement
I have also added a project dictionary (using the default
.cspell-project-words.txtfilename), and we get down to:I will stop here, and let you review and give feedback, before doing any more additions or corrections.
Comment #7
dwwSo far, changes mostly look good. Opened 1 MR thread, though.
Also, since cspell is the primary thing we want CI to enforce, and since there are no other “tests” we might run, regardless of spelling errors, shall we set
allow_failure: falsefor that job?Comment #10
quietone commentedI worked on removing words for the local list and the errors reported.
That brings the errors down to 14, which I'd be find moving to the local project words. Although, maybe gulpfile and navbars can be changed?
That leaves the sql words and changing to failing on spelling errors.
Comment #11
quietone commentedIt may be the lack of navigation that is making the GitLab pages. Although I made a separate issue for that shall we add that here. I have the nav locally and it works locally. So, let me know if it can be added here. Thanks.
Comment #12
jonathan1055 commentedI have added the change to make the job fail red, not amber warning. Nice work on editing to remove more unknown words. The only question I have is that you have changed all
mymoduleintomy_moduleto remove 'mymodule' from the project dictionary. But I would suggest that "mymodule" is quite a common word used in program documentaion and examples, so I thought it would be better to allow that word. If we don't then future updates are likely to fail on spelling and we'll end up with varying versions of myModule, my_module, and other examples. It's fine if you want to stick to my_module, I'm just raising the discussion :-)I suggest we focus here on the spelling, and do the navigation on #3527422: Add navigation where I have already made some comments about it.
Comment #13
quietone commentedIt may be common, it is also a misspelling. It was removed from Drupal core dictionary.txt in Feb 2024, #3417675: Correct mymodule, mydriver and anothermodule. So, we should re-introduce a misspelling in any of the examples.
Comment #14
quietone commented@jonathan1055, thanks for changing this to fail.
I updated the IS with the remaining misspelled words and where they are used. I then added them to the local dictionary. We know have a green run.
Comment #15
jonathan1055 commentedAh. OK thanks for that background. Yes of course we don't want to add it back.
Now that you've added those custom words to the project dictionary this is RTBC. But also so is MR4. So which ever you merge first, I can rebase the other and resolve the conflict.
Comment #17
quietone commentedThe point @dww made was answered but we haven't heard back. Since that can changed in another issue I have committed this in order to get the these jobs running.
Thanks folks!