29
The Pain That is GitHub Actions - Feldera Blog
(www.feldera.com)
Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!
Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.
Hope you enjoy the instance!
Rules
Follow the wormhole through a path of communities !webdev@programming.dev
You need them in CI anyway to check people have actually done that, but yeah you definitely don't need to have CI automatically fix formatting and commit the fixes. That's crazy.
No, you don't.
To check if people have done what - committed? That's the only thing they need to do, and they'll stumble upon a roadblock immediately if the typecheck or lint fails.
Committing itself won't be possible... That's why we have automated pre-commit checks that don't depend on people remembering to do them manually.
To check that people ran the pre-commit linters.
That's not how pre-commit hooks work. They're entirely optional and opt-in. You need CI to also run them to ensure people don't forget.
They're optional if you make them optional. I didn't. You do as you please. 😄
No, they're inherently optional in Git. There's no way to "check in" a git hook. You have to put in your
README
You definitely need to actually check the lints in CI. It's very easy though, just add
pre-commit run -a
to your CI script.pre-commit also has a free service for open source GitHub repos too. They’ll even push an autofix commit for you if your tools are configured for it