feat: add pre-commit hooks#798
Conversation
5eeee6a to
2073ea4
Compare
2073ea4 to
d517cc9
Compare
markgoddard
left a comment
There was a problem hiding this comment.
How are we expecting this to be used? Is it something that would be enabled for everyone in a given Kayobe config, or opted into per-person?
markgoddard
left a comment
There was a problem hiding this comment.
It would be nice to provide some simple docs on this in the contributor guide.
I think having it is as an opt-in at least within SKC it the sensible move. If individual engineers want to enable it within their own checkout of the site config they can do and in situations where their is a single checkout shared enabling it would a group decision. |
d517cc9 to
686e5e4
Compare
1a61c81 to
2746b8f
Compare
Alex-Welsh
left a comment
There was a problem hiding this comment.
My one lingering concern is that false positives could break things but they can be skipped with --no-verify so I think the benefits outweigh the risks
eb12139 to
8355d55
Compare
markgoddard
left a comment
There was a problem hiding this comment.
Actually perhaps this should go to antelope only?
|
@jackhodgkiss should we get this merged? I'm happy to rebase it on antelope for you if you're busy |
7eb0dcf to
5e7a63a
Compare
Initally `pre-commit` hooks were installed due the presense of a hook for `control host bootstrap` and when `enable_pre_commit_hooks` was set to `true`. However now `pre-commit` hooks are only installed when the hook is present or the playbook is called, no requirement for an `Ansible` conditional to be true.
5e7a63a to
54766db
Compare
Add a simple playbook that can install pre-commits and register a few simple hooks. This process is implemented as a hook that will run post control host bootstrap.
Note: this is currently configured as an opt-in feature and will only install and register hooks if
enable_pre_commit_hooksis set totrueininstall-pre-commit-hooks.yml