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

Allow StylesPath to be set without changing the .vale.ini #755

Closed
1 task done
alexeagle opened this issue Jan 17, 2024 · 3 comments
Closed
1 task done

Allow StylesPath to be set without changing the .vale.ini #755

alexeagle opened this issue Jan 17, 2024 · 3 comments

Comments

@alexeagle
Copy link

Check for existing issues

  • Completed

Describe the feature

I'm looking to wire vale into a hermetic build tool (Bazel). It wants to manage dependencies itself, so I have a path to the styles/ directory at runtime that a user shouldn't need to predict and hard-code into their config file.

I'd like to be able to run with environment VALE_STYLES_PATH=/some/path or else possibly a new flag --stylesPath=/some/path

@jdkato
Copy link
Member

jdkato commented Feb 16, 2024

The next release will add support for VALE_STYLES_PATH.

@alexeagle
Copy link
Author

Thank you! That allowed me to simplify the installation instructions for Bazel users. aspect-build/rules_lint#148

@jdkato
Copy link
Member

jdkato commented Feb 23, 2024

A general comment on re-packaging Vale assets: I would personally discourage implementing alternative means of managing a StylesPath -- but if you do, you need to understand the difference between a style and a package.

A style is a collection of rules (that is, a folder of YAML files). Styles could, in theory, be managed by alternative systems that merely copy their contents into the user's StylesPath.

A package, however, cannot be managed this way. Packages should in general be thought of as complete Vale configurations, including a .vale.ini. file and an entire StylesPath (which can contain styles, vocabularies, dictionaries, ignore files, and output templates). You can't just copy these into an existing StylesPath; each asset type needs to be handled appropriately.

The entries listed at https://github.com/errata-ai/packages should be considered to be packages. While many of them are currently style-only, this is not a safe assumption in general.

cc @bollwyvl

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

2 participants