dnephin / pre-commit-golang

Golang hooks for pre-commit
MIT License
648 stars 222 forks source link

:rotating_light: Project sunsetting :city_sunset: #98

Open dnephin opened 1 year ago

dnephin commented 1 year ago

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.

trallnag commented 1 year ago

Did you stop using Git hooks altogether?

dnephin commented 1 year ago

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.

trallnag commented 1 year ago

ok, thanks for the insight

guettli commented 1 year ago

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

dnephin commented 1 year ago

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.

tonsV2 commented 1 year ago

Maybe archive and refer to this project instead?