- Issue created by @jonathan1055
- π¨π¦Canada mparker17 UTC-4
In #3422323-15: Improve CSPELL β , I made a suggestion for the overview page, intended for either the "FAQ" section β or the "Common tasks" section β ...
#### How do I ignore words that CSpell thinks are spelling mistakes?
The simplest solution is to add a
.cspell-project-words.txt
file to your project, which follows CSpell's Words List Syntax (i.e.: one word per line; lines starting with#
are comments, words prefixed with~
are matched case-insensitively, etc.).For more advanced configuration, you can add a
.cspell.json
file to your project, which follows CSpell's configuration syntax. Start by copying [Drupal.org's Gitlab Template](link to the assets/.cspell.json added in this merge request) into your project, and customizing it to your needs.To skip CSpell checking altogether, add a
SKIP_CSPELL: "1"
variable to your project's.gitlab-ci.yml
.I dunno if this still makes sense, but it might be something to start iterating on.
- π¬π§United Kingdom jonathan1055
Moved parent to related, and added new parent issue
- πͺπΈSpain fjgarlin
Crossposting #3423238-7: Create a space to document how to customize each of the GitLab CI jobs β
I was thinking more and more about these documentation tasks and I also think we can eat our own food.
Maybe we should have a
docs
folder on the repo and use markdown files to write some of these tasks.
The drupal.org page is a great and recommended entry point for most of the community and it's what people will find after "googling" for it, but we could expand the documentation within this same repo.It'd be very easy to have different dedicated sections, create MRs, etc.
An example of this can be seen here: https://project.pages.drupalcode.org/la_es/setup/
All the contents are driven by this folder: https://git.drupalcode.org/project/la_es/-/tree/1.0.x/docs
And the navigation, configuration, etc come from this file: https://git.drupalcode.org/project/la_es/-/blob/1.0.x/mkdocs.ymlIf we like this approach I can quickly put together "the basics", and we can go from there for this job and the related ones
- π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
π Update to version 1.2.1 of the d.o GitLab CI template and adopt the `cspell` job Needs review just got its first green CI run (https://git.drupalcode.org/project/acquia_migrate/-/jobs/990266) thanks to @mparker17. Lots of words had to be added to a dictionary that core should've included, but somehow doesn't need π€·ββοΈ
MR: https://git.drupalcode.org/project/acquia_migrate/-/merge_requests/52/diffs
Its
.cspell-project-words.txt
file: https://git.drupalcode.org/project/acquia_migrate/-/merge_requests/52/di... - πͺπΈSpain fjgarlin
Please see #3423238-11: Create a space to document how to customize each of the GitLab CI jobs β .
There is an wip MR with a documentation site (available at https://project.pages.drupalcode.org/gitlab_templates/).This issue will either need to be closed as duplicate of that one and we can all join efforts there, or we can mark this one as posponed-pending on that other one (PP-1).
- π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
That issue sounded much bigger in scope. I figured I'd chime in on the issue most closely related to the problems I was facing. I expect the information from this issue to be merged into that other issue anyway? :)
Either way: major thanks to @mparker17! π
- πͺπΈSpain fjgarlin
100%, big thanks!!
WIP but it's one of the first files I created π https://project.pages.drupalcode.org/gitlab_templates/jobs/cspell/
- Status changed to Fixed
8 months ago 2:07pm 7 March 2024 - πͺπΈSpain fjgarlin
The documentation was made live already and mentioned in a few places.
It includes documentation for
cspell
grabbed from #2 and the message we sent when we announced that the job was available.You can see it all here: https://project.pages.drupalcode.org/gitlab_templates/jobs/cspell/
I'm going to mark this one as fixed.
- πΊπΈUnited States theMusician
This is a nice addition. I was trying to implement the ignore paths on a contrib project and I can't get it to work. Thank you @mparker17 as well for the how to exclude with double quotes. Without it, YAML complains about syntax.
https://git.drupalcode.org/project/ableplayer/-/blob/bronsem/3402263/.gi...
However, CSPELL still reviews the excluded directories.
Is the ignore paths just working for core at this moment?
- π¬π§United Kingdom jonathan1055
Updated issue summary with link to the docs page, as that is what people need to see first when they find this issue.
Looking at the list of tasks I wrote, there are more things to add to the doc page.
- π¬π§United Kingdom jonathan1055
Hi theMusician
Yes, the_cspell_ignore_paths
does work for contrib modules. Can you give a link to a pipeline where it is not working for you? - Status changed to Needs work
8 months ago 8:31am 9 March 2024 - πͺπΈSpain fjgarlin
Letβs then reopen and complete here via MR.
@theMusician - try single quotes for the most outer ones and not escaping the double ones. The ignoring does work, Iβve seen it in action in other projects, so itβs a matter of finding the right syntax (I know itβs not straightforward).
- π¬π§United Kingdom jonathan1055
There is lots more to add, but I've pushed the first bit. I have installed mkdocs locally via brew, but not got the pages being served yet. So I can't see how these changes look yet. But it is a start.
- π¬π§United Kingdom jonathan1055
I've done more updates. Most things are covered now, as per issue summary. Will do the rest soon.
- Status changed to Needs review
8 months ago 12:55pm 9 March 2024 - π¬π§United Kingdom jonathan1055
All identified tasks are done. This is ready for review.
- πΊπΈUnited States theMusician
The updated instructions were helpful. I can now get cspell to ignore paths.
I think this example in the md file needs the final single and double quotes reversed.
Instead of
variables: _CSPELL_IGNORE_PATHS: '"tests/data/*", "**/*.log<strong>'"</strong>
It would be
variables: _CSPELL_IGNORE_PATHS: '"tests/data/*", "**/*.log<strong>"'</strong>
That syntax is a lot nicer than the escaping and double quotes in the original help text. Thanks for improving it!
My cspell job still exits with an error code of 1, but is now properly ignoring the paths and skipping over words that I ask it to, so solid progress. Gitlab CI claims I still need a configuration file,
Configuration Error: Failed to read config file: "/builds/project/ableplayer/gitlabci_cspell/ableplayer/.cspell.json"
. The configuration output file looks correct so I must still have something just a little off.Thanks again.
- π¬π§United Kingdom jonathan1055
Thanks for the feedback, pleased to hear that the improved instuctions helped. I have now fixed that final quote pair. I am actually working on an improvement that will mean yuo do not need to do any quoteing, neither in _CSPELL_IGNORE_PATHS or _CSPELL_WORDS, and that will make it alot easier for everyone.
Regarding the error, are you on Slack? I can help you there, just message me directly or post to the #gitlab channel. It would be better to keep this issue focussed on the documentation. If you are not on slack then can you open a new issue please?
- πͺπΈSpain fjgarlin
@jonathan1055 - yeah, at the end of the day, they are markdown files, so we should be able to view them individually.
The docker-based way of running the site locally is documented here https://project.pages.drupalcode.org/gitlab_templates/help/documentation...
If you just have the `mkdocs` binary, you should be able to do `mkdocs serve .`. I just added this to the MR.
- Status changed to RTBC
8 months ago 9:47am 11 March 2024 -
fjgarlin β
committed da664c7c on main authored by
jonathan1055 β
Issue #3423402 by jonathan1055, fjgarlin, Wim Leers, mparker17,...
-
fjgarlin β
committed da664c7c on main authored by
jonathan1055 β
- Status changed to Fixed
8 months ago 10:20am 11 March 2024 - πͺπΈSpain fjgarlin
Fixed. Thanks for the additions.
Improved page: https://project.pages.drupalcode.org/gitlab_templates/jobs/cspell/
Automatically closed - issue fixed for 2 weeks with no activity.