Enforce Present Tense
If your style requires you to use present tense, this rule can help you enforce it.
It uses an existence check and a raw scope and regular expressions.
extends: existence
message: 'Avoid using future tense: "%s". Use present tense instead.'
ignorecase: true
level: error
raw:
- "(going to( |\n|[[:punct:]])[a-zA-Z]*|"
- "will( |\n|[[:punct:]])[a-zA-Z]*|"
- "won't( |\n|[[:punct:]])[a-zA-Z]*|"
- "[a-zA-Z]*'ll( |\n|[[:punct:]])[a-zA-Z]*)"
You can also use the natural language processing features in Vale and look for future tense modals.
extends: sequence
message: "Use present tense instead of '%[1]s %[2]s."
level: warning
tokens:
- tag: "MD"
pattern: "(will|should)"
- tag: "VB"
pattern: ".+"
Experiment with what works best for you.
Tags:
Found this useful?
Buy the book