Skip to main content

Run the spelling and style linter

The documentation suite uses Vale as the style guide and spelling linter. Vale is currently integrated into the continuous integration (CI) pipeline and is executed on each pull request (PR) using a GitHub action. You can select the Details link to view the failures.

important

The Vale GitHub workflow runs on all Markdown files (and for some repos YAML files) in the repository, not only the ones you've updated. However, only items related to files in your PR receive alerts. Failures in the workflow won't prevent your PR from being merged.

You can run Vale locally to view issues directly related to your PR.

Vale CI

Run locally

Run Vale locally to view issues related to the Markdown files you're working on. You can run Vale using the command line, or you can integrate it into a supported editor to view issues in real-time.

Use the command line

  1. Install Vale locally.

  2. Clone the repo containing our Vale settings:

    git clone https://github.com/Consensys/docs-gha.git
  3. Override the default location of the .vale.ini file by setting the VALE_CONFIG_PATH environment variable to the location of the file in the repo. For example, on macOS this is:

    export VALE_CONFIG_PATH="/Users/{user-name}/documentation/docs-gha/spelling/.vale.ini"
    note

    To persist the VALE_CONFIG_PATH environment variable across sessions, you’ll need to add the above command to the appropriate shell configuration file. For example, on macOS, add it to ~/.zshrc (the default shell configuration file in recent versions of macOS).

  4. Run the vale command in your terminal with the location of your file. For example:

    vale node-sync.md

    Run Vale

    note

    If you pass a file that does not exist, Vale will not alert you that the file cannot be found. You'll receive a message similar to 0 errors, 0 warnings and 0 suggestions in the terminal.

Use the VS Code integration

You must have the Visual Studio (VS) Code editor installed to use this integration.

  1. Install Vale locally.

  2. Clone the repo containing our Vale settings:

    git clone https://github.com/Consensys/docs-gha.git
  3. Install the VS Code extension

  4. In the settings for the Vale VS Code extension, set the location of the .vale.ini file, and enable the spell check. The .vale.ini file is located within the spelling directory in the docs-gha repo that you cloned onto your local.

    VS Code extension settings

  5. Restart VS Code.

Contribute to the spell checker

You can contribute to the spell checker by submitting a PR to the docs-gha repository.

Learn more about how to configure Vale.