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

Use per-line spell-checking ignore pattern and remove one-off ignores (OSOE-491) #134

Closed
Piedone opened this issue Dec 5, 2022 · 6 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@Piedone
Copy link
Member

Piedone commented Dec 5, 2022

With the check-spelling action it's possible to mark lines with a custom pattern so they're excluded from spell-checking. See from this comment. We should do this instead of adding ignores globally that are only used in a single file (or single instance).

  • Use a pattern to ignore single lines. Do this in a way that it'll work in all code files. #spell-check-ignore-line is OK for this, since it just needs to be included at the end of the line, but the line can otherwise contain anything. So, e.g. in C#, it can be in a // comment. Note that in this PR the pattern was already configured.
  • Go through all the words in allow.txt and expect.txt and if a word is used in <4 places in a single file, then instead ignore lines with the new pattern. (I.e. if there are >3 usages of the word, or it's not just in a single file, then leave the global config.)
  • Document this pattern and its usage in Workflows.md.

Jira issue

@Piedone Piedone added the enhancement New feature or request label Dec 5, 2022
@github-actions github-actions bot changed the title Add per-line spell-checking ignore pattern and remove one-off ignores Add per-line spell-checking ignore pattern and remove one-off ignores (OSOE-491) Dec 5, 2022
@BenedekFarkas
Copy link
Member

Tested this in Lombiq/UI-Testing-Toolbox@175018a (because of #103), but didn't work ("lombiquitestingtoolbox" occurs only once in the whole solution), then also tried #no-spell-check-line (according to https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples%3A-patterns) without success in Lombiq/UI-Testing-Toolbox@e038548: Lombiq/Open-Source-Orchard-Core-Extensions#284 (comment)

@BenedekFarkas
Copy link
Member

Oh, never mind, I thought this pattern is already active from the original action, but instead we need to add it to our own patterns.

@Piedone
Copy link
Member Author

Piedone commented Dec 12, 2022

Is this still applicable after #103 @BenedekFarkas?

@BenedekFarkas
Copy link
Member

BenedekFarkas commented Dec 13, 2022

Yep! I added the line ignore pattern (#spell-check-ignore-line) towards the end of the original scope of #103 not to produce legacy code, so there are probably a bunch of entries worth sanity-checking. I still added few entries with one or two occurrences that are common enough and it's reasonable to assume that they will appear again, so not all of them are clear cases, but we'll see how this goes.

@Piedone Piedone added the good first issue Good for newcomers label Dec 13, 2022
@Piedone
Copy link
Member Author

Piedone commented Dec 13, 2022

Got it, thanks.

@Piedone Piedone changed the title Add per-line spell-checking ignore pattern and remove one-off ignores (OSOE-491) Use per-line spell-checking ignore pattern and remove one-off ignores (OSOE-491) Dec 13, 2022
@BenedekFarkas
Copy link
Member

BenedekFarkas commented Feb 7, 2023

Will be done in Lombiq/Open-Source-Orchard-Core-Extensions#346 / OSOE-523 instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants