Skip to content

A helper utility for running Vale in CI environments.

License

Notifications You must be signed in to change notification settings

errata-ai/libvale

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

    # 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.

    # 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.

    # Run only `spelling` rules.
    $ libvale run spelling
    ...

Example

---
# 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"]

About

A helper utility for running Vale in CI environments.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages