errata-ai / vale

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

Glob pattern excludes package #923

Open wkoot opened 1 week ago

wkoot commented 1 week ago

Check for existing issues

Environment

Github workflow:

    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: errata-ai/vale-action@v2.1.1
        with:
          fail_on_error: true
          filter_mode: nofilter
          vale_flags: "--glob='!styles *.md'"

Vale version latest default, with .vale.ini:

StylesPath = styles
MinAlertLevel = suggestion
Vocab = Base
Packages = proselint

[*.md]
BasedOnStyles = Vale, proselint

Describe the bug / provide steps to reproduce it

The glob pattern seems to exclude the proselint package from vale entirely, instead of only omitting it from the linting selection:

Installed reviewdog from 'https://github.com/reviewdog/reviewdog/releases/download/v0.17.0/reviewdog_0.17.0_Linux_x86_64.tar.gz' into '/home/runner/reviewdog'.
/home/runner/vale --glob='!styles/ *.md' sync
E100 [loadStyles] Runtime error
style 'proselint' does not exist on StylesPath
Execution stopped with code 1.

I'm trying to exclude the styles folder entirely, since it's throwing errors unrelated to what I want to lint:

  {"message": "[Vale.Spelling] Did you really mean 'Suchow'?", "location": {"path": "styles/proselint/README.md", "range": {"start": {"line": 1, "column": 31}}}, "severity": "ERROR"}
  {"message": "[Vale.Spelling] Did you really mean 'Redistributions'?", "location": {"path": "styles/proselint/README.md", "range": {"start": {"line": 6, "column": 4}}}, "severity": "ERROR"}
  {"message": "[Vale.Spelling] Did you really mean 'Redistributions'?", "location": {"path": "styles/proselint/README.md", "range": {"start": {"line": 8, "column": 4}}}, "severity": "ERROR"}