Gitlab CI - Add module dictionary and resolve outstanding cspell issues.

Created on 26 March 2024, about 1 year ago

Problem/Motivation

There are a large number of module specific terms that cause cspell to give a false negative. This makes it impossible to rely on cspell results and hard to view true results.

Steps to reproduce

View gitlab ci pipelines.

Proposed resolution

Add custom dictionary.
Resolve remaining spelling errors.

Remaining tasks

Add dictionary
Include dictionary
Resolve spelling issues

User interface changes

N/A

API changes

N/A

Data model changes

N/A

📌 Task
Status

Active

Version

4.1

Component

Code

Created by

🇺🇸United States nicxvan

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @nicxvan
  • Merge request !97Resolve #3436045 "Gitlab ci " → (Merged) created by nicxvan
  • Pipeline finished with Success
    about 1 year ago
    Total: 219s
    #129187
  • Pipeline finished with Success
    about 1 year ago
    Total: 189s
    #129189
  • Issue was unassigned.
  • Status changed to Needs review about 1 year ago
  • 🇺🇸United States nicxvan

    I've added a custom dictionary.
    I need to confirm that the custom dictionary is being used.

    I need a maintainer to review the following changes:

    Used in a switch statement (nothing happened in that, but I'm not sure we should update a switch condition)

    • overriden

    Spellings that should be fixed by changing the function calls most likely, ignored for now.

    • ajaxcancel
    • ajaxform
    • cancelurl
    • submiturl

    Should we update instances of chrono with chronological, or add it to the dictionary?

    • chrono

    Unsure if this was intentional or should be reset?

    • Resert
  • Pipeline finished with Success
    about 1 year ago
    #129192
  • Pipeline finished with Skipped
    about 1 year ago
    #129564
  • First commit to issue fork.
  • Status changed to Fixed about 1 year ago
  • 🇨🇦Canada mandclu

    Thanks for your work on this @nicxvan. I've merged your changes, though I do share your concern about changing the case check, but as you say there isn't anything happening within that statement.

    Merged in.

  • 🇮🇪Ireland lostcarpark

    Great to see CSpell issues getting fixed.

    A couple of things that might be worth looking at in follow on issues...

    • We should make cspell mandatory so that new spelling errors can't be ignored. We can do that as follows.
      cspell:
        allow_failure: false
    • The global ignore list is handy for words that we want to use in the project that aren't in CSpell or Drupal's dictionaries, but we should be cautious of letting it grow too much as it could get out of hand if the project expands. Where a word is only used in one file, it might be more appropriate to move it to a // cspell:ignore line at the top of the file where it's needed.
    • Adding variable names to the ignore list is a handy quick fix, but where possible we should look to make variable names more meaningful.
      • For example there are number of variables that are a combination of two words, such as $byhour, which could be separating the words in either snake case or camel case: $by_hour or byHour, making them easier for humans to read, and allowing CSpell to treat as two words.
      • Other variables, such as rdata, could be made more descriptive - presumably the "r" stands for something.
    • If we want to exclude whole files, we could add to a _CSPELL_IGNORE_PATHS variable. Some modules exclude the README file, though disabling for just the maintainer section seems a good solution. It can also be useful for text fixtures.
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024