-
Notifications
You must be signed in to change notification settings - Fork 5
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 adding a pre-commit hook #85
Comments
I've implemented the hook as an example here: JuliaBesties/BestieTemplate.jl#472 |
Sure, I’m open to PRs adding this here |
Thanks! I'll submit something soon |
abelsiqueira
added a commit
to abelsiqueira/ExplicitImports.jl
that referenced
this issue
Oct 3, 2024
Create scripts/explicit-imports.jl to allow running checks based on parsed arguments. Create a pre-commit hook that runs the script. Document how to use the pre-commit hook and the script in the README. Closes ericphanson#85
abelsiqueira
added a commit
to abelsiqueira/ExplicitImports.jl
that referenced
this issue
Oct 3, 2024
Create scripts/explicit-imports.jl to allow running checks based on parsed arguments. Create a pre-commit hook that runs the script. Document how to use the pre-commit hook and the script in the README. Closes ericphanson#85
abelsiqueira
added a commit
to abelsiqueira/ExplicitImports.jl
that referenced
this issue
Oct 4, 2024
Update the CLI at src/main.jl to allow running the checks. The checks can be defined based on parsed arguments. Create scripts/explicit-imports.jl to pass ARGS to the CLI when running pre-commit. Create a pre-commit hook that runs the script. Move the documentation of CLI from docs/api.md to the README. Expands the CLI documentation with information on how to run the pre-commit hooks. Closes ericphanson#85
abelsiqueira
added a commit
to abelsiqueira/ExplicitImports.jl
that referenced
this issue
Oct 4, 2024
Update the CLI at src/main.jl to allow running the checks. The checks can be defined based on parsed arguments. Create scripts/explicit-imports.jl to pass ARGS to the CLI when running pre-commit. Create a pre-commit hook that runs the script. Move the documentation of CLI from docs/api.md to the README. Expands the CLI documentation with information on how to run the pre-commit hooks. Closes ericphanson#85
abelsiqueira
added a commit
to abelsiqueira/ExplicitImports.jl
that referenced
this issue
Oct 4, 2024
Update the CLI at src/main.jl to allow running the checks. The checks can be defined based on parsed arguments. Create scripts/explicit-imports.jl to pass ARGS to the CLI when running pre-commit. Create a pre-commit hook that runs the script. Move the documentation of CLI from docs/api.md to the README. Expands the CLI documentation with information on how to run the pre-commit hooks. Closes ericphanson#85
abelsiqueira
added a commit
to abelsiqueira/ExplicitImports.jl
that referenced
this issue
Oct 4, 2024
Update the CLI at src/main.jl to allow running the checks. The checks can be defined based on parsed arguments. Create scripts/explicit-imports.jl to pass ARGS to the CLI when running pre-commit. Create a pre-commit hook that runs the script. Move the documentation of CLI from docs/api.md to the README. Expands the CLI documentation with information on how to run the pre-commit hooks. Closes ericphanson#85
ericphanson
added a commit
that referenced
this issue
Oct 6, 2024
…ersions, and add `.pre-commit-config.yaml` (#86) * Create script and pre-commit hook Update the CLI at src/main.jl to allow running the checks. The checks can be defined based on parsed arguments. Create scripts/explicit-imports.jl to pass ARGS to the CLI when running pre-commit. Create a pre-commit hook that runs the script. Move the documentation of CLI from docs/api.md to the README. Expands the CLI documentation with information on how to run the pre-commit hooks. Closes #85 * fix typo (`individial` -> `individual`) * rename files `main.jl` -> `cli.jl` * reorganize docs a little bit * reduce confusion by tweaking word elsewhere * don't show stacktrace in CLI * Revert "rename files `main.jl` -> `cli.jl`" This reverts commit d1ef007. * rename `cli` to `main` * only call `activate_and_load` once * all caps globals * exit manually * bump version --------- Co-authored-by: Eric Hanson <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We are considering how to best use ExplicitImports in Bestie (JuliaBesties/BestieTemplate.jl#349 and JuliaBesties/BestieTemplate.jl#217).
Our current idea is to have a pre-commit hook, like we have for JuliaFormatter and other non-Julia tools.
These hooks also form our Lint workflow, which ensures that even if someone is not using pre-commit, the hooks still run at each PR.
For that to work, we'll need a definition of the pre-commit-hook for ExplicitImports. Although it's possible to create a completely separate repo for that, it's common to have it as part of the main repo (e.g., https://github.com/domluna/JuliaFormatter.jl/blob/master/.pre-commit-hooks.yaml).
Are you open to adding a
.pre-commit-hooks.yml
file here (and possibly an auxiliary script file)?From what I tried so far, it would probably be something like the two files below, although I'm open to suggestions
The text was updated successfully, but these errors were encountered: