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

vale looks for a vocab.txt in a vale folder in the current path #444

Closed J-Goerlich closed 2 years ago

J-Goerlich commented 2 years ago

Setup

I run vale 2.18.0 on macOS 12 installed via Homebrew

My vale.ini has the following settings:

StylesPath = "../../vale/styles"
Vocab = Baselines
BasedOnStyles = customStyle

My styles folder looks like:

vale/styles/customStyle
vale/styles/Vocab/Baselines
vale/styles/Vocab/Baselines/accept.txt
vale/styles/Vocab/Baselines/reject.txt

Issue

Wenn running vale, i get the following error

<current-path> >> vale .
open <current-path>/vale/vocab.txt: no such file or directory

After creating a folder 'vale' in my and adding an empty vocab.txt, vale works as expected. But my intention is not to create such dummy folder and file to all my working dirs.

jdkato commented 2 years ago

Does customStyle have a spelling-based rule implemented?

J-Goerlich commented 2 years ago

customStyle indeed has a spelling based rule.

message: "Check the spelling of '%s'?"
level: warning
ignore: vale/ignore.txt

After correcting the mistake in the ignore line by changing 'vale/ignore.txt' to 'Vocab/ignore.txt', everything works as expected! It seems the ignore file is looked up in the current path if it can not be found in the StylesPath.

Thanks for this hint!