Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to check-spelling v0.0.22 #241

Merged
merged 4 commits into from
Oct 24, 2023

Conversation

jsoref
Copy link
Contributor

@jsoref jsoref commented Oct 24, 2023

What's changed?

  • I'm refreshing the metadata using updates to https://github.com/check-spelling/spell-check-this
    • a grammar/spelling fix (caught by the refresh)
    • the workflow will now run when (if) dependabot creates a PR (dependabot is "special")
  • I'm dropping a number of dictionaries from the workflow. One (fsharp) happened to have a typo in it (which i've fixed upstream) -- there's a tension between too many dictionaries (with a risk of them also having typos) and too few (which means too many items in expect and thus it's too hard to spot new typos) -- at times I actually drop extra dictionaries from check-spelling entirely (the c++ and win32 dictionaries turned out to be sufficiently bad that suggesting them was a bad idea)
    • a spelling fix (see above)
  • converting some expect items to patterns so that normal typos for the words aren't accepted

check-spelling is smarter :)

What's your motivation?

Upgrading clients to v0.0.22

Anything in particular you'd like reviewers to focus on?

Anyone you would like to review specifically?

Have you considered any alternatives or workarounds?

Any additional context

Checklist

  • I've added unit tests to cover both positive and negative cases
  • I've added the license header to any new files through ./gradlew licenseFormat
  • I've used the IntelliJ IDEA auto-formatter on affected files

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
To avoid false negatives for typos of these items outside the specific cases

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
@jsoref jsoref force-pushed the check-spelling-0-0-22 branch from 61aa656 to ad31b08 Compare October 24, 2023 13:39
@@ -1,7 +1,6 @@
Controlflow
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm sorting this file -- check-spelling doesn't care

github
https
ssh
ubuntu
workarounds
Controlflow
controflow
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This appears to be a typo that didn't seem necessary

Comment on lines -159 to +164
# binanace
# binance
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I had a typo in my files -- the hazard of excluding them by default -- it took a while for me to catch 😊

@@ -138,7 +142,6 @@ MDBs
methoddeclaration
micronaut
Migratetohypersistenceutilshibernate
Migratetohypersistenceutilshibernate6
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check-spelling will now complain about things like this (expect only wants words, and by default numbers can't be in words -- although with this version you could actually change the definition of a word...)

Comment on lines +14 to +15
# s.b. cannot
\b[Cc]an not\b
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This caught an item below

Comment on lines -13 to -14
# Non-English
[a-zA-Z]*[ÀÁÂÃÄÅÆČÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝßàáâãäåæčçèéêëìíîïðñòóôõöøùúûüýÿĀāŁłŃńŅņŒœŚśŠšŜŝŸŽžź][a-zA-Z]{3}[a-zA-ZÀÁÂÃÄÅÆČÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝßàáâãäåæčçèéêëìíîïðñòóôõöøùúûüýÿĀāŁłŃńŅņŒœŚśŠšŜŝŸŽžź]*|[a-zA-Z]{3,}[ÀÁÂÃÄÅÆČÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝßàáâãäåæčçèéêëìíîïðñòóôõöøùúûüýÿĀāŁłŃńŅņŒœŚśŠšŜŝŸŽžź]|[ÀÁÂÃÄÅÆČÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝßàáâãäåæčçèéêëìíîïðñòóôõöøùúûüýÿĀāŁłŃńŅņŒœŚśŠšŜŝŸŽžź][a-zA-Z]{3,}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check-spelling didn't suggest this, so apparently whichever content used to be present is no longer checked/matched and thus it didn't make sense to carry it. If it reappears, check-spelling will suggest it again.

Comment on lines +65 to +72
# Due to misspelling in a recipe
JavaxPeristenceXmlToJakartaPersistenceXml

# Due to misspelling in a recipe
MigrateHibernateContraintsToJavax

# brand
\[Spring Initializr\]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are to remove a couple of items from expect as noted in the PR description

experimental_apply_changes_via_bot: ${{ github.repository_owner != 'openrewrite' && 1 }}
use_sarif: ${{ (!github.event.pull_request || (github.event.pull_request.head.repo.full_name == github.repository)) && 1 }}
extra_dictionary_limit: 10
dictionary_source_prefixes: |
{"cspell": "https://raw.githubusercontent.com/check-spelling/cspell-dicts/v20220816/dictionaries/", "cspell1": "https://raw.githubusercontent.com/check-spelling/cspell-dicts/v20230509/dictionaries/"}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the paths used originally were based on the version here, so there's no longer a need for the 1 prefix.

Comment on lines -112 to -122
cspell1:aws/aws.txt
cspell1:npm/dict/npm.txt
cspell1:java/src/java.txt
cspell1:k8s/dict/k8s.txt
cspell1:typescript/dict/typescript.txt
cspell1:filetypes/filetypes.txt
cspell1:fullstack/dict/fullstack.txt
cspell1:python/src/python/python-lib.txt
cspell1:scala/dict/scala.txt
cspell1:php/dict/php.txt
cspell1:node/dict/node.txt
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a bunch of these didn't seem to have enough value to retain ...

Copy link
Contributor

@mike-solomon mike-solomon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks so much for doing all of this! It really helps :D

@mike-solomon mike-solomon merged commit d2a3b90 into openrewrite:master Oct 24, 2023
3 checks passed
@jsoref jsoref deleted the check-spelling-0-0-22 branch October 24, 2023 15:03
mike-solomon pushed a commit that referenced this pull request Oct 26, 2023
* spelling: cannot

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: occurrence

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* Move some entries to patterns

To avoid false negatives for typos of these items outside the specific cases

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* Update check-spelling to v0.0.22

---------

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants