Problem/Motivation

There are words in cspell:ignore lines that are no longer needed.

Steps to reproduce

Proposed resolution

Run the attached script and removed identified words. Also check the words with apostrophes.
Remove commas from the ignore lines.

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Issue fork drupal-3560682

Command icon Show commands

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

quietone created an issue. See original summary.

quietone’s picture

Issue summary: View changes
Status: Active » Needs review

Linting has passed so setting to 'Needs review'

smustgrave’s picture

Status: Needs review » Needs work

Seems some additional spaces were added in the navigation.css, seems minor but now the comments appear to be floating from the css block they're suppose to be on.

If you are another contributor eager to jump in, please allow the previous poster(s) at least 48 hours to respond to feedback first, so they have the opportunity to finish what they started!

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.

quietone’s picture

Status: Needs work » Needs review

I've rebased and ran the script again, which found more words that can be removed.

xjm’s picture

needs-review-queue-bot’s picture

Status: Needs review » Needs work
StatusFileSize
new91 bytes

The Needs Review Queue Bot tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".

This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.

Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.

quietone’s picture

Status: Needs work » Needs review

Rebased and re-ran script.

Also, made an 11.x MR.

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Changes seem fine. Going to mark so you don't have to re-run again hopefully.

benjifisher’s picture

Looking at the attached script, I see that it identifies words that appear only once, in a cspell:ignore comment, so they are never used.

That means the script will miss words that appear in two such comments, or words that do not need to be ignored because of updates to the dictionaries. That includes whatever dictionaries cspell uses by default and our custom dictionaries. I noticed some unnecessary // cspell:ignore quux lines while reviewing #3619969: Fix StaticMap migrate process plugin doc variable names.

I suggest a couple of updates to the attached script for next time:

  1. Count how many times a word appears in the file and compare it to the number of times it appears preceded by cspell:ignore.
  2. Generate a list of all the words in cspell:ignore comments for further inspection.

After (2), we could save the list to a file and run cspell on it. Any word that is not flagged is one that does not need a cspell:ignore comment.

mstrelan made their first commit to this issue’s fork.

mstrelan’s picture

Status: Reviewed & tested by the community » Needs work

I found a lot more words to remove with a different approach. The steps are:

  1. strip all cspell:ignore comments
  2. run cspell on the changed files
  3. gather all the violations
  4. restore the cspell:ignore comments, with non-violations removed
  5. rerun cspell

This passed in CI, but I'm setting NW so I can contribute the script back. It was generated by an LLM and I'd like to provide a human readable version of it.

mstrelan’s picture

Status: Needs work » Needs review
StatusFileSize
new4.05 KB

OK here's the script. It includes a --fix option and runs phpcbf and prettier afterwards. Running against main removes 154 words. Running against 789e79f8 removes 81 words.

needs-review-queue-bot’s picture

Status: Needs review » Needs work
StatusFileSize
new2.25 KB

The Needs Review Queue Bot tested this issue. It fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".

This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.

Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.

xjm’s picture

Issue tags: +beta target
mstrelan’s picture

Status: Needs work » Needs review

Rebased. Not sure it was really necessary of if review bot was having a moment.

needs-review-queue-bot’s picture

Status: Needs review » Needs work
StatusFileSize
new2.25 KB

The Needs Review Queue Bot tested this issue. It fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".

This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.

Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.

benjifisher’s picture

Status: Needs work » Needs review

Despite what the bot said, the CI pipeline passes, including PHPStan.

needs-review-queue-bot’s picture

Status: Needs review » Needs work
StatusFileSize
new2.25 KB

The Needs Review Queue Bot tested this issue. It fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".

This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.

Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.

mstrelan’s picture

Status: Needs work » Needs review
Issue tags: +no-needs-review-bot

Bot is confused.

benjifisher’s picture

Status: Needs review » Needs work

I reviewed the files in batches:

29 under core/modules/ckeditor5/
39 under core/modules/ excluding the first group
20 under core/tests
23 not in any of those groups

In all cases, I confirmed that there were only the expected changes. Some words were removed, some cspell:ignore lines were removed (sometimes along with a neighboring empty line), some cspell:ignore lines were combined after some of the words were removed. The CI job shows that the cspell test still passes, so that is good enough for me.

There were a few places where long lines (more than 80 characters) were replaced by shorter lines, so that is a bonus. There were a few places where two cspell:ignore lines could have been rewrapped. I commented on one such pair just to prove that I was thorough in my review.

Some commas were removed, and a stray single quote ('). So were the instances of "quux" that I mentioned in Comment #12.

I was almost ready to change the status to RTBC, but some of the last few files I reviewed (under core/themes/) had a few problems that I think are worth fixing. See the MR comments.

mstrelan’s picture

Opened #3628986: t() signature in update-countries.sh should match t() in bootstrap.inc so review bot and commit-code-check won't complain about this.