Skip to content

feat: Add pre-commit support #558

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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 29, 2023
Merged

feat: Add pre-commit support #558

merged 1 commit into from
Jan 29, 2023

Conversation

AleksaC
Copy link
Contributor

@AleksaC AleksaC commented Jan 28, 2023

This enables running vale with pre-commit.

@JacobCoffee
Copy link

As requested in discussion #556

@jdkato
Copy link
Member

jdkato commented Jan 29, 2023

Thanks!

@jdkato jdkato merged commit 16d3a7f into errata-ai:v2 Jan 29, 2023
@Jarmos-san
Copy link

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
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

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