-
-
Notifications
You must be signed in to change notification settings - Fork 48
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
New hook: cff #446
Comments
Thanks for the idea @joelnitta. The thing is that I try to keep the depenency graph of {precommit} light, and {V8} as a recursive dependency does not meet this criteria for me. However, anyone can create their own git repo into a hooks repo by following the docs. For R, I think this repo might be the only one, but for most other languages, there are hundreds of repos that contain hook definitions. |
You can run pre-commit hooks from the pre-commit framework with other hooks alongside in the so-called migration mode, so there should be no compatibility issue. |
From the point of view of the {precommit} R package, would that be the equivalent of |
I think so. Please consult upstream docs at pre-commit.com. |
This does seem to be the case. Upstream docs say
and this line controls said behavior from {precommit}: Line 84 in 3822108
I can confirm that first installing the {cffr} precommit hook with cffr::cff_git_hook_install(), then setting up I am not sure how this would work if I wanted to add another pre-commit hook outside of the |
Also @lorenzwalthert do you mind explaining why having the option to include the ccfr pre-commit hook would add cffr's dependencies? I think it could be done similarly to {codemeta}, where the hook just instructs the user to run
I realize now this is different from using the available {cffr} hook as mentioned in my OP, but I think it would be straightforward to implement a hook in {precommit} that basically does the same thing as the codemeta hook, but for |
that should work without issues. |
Short anser: If it's merely a check for outdated files and has no calls to {cffr}, you are right that it would not expand {precommit}'s dependency graph. In that case, I am happy to add a hook (and thanks for keep digging :D). If you want to call {cffr} in the hook, here's what you should know: |
@lorenzwalthert where is this system directory? |
I think |
Thanks. Actually the reason I ask is because of a different problem: #451 I thought I may try to update the renv lock file myself but having troubles... |
Well if you want to override dependencies specified in - id: lintr
additional_dependencies:
- [email protected] |
@joelnitta do you want to implement the {cff} hook in the spirit of the {codemeta} hook? I won't have time to do that. |
Yes, I should be able to. I'll try to get to it this week. |
Similar to
codemeta.json
,CITATION.cff
provides machine and human-readable information about how to cite a package. The cffr package can auto-generate it, and already has a hook available. It would be great if this hook was included inprecommit
.The text was updated successfully, but these errors were encountered: