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

Consider allowing an argument to the pre-commit hook to give the project #842

Open
abelsiqueira opened this issue Jun 11, 2024 · 2 comments

Comments

@abelsiqueira
Copy link
Contributor

This line:

entry: "julia -e 'import JuliaFormatter: format; format(\".\")'"

Could be changed to include --project=X where X is some argument to the pre-commit hook. It would allow people that install JuliaFormatter on a separate global environment.

@m-fila
Copy link
Contributor

m-fila commented Jun 22, 2024

This can be done already by specifying args in your pre-commit-config.yaml. For instance

repos:
  - repo: https://github.com/domluna/JuliaFormatter.jl.git
    rev: v1.0.56
    hooks:
    -   id: "julia-formatter"
        args: ["--project=/tmp/X"]

@abelsiqueira
Copy link
Contributor Author

Thanks! I didn't know that was already possible. @dpo, I think this solves your use case?

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

No branches or pull requests

2 participants