Skip to content

feat: Add pre-commit support#558

Merged
jdkato merged 1 commit intovale-cli:v2from
AleksaC:pre-commit
Jan 29, 2023
Merged

feat: Add pre-commit support#558
jdkato merged 1 commit intovale-cli:v2from
AleksaC:pre-commit

Conversation

@AleksaC
Copy link
Copy Markdown
Contributor

@AleksaC AleksaC commented Jan 28, 2023

This enables running vale with pre-commit.

@JacobCoffee
Copy link
Copy Markdown

As requested in discussion #556

@jdkato
Copy link
Copy Markdown
Member

jdkato commented Jan 29, 2023

Thanks!

@jdkato jdkato merged commit 16d3a7f into vale-cli:v2 Jan 29, 2023
@Jarmos-san
Copy link
Copy Markdown

Thanks for the PR but it appears there's some issue with the .pre-commit-hooks.yaml file. I'm stumbling across this error message after running the pre-commit install --install-hooks command;

[INFO] Initialising environment for https://github.com/errata-ai/vale
An error has occurred: InvalidManifestError:
=====> ~/.cache/pre-commit/repokv40qx5e/.pre-commit-hooks.yaml is not a file.

Perhaps running the pre-commit validate-manifest command will suggest something about the file to be fixed?

@AleksaC
Copy link
Copy Markdown
Contributor Author

AleksaC commented Jan 30, 2023

Which revision of the repo are you using? I think it doesn't work on revisions that don't have the .pre-commit-hooks.yaml file. Currently the only one that would work is 16d3a7f. This works for me and should work in general:

repos:
  - repo: https://github.com/errata-ai/vale
    rev: 16d3a7f
    hooks:
      - id: vale

@Jarmos-san
Copy link
Copy Markdown

Got it, I was using the latest tagged version which obviously doesn't have the .pre-commit-hooks.yml file!.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants