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

feat: add comment syntax for switching styles #772

Open
wants to merge 1 commit into
base: v3
Choose a base branch
from
Open

Conversation

ak-1
Copy link
Contributor

@ak-1 ak-1 commented Feb 17, 2024

This is a follow-up to #748 with tests included.

Individual styles can be switched on and off:

<!-- vale StyleName1 = YES -->
<!-- vale StyleName2 = NO -->

For a rule to be effective both the rule and the style has to be enabled.

on and off is accepted in addition to YES and NO

<!-- vale StyleName1 = on -->
<!-- vale StyleName2 = off -->

Styles can be set (enabling them and switching off any other styles):

<!-- vale style = StyleName1 -->
<!-- vale styles = StyleName1, StyleName2 -->

Individual styles can be switched on and off:
```
<!-- vale StyleName1 = YES -->
<!-- vale StyleName2 = NO -->
```
For a rule to be effective both the rule and the style has to be enabled.

`on` and `off` is accepted in addition to `YES` and `NO`
```
<!-- vale StyleName1 = on -->
<!-- vale StyleName2 = off -->
```

Styles can be set (enabling them and switching off any other styles):
```
<!-- vale style = StyleName1 -->
<!-- vale styles = StyleName1, StyleName2 -->
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant