Skip to content
check-circle

GitHub Action

vale-lint

0.1.0 Latest version

vale-lint

check-circle

vale-lint

Vale - linter for prose

Installation

Copy and paste the following snippet into your .yml file.

              

- name: vale-lint

uses: gaurav-nelson/github-action-vale-lint@0.1.0

Learn more about this action in gaurav-nelson/github-action-vale-lint

Choose a version

No Maintenance Intended

DEPRECATED ⛔️

Use the official Vale action available at https://github.com/errata-ai/vale-action

Github action: Lint with Vale ✅❎

Automatically lint all modified text files in your GitHub pull requests. This GitHub action uses Vale to lint prose.

Lint with Vale

The github-action-vale-lint checks all modified text (including markup) files and reports failure on error.

Vale error list

Prerequisite

You must have Vale configuration file .vale.ini in your repository.

How to use

  1. Create a new file in your repository .github/workflows/action.yml.

    touch .github/workflows/pull_request.yml
  2. Copy-paste the folloing workflow in your pull_request.yml file:

    name: Lint PRs with Vale
    on: pull_request
    jobs:
      vale-lint-PR:
        runs-on: ubuntu-latest
        steps:
        - uses: actions/checkout@master
          with:
            fetch-depth: 1
        - uses: gaurav-nelson/github-action-vale-lint@v0.1.0
          env:
            GH_COMMENT_TOKEN: ${{ secrets.GH_COMMENT_TOKEN }}
  3. Or, if you want to lint all files (or files in a specific folder) and not just modified files, use the following workflow in your pull_request.yml file:

    name: Lint PRs with Vale
    on: pull_request
    jobs:
      vale-lint-PR:
        runs-on: ubuntu-latest
        steps:
        - uses: actions/checkout@master
          with:
            fetch-depth: 1
        - uses: gaurav-nelson/github-action-vale-lint@v0.1.0
          with:
            lint-all-files: 'yes' 
            dir-to-lint: 'directory/path/to/lint'
          env:
            GH_COMMENT_TOKEN: ${{ secrets.GH_COMMENT_TOKEN }}

Add Vale errors as comments on PR

If you want to show errors as comments on the pull request, in your repository:

  1. Go to Settings > Secrets, and slect Add a new secret.
  2. Enter GH_COMMENT_TOKEN for Name, and enter your secret token as Value.
  3. Select Add secret.