errata-ai / vale

:pencil: A markup-aware linter for prose built with speed and extensibility in mind.
https://vale.sh
MIT License
4.3k stars 144 forks source link

Vale configuration in GitHub Actions for asciidoctor files #195

Closed hepabolu closed 4 years ago

hepabolu commented 4 years ago

I am trying to get the Vale GitHub Action working for my book that consists of multiple Asciidoctor files.

So far I have the action working, but I am not sure the official action includes asciidoctor, because it throws error messages on lines in source code blocks.

I would also like for it to use an en_GB dictionary.

These are the configuration files I've used. .vale.ini

StylesPath = .github/styles
MinAlertLevel = suggestion

[./*.md]
BasedOnStyles = Vale

[book/*.adoc]
BasedOnStyles = Vale

.github/vale-linter.yml

name: Linting
on: [push]

jobs:
  prose:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@master

      - name: Vale
        uses: errata-ai/vale-action@v1.0.4
        with:
          styles: |
            Vale
            https://github.com/errata-ai/write-good/releases/latest/download/write-good.zip
            https://github.com/errata-ai/proselint/releases/latest/download/proselint.zip
        env:
          GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

How can I tell it to ignore the source code blocks and use an en_GB dictionary?

nschonni commented 4 years ago

Probably better to open on the Actions repo https://github.com/errata-ai/vale-action

hepabolu commented 4 years ago

thanks. I'll copy the issue to the Actions repo. Hope that's the correct thing to do.