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

Set one vocabulary as error, another as warning? #951

Open
1 task done
amyq opened this issue Jan 16, 2025 · 1 comment
Open
1 task done

Set one vocabulary as error, another as warning? #951

amyq opened this issue Jan 16, 2025 · 1 comment

Comments

@amyq
Copy link

amyq commented Jan 16, 2025

Check for existing issues

  • Completed

Describe the feature

Is it possible to declare one vocabulary's findings as error and another as warning? We haven't converted from our in-house spelling rule to a vocabulary for … $reasons. I expect to be asked if we could implement something like:

  • vocab 1, internal: incorrect capitalization of our company's products should be error because we REALLY care about these, they're our legal wordmarks and we DO want to break a pipeline if these are used incorrectly.
  • vocab 2, other: while we want to fix all spelling issues, we have a LOT of exceptions in our huge docset, and we don't want to break a pipeline for these. Set these to warning?

For now, we have a REALLY dodgy workaround 🙈 but maaaaaaan, do I ever want to get those case-specific terms pried out of our .markdownlint-cli2.yaml file and reunited with the rest of our spelling work.

@jdkato
Copy link
Member

jdkato commented Jan 16, 2025

I'm not totally sure I understand the request, but to be clear: in Vale, spelling and capitalization treated as distinct topics.

spelling-based rules and vocabularies are complementary features -- not something that you'd convert to (or from):

  • Spell check is case-insensitive and operates on single words.
  • Vocabularies are case-sensitive and operate on arbitrary regex.

So, for example, I'd add something like "autocomplete" to a dictionary (or an ignore file) and something like "GitLab Pages" to a vocabulary.

If I'm understanding correctly, you're asking for the ability to add a word like "JavaScript" to a vocabulary and raise a warning (instead of an error) for occurrences like "Javascript"?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants