You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Most popular linters have a --fix flag where they will apply fixes inline for violations, if the rule defines them.
I assumed that this existed for Vale when I was reading the docs about actions, spent a few hours learning Tengo and implementing an action for the custom rule I wanted, and was a little surprised to discover that Vale seems to completely ignore the Tengo code I wrote, all it does is pass through the path to the Tengo script of the script, so that potentially other tools (none of which I use) could run it if they wanted to.
I'm going to adopt the Github Action, so in the long run my needs will be met, but in the meantime there are ~80 violations (too many for the github action to report) that are fixable by the Tengo code I wrote but I have no way to easily apply them.
Feature request: support vale --fix
It would be lovely if vale --fix could automatically apply actions that followed the conventions outlined in the actions doc.
This appears to have been suggested previously in #329. The response there mentions a commercial "Vale Server" but I don't think that exists anymore? It also mentions that sometimes the way to "fix" the result of an action is ambiguous. I still think a vale --fix that worked just in the cases where there is no ambiguity would be valuable. It could also be viable to prompt among alternatives.
Suggestion: clarify the status quo in the docs
The docs state
Actions provide a way for external tools to provide methods for correcting style issues.
The meaning of this is clear to me in retrospect, but I didn't absorb the message the first time I read it.
You could rephrase this as
Actions are a way for your styles to trigger behavior from external tools like the Vale Github Action or the Vale Language Server. The Vale CLI does not execute actions itself, it merely reports what actions should be run alongside each style issue.
There are also some other confusing things about the actions doc: e.g. in once place it refers to "the script action" but (as far as I can tell) there is no standard action named "script", the action is named "suggest" and the action accepts a parameter that by convention is either the word "spellings" or the path to a Tengo script that an external tool would conventionally execute, passing in appropriate values for "text" and reading values from "suggestions".
The text was updated successfully, but these errors were encountered:
Check for existing issues
Describe the feature
Most popular linters have a
--fix
flag where they will apply fixes inline for violations, if the rule defines them.I assumed that this existed for Vale when I was reading the docs about actions, spent a few hours learning Tengo and implementing an action for the custom rule I wanted, and was a little surprised to discover that Vale seems to completely ignore the Tengo code I wrote, all it does is pass through the path to the Tengo script of the script, so that potentially other tools (none of which I use) could run it if they wanted to.
I'm going to adopt the Github Action, so in the long run my needs will be met, but in the meantime there are ~80 violations (too many for the github action to report) that are fixable by the Tengo code I wrote but I have no way to easily apply them.
Feature request: support
vale --fix
It would be lovely if
vale --fix
could automatically apply actions that followed the conventions outlined in the actions doc.This appears to have been suggested previously in #329. The response there mentions a commercial "Vale Server" but I don't think that exists anymore? It also mentions that sometimes the way to "fix" the result of an action is ambiguous. I still think a
vale --fix
that worked just in the cases where there is no ambiguity would be valuable. It could also be viable to prompt among alternatives.Suggestion: clarify the status quo in the docs
The docs state
The meaning of this is clear to me in retrospect, but I didn't absorb the message the first time I read it.
You could rephrase this as
There are also some other confusing things about the actions doc: e.g. in once place it refers to "the script action" but (as far as I can tell) there is no standard action named "script", the action is named "suggest" and the action accepts a parameter that by convention is either the word "spellings" or the path to a Tengo script that an external tool would conventionally execute, passing in appropriate values for "text" and reading values from "suggestions".
The text was updated successfully, but these errors were encountered: