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

Already on GitHub? Sign in to your account

Pre-commit support #130

Open
Sajjon opened this issue Sep 3, 2024 · 2 comments
Open

Pre-commit support #130

Sajjon opened this issue Sep 3, 2024 · 2 comments
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@Sajjon
Copy link

Sajjon commented Sep 3, 2024

Would be nice with support and guide to use Harper with pre-commit tool just like typos CLI tool do

@lukasmwerner
Copy link
Contributor

Not sure if this helps but harper provides harper-cli which you can use to write a script to check all files.

This is a bit quick and dirty but works.

find . -type f -not -iwholename '*.git*' -exec harper-cli lint {} \;

You can install harper-cli using the following command: cargo install --git https://github.com/elijah-potter/harper harper-cli. I will note that harper-cli doesn't follow any dictionaries currently

@elijah-potter
Copy link
Collaborator

@lukasmwerner is absolutely right. I will caution that harper-cli currently exists primarily for testing purposes. If anyone is interested in making changes toward turning it into a more robust experience for tools like pre-commit, feel free to leave a comment on this issue and we can make it happen. I personally don't have time to expand scope in this way at the moment.

@elijah-potter elijah-potter added documentation Improvements or additions to documentation enhancement New feature or request labels Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants