Check for existing issues
Environment
vale version 3.14.1
Describe the bug / provide steps to reproduce it
vale and vale-ls fail to lint my rst document claiming rst2html is not found, even though it is in $PATH:
$ vale test.rst
E100 [lintRST] Runtime error
rst2html not found
Execution stopped with code 1.
$ rst2html --help
[lots of help]
More interestingly, this works:
$ PATH=$PATH:/path/to/python vale test.rst
To reproduce, remove the directory containing python, py, etc. from $PATH but keep rst2html in $PATH.
Then run vale some.rst.
The culprit seems to be this check:
|
rst2html := system.Which([]string{ |
|
"rst2html", "rst2html.py", "rst2html-3", "rst2html-3.py"}) |
|
python := system.Which([]string{ |
|
"python", "py", "python.exe", "python3", "python3.exe", "py3"}) |
|
|
|
if rst2html == "" || python == "" { |
|
return core.NewE100("lintRST", errors.New("rst2html not found")) |
|
} |
I don't speak Go but to me it seems that python is never used.
It is passed here
|
html, err = callRst(s, rst2html, python) |
But seems to be ignored here:
|
func callRst(text, lib, _ string) (string, error) { |
So my suggestion would be to delete the check for python.
Check for existing issues
Environment
vale version 3.14.1
Describe the bug / provide steps to reproduce it
valeandvale-lsfail to lint my rst document claimingrst2htmlis not found, even though it is in$PATH:More interestingly, this works:
To reproduce, remove the directory containing
python,py, etc. from$PATHbut keeprst2htmlin$PATH.Then run
vale some.rst.The culprit seems to be this check:
vale/internal/lint/rst.go
Lines 36 to 43 in cdf6f9e
I don't speak Go but to me it seems that
pythonis never used.It is passed here
vale/internal/lint/rst.go
Line 58 in cdf6f9e
But seems to be ignored here:
vale/internal/lint/rst.go
Line 66 in cdf6f9e
So my suggestion would be to delete the check for python.