-
Notifications
You must be signed in to change notification settings - Fork 20
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
Optimize spell-checking dictionary files across projects (OSOE-523) #346
Comments
Can you show an example of "As a result, spell-checking reports in different repositories have a varying number of irrelevant entries"? I don't know what that means. Re 1. and 3. I don't actually know why we have spell-checking in LGHA separate from OSOCE, but it's not something that we necessarily need to keep.
|
Replying out of order, because of dependencies, but formatting gets really weird... (4.) The spell-checking report also lists allowed words that aren't actually used: https://github.com/Lombiq/Open-Source-Orchard-Core-Extensions/actions/runs/3806450757/jobs/6475261798#step:4:139. But this is even more apparent in LGHA, because a lot of entries are added just for the sake of OSOCE: https://github.com/Lombiq/Open-Source-Orchard-Core-Extensions/actions/runs/3806450757/jobs/6475261798#step:4:115. (6.) If we can enforce opening a PR in OSOCE (as in validate, like now) without it having to be a submodule, then managing the issues/PRs would be easier.
(1. and 3.): With the changes in 6., LGHA will need to have its own spell-checking, but that's fine. What I don't like about the current setup (and why more separation of concerns would be beneficial) is that OSOCE's spell-checking configuration affects the base LGHA configuration (and LGHA's own spell-checking), but also a bunch of completely independent projects through that as well. This makes it a lot harder to test changes (which I experienced when working on multiple complex spell-checking issues), because it's easy to break unrelated projects, like a closed client-project or Infrastructure Scripts. |
|
(4.) Using a submodule (that is also a submodule of OSOCE) in a consumer project is a case we need to cover, sure.
(5.) Linting would be a great addition, but I wouldn't keep LGHA in OSOCE just to be able to use NodeJS Extensions from there. NodeJS Extensions providing an action/workflow for YAML linting (and might also be nice for other types of code analysis to make it more accessible and compelling for 3rd parties to use) would be better to avoid such technical dependencies between these projects that are otherwise independent, similarly to Lombiq/PowerShell-Analyzers#17. |
spelling:
name: Spelling
uses: Lombiq/GitHub-Actions/.github/workflows/spelling.yml@dev Or at most something like: spelling:
name: Spelling
uses: Lombiq/GitHub-Actions/.github/workflows/spelling.yml@dev
with:
spell-check-this: Lombiq/Open-Source-Orchard-Core-Extensions@dev And if you need cascading overrides like we have with DotNest Tenants Core, then that should be possible too. So, in the end, you get this:
If we have this, then I'm all for it.
|
We are in agreement, also about making the necessary configuration as lean possible, but note that a very minimalistic configuration (for consumer projects) means that you have to generalize a lot (in LGHA). That's not why I opened this issue (but they are connected), more like the fact that every project that uses spell-checking by default inherits the config that is OSOCE-specific, which is not necessary (in currently half of the cases) and makes working on spell-checking in LGHA a lot harder by having to re-check every consumer project to avoid breaking changes. There are 8 of those currently, including OrchardCore.Commerce, which is not affected by recent breaking changes, because it fully copied dictionary files (which is also not desirable, because maintaining them becomes more difficult) with 200+ entries it doesn't actually need. My original point is that development of the spelling component is very tedious due to too much shared configuration and reliance on OSOCE-specific configuration inherited from LGHA. Re: 4.: Something similar should be possible and what I'm proposing doesn't prevent this. BUT: If the project requires any other additional dictionary file from an external source, then it's not possible like this, see 6.3 below. 6.1. If you need generic spell-checking in any project, you use the default config from LGHA. 6.2. If you need generic spell-checking for an OC solution using OSOCE submodules, you use the default config from somewhere (Also LGHA, another config? Or OSOCE?). 6.3. In any case, if you need customization, you can add that on top of the defaults (vs having to copy configuration from the defaults). 6.4. And if you need cascading overrides like we have with DotNest Tenants Core, then that should be possible too. |
Great then! Re 6.3 and 6.4: Please chime in here: check-spelling/check-spelling#45. |
Currently https://github.com/Lombiq/GitHub-Actions is the owner spell-checking dictionary files, even for entries specific to OSOCE.
Here are a couple of ideas for improving how OSOCE and other repositories consume spell-checking configuration from LGHA, so there are no hidden dependencies. For example, Utility Scripts and Infrastructure Scripts relies completely on LGHA for its spell-checking dictionaries (most importantly
allow.txt
andexpect.txt
), but those are referenced by other repositories too. As a result, spell-checking reports in different repositories have a varying number of irrelevant entries, which makes it harder to maintain them.With this, OSOCE will be a template for consuming LGHA as they were completely independent.
allow.txt
andexpect.txt
dictionary files should be specific to LGHA only.allow.txt
andexpect.txt
files in its root.github/actions/spelling
folder. Unrecognized entries should be removed.Jira issue
The text was updated successfully, but these errors were encountered: