Skip to content

Add check spelling#180

Merged
probonopd merged 26 commits intohelloSystem:mainfrom
jsoref:add-check-spelling
Nov 19, 2023
Merged

Add check spelling#180
probonopd merged 26 commits intohelloSystem:mainfrom
jsoref:add-check-spelling

Conversation

@jsoref
Copy link
Copy Markdown

@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
Copy Markdown
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
Copy Markdown
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 <jsoref@users.noreply.github.com>

* spelling: application

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

* spelling: async

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

* spelling: better

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

* spelling: close

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

* spelling: documented

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

* spelling: implements

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

* spelling: independent

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

* spelling: maximize

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

* spelling: received

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

* spelling: switch

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

* spelling: transient

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

* spelling: triggered

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

* spelling: unsightly

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

---------

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
Co-authored-by: Josh Soref <jsoref@users.noreply.github.com>
Co-authored-by: probonopd <probonopd@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
@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
Comment thread src/CMakeLists.txt
find_package(dbusmenu-qt5 REQUIRED)
find_package(KF5GlobalAccel REQUIRED)
pkg_check_modules(QCALCULATE REQUIRED libqalculate)
pkg_check_modules(QALCULATE REQUIRED libqalculate)
Copy link
Copy Markdown
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 thread src/appmenuwidget.cpp
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
@probonopd
Copy link
Copy Markdown
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