-
Notifications
You must be signed in to change notification settings - Fork 258
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
Feature Request: use_pre_commit_config()
#849
Comments
I think there is a conflict with current infrastructure in usethis like Side note: I am not sure I'd call my repo a package. I try to give it this structure, but it's not there 100%, but I think it does not matter that much if it one because it is basically bash scripts and pre-commit will handle the installation process. |
I'm not eager for usethis to get deeper into the commit hook business. The one we do add (about README.[R]md stuff) is already a source of some complaints / friction. I think doing this well (hook management) is outside the scope of usethis. Empirically, I've concluded you also can't lean too much on such hooks because they don't travel with the repo and libgit2 doesn't support hooks, so clients that rely on libgit2 effectively don't "see" them. |
Ok! :) Thanks for considering it, I totally understand what you mean by the
friction with pre commit hooks and the fact that they don't travel with the
repo.
…On Wed., 24 Jul. 2019, 01:41 Jennifer (Jenny) Bryan, < ***@***.***> wrote:
I'm not eager for usethis to get deeper into the commit hook business. The
one we do add (about README.[R]md stuff) is already a source of some
complaints / friction. I think this doing this well is outside the scope of
usethis. Empirically, I've concluded you also can't lean too much on such
hooks because they don't travel with the repo and libgit2 doesn't support
hooks, so clients that rely on libgit2 effectively don't "see" them.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#849?email_source=notifications&email_token=ABRQDJI23ZBB4W3V6LK6LBDQA4RBHA5CNFSM4IFUSWWKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2TRJ2I#issuecomment-514266345>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABRQDJKLV4TN3BDPEPDN2M3QA4RBHANCNFSM4IFUSWWA>
.
|
Maybe we could implement something similar to what you proposed in lorenzwalthert/pre-commit-hooks then. Side note: I am not sure I understand you correctly as far as the traveling of hooks goes. I think it is a key feature of pre-commit.com that they are the same for every user working in the same repo because the hooks are defined in a central place (a git repo like the one referenced above) and a user only needs a |
This is the sense in which I mean git hooks "don't travel with the repo":
https://stackoverflow.com/questions/427207/can-git-hook-scripts-be-managed-along-with-the-repository or
https://www.darrenlester.com/blog/including-hooks-in-a-git-repository |
Yes, in my understanding, these shortcomings are only completely resolved when |
I've recently enjoyed using @lorenzwalthert 's pre-commit-hooks package - I'm wondering if there might be some scope to include this in
usethis
?This would/could:
^\.pre-commit-config\.yaml$
to .Rbuildignorepre-commit install
to install the pre-commit hooksThe text was updated successfully, but these errors were encountered: