Problem/Motivation

As code is updated sometime misspelled words are removed without removing them from our dictionary.

Proposed resolution

Rebuild our dictionary - removing words that are no longer in the code base.

Remaining tasks

User interface changes

None

API changes

None

Data model changes

None

Release notes snippet

N/a

Comments

alexpott created an issue. See original summary.

alexpott’s picture

Status: Active » Needs review
StatusFileSize
new1.19 KB
alexpott’s picture

I created the new dictionary on 9.2.x with the command yarn run spellcheck:make-drupal-dict

I then ran the against 9.1.x using the new dictionary...

yarn run spellcheck:core
yarn run v1.22.5
$ cspell "**/*" ".*" "../composer/**/*" "../composer.json"
CSpell: Files checked: 15134, Issues found: 0 in 0 files
✨  Done in 247.44s.
xjm’s picture

Title: Remove misspelt words from dictionary that are no longer used » Remove misspelled words from dictionary that are no longer used
alexpott’s picture

StatusFileSize
new307 bytes
new1.3 KB
longwave’s picture

  1. +++ b/core/misc/cspell/dictionary.txt
    @@ -819,7 +813,6 @@ jssdk
    -junit
    

    Why is this removed when we still have instances of it?

    core/lib/Drupal/Core/Test/PhpUnitTestRunner.php
    67:   * Returns the path to use for PHPUnit's --log-junit option.
    115:   *   A filepath to use for PHPUnit's --log-junit option.
    146:      '--log-junit',
    
    core/tests/Drupal/Tests/Core/Test/JUnitConverterTest.php
    51:    vfsStream::setup('junit_test', NULL, ['empty.xml' => '']);
    52:    $this->assertSame([], JUnitConverter::xmlToRows(23, vfsStream::url('junit_test/empty.xml')));
    59:    $junit = <<<EOD
    79:    $this->assertEquals($simpletest, JUnitConverter::xmlElementToRows(23, new \SimpleXMLElement($junit)));
    86:    $junit = <<<EOD
    99:    $this->assertEquals($simpletest, JUnitConverter::convertTestCaseToSimpletestRow(23, new \SimpleXMLElement($junit)));
    
  2. +++ b/core/misc/cspell/dictionary.txt
    @@ -1915,7 +1905,6 @@ users's
    -uuids
    

    Same here, this is used all over core as a variable name.

I checked the other cases and see why they are removed, but not these.

longwave’s picture

Status: Needs review » Reviewed & tested by the community

Oh, I bet #3174884: Update yarn dependencies for Drupal 9.1.0 updated the base dictionaries and therefore these are considered real words now. RTBC :)

alexpott’s picture

@longwave yep - we should file some upstream MRs :)

jungle’s picture

Any chance to land #3138746: Fix 45 "shouldBeCamelCased" and related typos in core or it needs re-roll later on?

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 5: 3178581-5.patch, failed testing. View results

longwave’s picture

Status: Needs work » Reviewed & tested by the community

Random fail.

Drupal\BuildTests\Framework\Tests\BuildTestTest::testPortMany
RuntimeException: Unable to start the web server.
alexpott’s picture

StatusFileSize
new1.2 KB

Rerolled as #3138746: Fix 45 "shouldBeCamelCased" and related typos in core has landed

Re-generated dictionary as above.

  • catch committed a5c38cd on 9.2.x
    Issue #3178581 by alexpott, longwave: Remove misspelled words from...
catch’s picture

Version: 9.2.x-dev » 9.1.x-dev
Status: Reviewed & tested by the community » Fixed

Committed/pushed to 9.2.x and cherry-picked to 9.1.x, thanks!

  • catch committed ad948d2 on 9.1.x
    Issue #3178581 by alexpott, longwave: Remove misspelled words from...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.