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

How to Extend Existence to Error Out on Contractions #601

Closed
kayx23 opened this issue Apr 4, 2023 · 2 comments
Closed

How to Extend Existence to Error Out on Contractions #601

kayx23 opened this issue Apr 4, 2023 · 2 comments

Comments

@kayx23
Copy link

kayx23 commented Apr 4, 2023

Here's my yaml config:

extends: existence
message: "Avoid using contractions."
level: error
match:
  - '\b(\w+\'\w+)\b'
ignore_case: true

I have other yaml files in this custom folder and they are picked up by .vale.ini. I feel like the issue might be in '\b(\w+\'\w+)\b' but can't for the heck of my life figure out where the problem is.

Any help appreciated!

@kayx23 kayx23 changed the title Extend Existence to Error Out on Contractions How to Extend Existence to Error Out on Contractions Apr 4, 2023
@kayx23
Copy link
Author

kayx23 commented Apr 4, 2023

Ok just saw this example where substitution is used instead of existence. Still curious to know why my config couldn't work, if somebody figures out.

@kayx23
Copy link
Author

kayx23 commented Apr 4, 2023

Closing as I realized even if the regEx works, it is not a good idea as it would picks up words like dog's, cat's which isn't my intention. The substitution is indeed a better approach.

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