Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.vale.ini search process starts in execution directory, not file directory (doesn't work as documented) #843

Open
1 task done
jstirnaman opened this issue May 30, 2024 · 0 comments

Comments

@jstirnaman
Copy link

Check for existing issues

  • Completed

Environment

macOS
Used Yarn to install npm package @vvago/vale@npm:3.4.2

% ./bin/vale --version
vale version 3.4.2

Describe the bug / provide steps to reproduce it

Vale's search process doesn't seem to work as described in the documentation here (emphasis mine):

Vale expects its configuration to be in a file named .vale.ini or _vale.ini. It’ll start looking for this file in the same folder as the file that’s being linted. If it can’t find one, it’ll search up the file tree.

Instead, it starts looking in the directory where I run vale--for example:

I have a project root .vale.ini:

% ls .vale.ini
.vale.ini

In a child directory, I have a cloud-dedicated/.vale.ini that uses a custom "Cloud-Dedicated" custom vocabulary:

% ls ./content/influxdb/cloud-dedicated/.vale.ini
./content/influxdb/cloud-dedicated/.vale.ini

The following command uses my project root ./.vale.ini (and doesn't invoke my "Cloud-Dedicated" custom vocabulary):

% ./node_modules/@vvago/vale/bin/vale --minAlertLevel=error ./content/influxdb/cloud-dedicated/get-started/*.md 

Expectation:

According to the documentation, the search process should use ./content/influxdb/cloud-dedicated/.vale.ini, the config file nearest to the file being linted.

I want to apply a custom vocabulary per subdirectory without needing to change to the subdirectory or specify the config path location for the subdirectory. In other words, I want to run vale and rely on Vale's search process (not my scripting) to find the correct (nearest) config file to use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant