Skip to content
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

pre-commit Hook Support #64

Open
seandstewart opened this issue Dec 17, 2024 · 4 comments
Open

pre-commit Hook Support #64

seandstewart opened this issue Dec 17, 2024 · 4 comments

Comments

@seandstewart
Copy link

Hello -

Thanks for creating and maintaining this tool - I plan to use this in my own work, but I wanted to ask, have you considered adding a pre-commit hook to this repository? This would go a long way towards ensuring these generated files are up-to-date.

I see that golang is supported and it appears to be straightforward to integrate.

@ccoVeille
Copy link

This sounds like a nice idea.

A random Gopher, not a maintainer

@KarnerTh
Copy link
Owner

Hi @seandstewart, thanks for the feedback!

I did not plan to add any pre-commit hook, as I am not a huge fan of those. Running something on every commit is nothing I want to enforce in any way, as the local setup should be up to every developer as he sees fit.

The issue with ensuring that all generated files are up to date is a valid one though, but I would solve that by a check in the CI/CD pipeline.

@seandstewart
Copy link
Author

Hey @KarnerTh

Thanks for the response - I want to be clear I wasn't asking you to add pre-commit checks to this repository, but rather adding Hook configuration to this repository so it could be used by other developers in their dev/CI lifecycle.

I understand and respect your own position on the matter and I don't wish to run counter to that - my proposal is intended to enable developers who would prefer to use the pre-commit framework for green keeping and running CI checks. It's quite common for organizations to have a standard set of linting and formatting tools distributed as pre-commit checks so that devs can receive fixes and feedback earlier in the SDLC than in a hosted CI pipeline, which incurs an additional cost not only in compute but in developer cycle time, especially in large codebases.

In any case, if you don't wish to include this feature, no problem, but I'd hope you'd consider it 👍

@KarnerTh
Copy link
Owner

Ohh now I get it, thanks for the explanation 👍🏼

Yeah sure we can add that, if it helps someone I am all for it.
Currently I do not have much time working on this, but I will happily accept a PR if you (or someone) got time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants