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

Add check spelling #180

Merged
merged 26 commits into from
Nov 19, 2023
Merged

Add check spelling #180

merged 26 commits into from
Nov 19, 2023

Conversation

jsoref
Copy link

@jsoref jsoref commented Nov 19, 2023

Per #78 (comment)

note that check-spelling has gotten a bit smarter since the previous PR.

Here,

  • it's configured to use SARIF for reporting where possible
  • it's configured to check file names
  • there's a longer list of forbidden patterns (generally grammatical faults, e.g. any more.)
  • error reporting is available as a step summary (it's possible to use a comment, but that's generally discouraged by GitHub)
  • dependabot is set up to warn if dictionary changes will break as part of an upgrade
  • for PRs within a repository other than this one, check-spelling will offer to update the expect file directly

@probonopd
Copy link
Member

Package 'xdamage', required by 'virtual:world', not found is probably unrelated to your change, most likely something changed in FreeBSD packaging.

@probonopd
Copy link
Member

Hello @jsoref can you please send a PR againt the main branch? Thanks!

jsoref and others added 26 commits November 19, 2023 06:41
* spelling: acquired

Signed-off-by: Josh Soref <[email protected]>

* spelling: application

Signed-off-by: Josh Soref <[email protected]>

* spelling: async

Signed-off-by: Josh Soref <[email protected]>

* spelling: better

Signed-off-by: Josh Soref <[email protected]>

* spelling: close

Signed-off-by: Josh Soref <[email protected]>

* spelling: documented

Signed-off-by: Josh Soref <[email protected]>

* spelling: implements

Signed-off-by: Josh Soref <[email protected]>

* spelling: independent

Signed-off-by: Josh Soref <[email protected]>

* spelling: maximize

Signed-off-by: Josh Soref <[email protected]>

* spelling: received

Signed-off-by: Josh Soref <[email protected]>

* spelling: switch

Signed-off-by: Josh Soref <[email protected]>

* spelling: transient

Signed-off-by: Josh Soref <[email protected]>

* spelling: triggered

Signed-off-by: Josh Soref <[email protected]>

* spelling: unsightly

Signed-off-by: Josh Soref <[email protected]>

---------

Signed-off-by: Josh Soref <[email protected]>
Co-authored-by: Josh Soref <[email protected]>
Co-authored-by: probonopd <[email protected]>
Signed-off-by: Josh Soref <[email protected]>
Signed-off-by: Josh Soref <[email protected]>
Signed-off-by: Josh Soref <[email protected]>
Signed-off-by: Josh Soref <[email protected]>
Signed-off-by: Josh Soref <[email protected]>
Signed-off-by: Josh Soref <[email protected]>
Signed-off-by: Josh Soref <[email protected]>
Signed-off-by: Josh Soref <[email protected]>
Signed-off-by: Josh Soref <[email protected]>
Signed-off-by: Josh Soref <[email protected]>
Signed-off-by: Josh Soref <[email protected]>
Signed-off-by: Josh Soref <[email protected]>
Signed-off-by: Josh Soref <[email protected]>
Signed-off-by: Josh Soref <[email protected]>
Signed-off-by: Josh Soref <[email protected]>
Signed-off-by: Josh Soref <[email protected]>
Signed-off-by: Josh Soref <[email protected]>
Signed-off-by: Josh Soref <[email protected]>
Signed-off-by: Josh Soref <[email protected]>
Signed-off-by: Josh Soref <[email protected]>
Signed-off-by: Josh Soref <[email protected]>
Signed-off-by: Josh Soref <[email protected]>
Signed-off-by: Josh Soref <[email protected]>
Signed-off-by: Josh Soref <[email protected]>
@jsoref jsoref force-pushed the add-check-spelling branch from 72d3dec to 27927f2 Compare November 19, 2023 12:29
@jsoref jsoref changed the base branch from actionsearch to main November 19, 2023 12:29
pkg_check_modules(QCALCULATE REQUIRED libqalculate)
pkg_check_modules(QALCULATE REQUIRED libqalculate)
Copy link
Author

Choose a reason for hiding this comment

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

this of course isn't required, but it seemed reasonable to use the same spelling as the module

Comment on lines -738 to +740
for (QAction *findActivateeCanidcate : m_searchMenu->actions())
if (!findActivateeCanidcate->isSeparator()) {
m_searchMenu->setActiveAction(findActivateeCanidcate);
for (QAction *findCandidateAction : m_searchMenu->actions())
if (!findCandidateAction->isSeparator()) {
m_searchMenu->setActiveAction(findCandidateAction);
Copy link
Author

Choose a reason for hiding this comment

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

this was a manual change of sorts. There were two tokens in this variable that weren't in the dictionary, it seemed to make sense to avoid the word Active as findActive could be confusing -- given the short scope, I opted to drop the token entirely in favor of action (I contemplated menuitem but I wasn't certain it was always going to be a menuitem, so I went with the type).

Copy link
Author

Choose a reason for hiding this comment

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

You should look over this file at least once, as items here will be treated as part of the dictionary, so it'd be bad if a misspelled item were included.

Most of the items that I've included here were used in file paths -- check-spelling wanted to identify a misspelled filename, but it wouldn't do that if it decided that filenames aren't usually dictionary words, so including items was necessary to shift the balance from "mostly not dictionary words" to "mostly dictionary words".

extensionwidget
github
https
kde
Copy link
Author

Choose a reason for hiding this comment

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

note that unlike expect, an entry here doesn't cover other case variants (so, KDE will likely be in expect.txt -- it could be moved here).

\.zip$
^\.github/actions/spelling/
^\Q.github/workflows/spelling.yml\E$
^\Qplugin-statusnotifier/statusnotifier.cpp\E$
Copy link
Author

Choose a reason for hiding this comment

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

I retained this from earlier runs, but notably, Statusnotifier in this file might be better written as StatusNotifier -- I opted not to think about that because I should be sleeping.

^\Qplugin-statusnotifier/statusnotifier.cpp\E$
^\Qplugin-statusnotifier/statusnotifier.json\E$
^\Qsrc/lineediteventfilter.cpp\E$
_(?!en)..(?:_\w+|)\.ts$
Copy link
Author

Choose a reason for hiding this comment

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

this line is designed to skip all translation files that aren't the English translation files. I wrote it for the original PR, and a spot check seems to indicate it did the right thing. (This version of check-spelling will tell you which files it's checking in the log, so you can check its work...)

Copy link
Author

Choose a reason for hiding this comment

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

As with allow.txt, it's worth reading this file over to make sure there aren't any surprises. I've done a bunch of passes, so I think the list is reasonable, but it's late, so I could have made a mistake...

Comment on lines +34 to +46
GITHUB_TOKEN: .*$

# IServiceProvider / isAThing
(?:(?<=[a-z])|\b)(?:[IQ]|isA)(?=(?:[A-Z][a-z]{2,})+(?:[^a-z]|\b))

# libraries
libx
\blib(?=[a-qs-yz])

LIVEstep

# subsidiaries
\(-ies\)
Copy link
Author

Choose a reason for hiding this comment

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

These are custom entries specific to this repository (the items preceding came from candidates from spell-check-this and the items following came from patterns).

@probonopd probonopd merged commit a4137cd into helloSystem:main Nov 19, 2023
1 check passed
@probonopd
Copy link
Member

Thank you very much for your dedciation @jsoref. I truly appreciate it 👍

@jsoref jsoref deleted the add-check-spelling branch November 19, 2023 21:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants