Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pre-commit failing with files under dir and --base dir set #327

Open
guglie opened this issue Aug 8, 2023 · 1 comment
Open

Pre-commit failing with files under dir and --base dir set #327

guglie opened this issue Aug 8, 2023 · 1 comment

Comments

@guglie
Copy link

guglie commented Aug 8, 2023

First of all, thanks for the great tool! 馃殌

If I have my openAPI spec files in a folder named docs ( containing relative refs) and run the following pre-commit (while committing multiple spec files under the docs folder):

- repo: https://github.com/daveshanley/vacuum
  rev: "v0.3.3"
  hooks:
    -   id: vacuum
        name: Check OpenAPI doc
        files: ^docs/.*.yml$
        args: ["--base", "./docs", "--details", "--errors"]

It can't find the files while committing.

  ERROR   Please supply an OpenAPI specification to lint

But running it manually is ok and finds the relative refs without problems.
pre-commit run vacuum --files docs/*.yml

@daveshanley
Copy link
Owner

Hmm.. will look into this for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants