News for hackers. Stuff that matters.
Re:Pre-commit: framework for managing/maintaining multi-lang... by waynesonfire on Tuesday December 21, 2021 @06:51AM (#29636474)
CICD verifies but pre commit applies.

Therefore, regardless of whether you use pre commit, your cicd should be verifying that the software, including source code is satisfying the specification.

As a collorary, pre commit doesn't need to validate. Eg tell you where exactly the errors are.

These are subtle but important distinctions as it nullifies your double accounting concern. The only doubling that exist is that the pre commit and cicd are both made aware of the specification. Maybe that is your concern.

Re:Pre-commit: framework for managing/maintaining multi-lang... by matharmin on Tuesday December 21, 2021 @07:41AM (#29636800)
I like seeing exactly what I commit, so I never let a pre-commit script make any changes. It's just a single command to format any changed files in the repo.

But some developers in my team do like that convenience of just being able to commit, so that's an option that can be configured in our internal tooling.

Re:Pre-commit: framework for managing/maintaining multi-lang... by misnome on Tuesday December 21, 2021 @08:05AM (#29636960)
Pre-commit doesn’t commit if it makes any changes, it just leaves the changed files for you to either add to the index or re-commit skipping the checks.