fix(pre-commit): Hooks should use the copywrite binary#120
Conversation
If you use copywrite in your repo, you probably already have copywrite installed. The hooks running `go run .` doesn't work in my terraform provider, because it is a plugin: ``` This binary is a plugin. These are not meant to be executed directly. Please execute the program that consumes these plugins, which will load any plugins automatically exit status 1 ``` So switch the entry point to be the copywrite program. Don't pass filenames. copywrite knows what to do. Pass arguments directly on the entry. Closes hashicorp#78 Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
|
I'm happy to drop the |
|
Could someone take a look at this ? Copywrite is currently unusable as pre-commit hook without this fix... Also, @bhundven, the additional commit you made breaks pre-commit ci (see image below), idk if this is expected and something is required on my end. |
937f17f to
4eee5fe
Compare
@Paillat-dev I have removed the second commit. Thanks! |
|
#123 is related, and should be reviewed/merged at the same time. If you would rather have one PR for both, I could also update this PR. @CalebAlbers Sorry to call out, but could we get a review of these? Massive thank you in advance! |
|
@mukeshjc Could you please review this. Thank you. |
|
Thanks for looking into this 🚀 |

If you use copywrite in your repo, you probably already have copywrite installed.
The hooks running
go run .doesn't work in my terraform provider, because it is a plugin:So switch the entry point to be the copywrite program. Don't pass filenames. copywrite knows what to do.
Pass arguments directly on the entry.
Closes #78