Problem/Motivation

Follow up #2972224: Add .cspell.json to automate spellchecking in Drupal core, cspell, A Spell Checker for Code, is introduced to avoid misspelling in core.

It is an NPM package, but it's fine having it installed globally.

npm -g install cspell

See the change record for more See https://www.drupal.org/node/3122084

Proposed resolution

Add a step:cspell to validate_codebase.

Remaining tasks

Needs discussion

User interface changes

API changes

Data model changes

Release notes snippet

Comments

jungle created an issue. See original summary.

alexpott’s picture

Yeah this could add it to our package.json. We'll need to do a dependency evaluation in that case.

avpaderno’s picture

If it's only required to add a step to validate_codebase, should not it be added to the drupalci.yml file used from Drupal core? Customizing DrupalCI Testing for Projects seems to suggest that is the way to customize tests for a project.

I apologize: The documentation shows how to add new steps to the drupalci.yml file, but the dependencies necessary to run those steps need to be installed. This issue is asking to install a NPM package to run cspell together the other tests.

jonathan1055’s picture

Hasn't this feature already been completed?

I came here looking for how to enable cspell in contrib testing.

avpaderno’s picture

@jonathan1055 No, it hasn't. Testing a contributed module doesn't run cspell.

jonathan1055’s picture

Thanks @apaderno. So is this issue all about how to support cspell for contrib module testing? I am sure I have seen it already running on core issue tests on drupal.org.

avpaderno’s picture

I take this issue is about installing cspell globally and add a new step to the drupalci.yml file used by default. This would allow to run cspell for Drupal core without the changes done on the Drupal core files, and to run cspell for all the contributed modules without committing extra files in their repositories (except the cspell settings files).

drunken monkey’s picture

Status: Active » Closed (outdated)

Supported since the switch to GitLab CI.