https://github.com/errata-ai/libvale
A helper utility for running Vale in CI environments.
https://github.com/errata-ai/libvale
Last synced: 19 days ago
JSON representation
A helper utility for running Vale in CI environments.
- Host: GitHub
- URL: https://github.com/errata-ai/libvale
- Owner: errata-ai
- License: mit
- Created: 2023-05-22T20:05:33.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-08-26T19:26:56.000Z (over 2 years ago)
- Last Synced: 2024-12-29T01:32:02.752Z (12 months ago)
- Language: Rust
- Homepage:
- Size: 7.81 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# libvale
`libvale` is an IoC-like library for Vale: the goal is to make it easy to
manage consistent configurations in any environment: locally, CI, etc. Some key
features include:
- **Version management**: `libvale` will automatically install the latest
version, or a specific version, of Vale for you.
```console
# Install the latest version of Vale to `/bin`.
$ libvale install /bin
...
```
- **Input control**: `libvale` will give to granular control over which files
are linted and how, including respecting `.gitignore` files and linting
only files that have changed since a given commit.
```console
# Lint all Markdown files in the current directory.
$ libvale lint --glob "*.md"
...
```
- **Named invocations**: `libvale` allows you to define named invocations of
Vale, which can be used to lint different sets of files with different
configurations.
```console
# Run only `spelling` rules.
$ libvale run spelling
...
```
## Example
```yaml
---
# An invocation of Vale consisting of multiple parts:
#
# - `version`: the version of Vale to use.
# - `flags`: the flags to pass to Vale.
# - `input`: the files to lint.
version: v2.20.0
inputs:
- name: markdown
path: .
glob: "*.md"
ignore: ["README.md"]
- name: code
path: .
glob: "*.py"
ignore: ["setup.py"]
invocations:
- name: spelling
flags: ["--filter='.Extends==spelling'", "--minAlertLevel=error"]
inputs: ["markdown", "code"]
```