errata-ai / vale

:pencil: A markup-aware linter for prose built with speed and extensibility in mind.
https://vale.sh
MIT License
4.52k stars 155 forks source link

Using Vale with Asciidoctor.js #895

Open danyill opened 2 months ago

danyill commented 2 months ago

Check for existing issues

Describe the feature

I'm trying to use Vale with Asciidoctor.js but having difficulty with finding the executable when running Vale.

I've placed the executable in the same folder as the executable for Vale 3.7.1.

The following commands show that it is correctly on the path (I have explicitly added it to the path although it should be unnecessary and it doesn't work without this either) but it doesn't appear to be callable from within Vale. Is there any way to specify the Asciidoctor command line explicitly?

C:\PA_Applications\vale3.7.1>SET "PATH=%PATH%;C:PA_Applications/vale3.7.1" && vale.exe --config C:\PA_Applications\vale_styles\.vale.ini --output=line  "C:\Git\digital-substation\standard-packages\pcs-221s-merging-unit\modules\overview\pages\firmware.adoc"
E100 [lintAdoc] Runtime error

asciidoctor not found

Execution stopped with code 1.

C:\PA_Applications\vale3.7.1>SET "PATH=%PATH%;C:PA_Applications/vale3.7.1" && where asciidoctor
C:\PA_Applications\vale3.7.1\asciidoctor.exe

C:\PA_Applications\vale3.7.1>set PATH=%PATH%;C:PA_Applications/vale3.7.1/ && asciidoctor -v
Asciidoctor.js 2.2.8 (Asciidoctor 2.0.23) [https://asciidoctor.org]
Runtime Environment (node v12.22.1 on win32)

Background is that I'm trying to set up the external tool configuration for IntelliJ but don't have the ability to install Ruby on my system and was hoping that using the executable Asciidoctor.js would function correctly.

cpkio commented 2 months ago

You have a typo: C:PA_Applications/vale3.7.1, forgot slash.

danyill commented 2 months ago

You have a typo: C:PA_Applications/vale3.7.1, forgot slash.

That's true and I'll fix that and try again although I think the current working directory should always be on the path.