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

Add pre-commit documentation to docs #213

Open
valentincalomme opened this issue Jan 16, 2024 · 2 comments · May be fixed by #215
Open

Add pre-commit documentation to docs #213

valentincalomme opened this issue Jan 16, 2024 · 2 comments · May be fixed by #215

Comments

@valentincalomme
Copy link

Hi! Love the package. I wanted to add it to my pre-commit hooks but realized there wasn't explicit documentation in the docs.

It would be nice to have a small section explaining how to add it to your hooks and use it with specific settings and parameters.

Happy to help contribute to that.

@seddonym
Copy link
Owner

Thank you!

I also use Import Linter with pre-commit. To be honest I'm not sure what specific instructions would be needed beyond whatever is documented in pre-commit, along with the running the linter section. Do you want to suggest some wording so I've got more of an idea what you're looking for?

@valentincalomme
Copy link
Author

I don't think it needs much info indeed, but something like this could be added to the README.md or at the end of the running the linter section:

`import-linter` can also be used as a `pre-commit` hook. To do so, simply add this section to your `.pre-commit-config.yaml` file:

- repo: https://github.com/seddonym/import-linter/
    rev: "v2.0"
    hooks:
      - id: import-linter
        # any arguments from `lint-imports` can be added here
        args: ["--verbose"]

For the part with the args, I am not entirely certain it works.

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 a pull request may close this issue.

2 participants