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

Additional files in spellcheck.toml - changelogs #253

Open
daxpedda opened this issue Mar 7, 2022 · 5 comments
Open

Additional files in spellcheck.toml - changelogs #253

daxpedda opened this issue Mar 7, 2022 · 5 comments
Labels
good first issue 🔰 Good for newcomers internal ⚙️ Internal issues or TODOs

Comments

@daxpedda
Copy link

daxpedda commented Mar 7, 2022

Is your feature request related to a particular use-case?

I would like to add checking CHANGELOG.md for spelling errors in the CI too.

Describe the solution you'd like to implement/see implemented

Add a new configuration key to spellcheck.toml to include additional files.

Describe alternatives you've considered

Currently the alternative is to pass a path to cargo spellcheck CHANGELOG.md directly. This is undesirable, because contributors who are developing locally now have to remember this. Adding it to spellcheck.toml makes it automatic.

@drahnr
Copy link
Owner

drahnr commented Mar 7, 2022

This would require a changelog parser i.e. like https://crates.io/crates/parse-changelog , other than that I don't think there are any further obstacles to implement it.

I'd be happy to guide you through the implementation of that feature.

@drahnr drahnr added good first issue 🔰 Good for newcomers internal ⚙️ Internal issues or TODOs labels Mar 7, 2022
@daxpedda
Copy link
Author

daxpedda commented Mar 7, 2022

This would require a changelog parser i.e. like https://crates.io/crates/parse-changelog

I'm a bit confused, I thought cargo spellcheck can already parse markdown files. In fact, using cargo spellcheck CHANGELOG.md works perfectly fine. Am I missing something?

@drahnr
Copy link
Owner

drahnr commented Mar 8, 2022

You're correct for hunspell, the existing common mark parser will work ok as is from what I can tell.

Using a parser for the changelog that is aware of the overall structure of a changelog will help with NlpRules false-positive reduction, I have no proof for this but if there is structured, we should use it to limit the amount of data fed to the checkers.

@daxpedda
Copy link
Author

daxpedda commented Mar 8, 2022

Personally for me that's overkill, considering that I didn't even encounter false-positives and have been using it on README.mds quiet successfully so far too with hunspell.

If I do find time, I will look into contributing myself here!

@drahnr
Copy link
Owner

drahnr commented Mar 8, 2022

Adding a default quirk for various date formats might indeed be sufficient.

@drahnr drahnr changed the title Additional files in spellcheck.toml Additional files in spellcheck.toml - changelogs Jan 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue 🔰 Good for newcomers internal ⚙️ Internal issues or TODOs
Projects
None yet
Development

No branches or pull requests

2 participants