pre-commit-golang icon indicating copy to clipboard operation
pre-commit-golang copied to clipboard

:rotating_light: Project sunsetting :city_sunset:

Open dnephin opened this issue 3 years ago • 11 comments
trafficstars

Hello everyone,

Unfortunately I no longer have the time or motivation to maintain this project. I have not used pre-commit or these hooks in a few years. I never added tests to the project, so it's difficult for me to review and approve pull requests with any confidence. There have been a number of PRs that have broken things for other people. There are still plenty of bugs to fix, and there are frequent requests to publish new releases.

There are already other projects offering pre-commit hooks for Go. You can find a list here: https://pre-commit.com/hooks.html. Some of those seem to offer a lot more than this project.

If someone is really keen on maintaining these hooks I can link to your fork from the README to redirect people to the new fork. Either way, I will likely be archiving this project sometime in the next year.

I'd like to thank everyone who has contributed to this project. I hope it was a reasonably pleasant experience.

dnephin avatar Nov 20 '22 20:11 dnephin

Did you stop using Git hooks altogether?

trallnag avatar Nov 22 '22 15:11 trallnag

Yes, I don't really use git hooks anymore. I'll run tests on every file save, and my IDE mostly takes care of formatting and import order every time a file is save. I might do a full test run and lint before committing, but I run it manually. CI catches anything I missed, but it happens infrequently enough.

dnephin avatar Nov 22 '22 21:11 dnephin

ok, thanks for the insight

trallnag avatar Nov 22 '22 21:11 trallnag

@dnephin "tests on every save" This sound interesting. Could you please share how you do this?

guettli avatar Dec 21 '22 07:12 guettli

Ya, I get a ton of value from running tests on every save!

I use gotestsum --watch -ftestname -- -count=1. Sometimes if I'm working in a large project I'll add -short or -run=<name> to that command to run a subset of tests in the package.

More details about that here: https://github.com/gotestyourself/gotestsum#run-tests-when-a-file-is-saved

By default this runs only the tests in the package that changed (because generally those are the relevant tests), but if your test suite is fast enough and you want to run every test, you could also use ./... at the end of the command to run everything.

dnephin avatar Dec 21 '22 19:12 dnephin

Maybe archive and refer to this project instead?

tonsV2 avatar Feb 12 '23 07:02 tonsV2