Prek: A better, faster, drop-in pre-commit replacement, engineered in Rust
31–40 of 133 posts
Re: Prek: A better, faster, drop-in pre-commit replacement, engineered in Rust
#32Re: Prek: A better, faster, drop-in pre-commit replacement, engineered in Rust
#33Earlier quoted context omitted.
They integrate well with CI. You run the same hooks in CI as locally so it's DRY and pushes people to use the hooks locally to get the early feedback instead of failing in CI. Hooks without CI are less useful since they will be constantly broken.
Why wouldn't I just call the same shell script in CI and locally though? What's the benefit here? All I'm seeing is circular logic.
Re: Prek: A better, faster, drop-in pre-commit replacement, engineered in Rust
#34I use http://hk.jdx.dev/ , which is based on https://pkl-lang.org/ and Rust, as it integrates with http://mise.jdx.dev/ . Is prek much better?
Re: Prek: A better, faster, drop-in pre-commit replacement, engineered in Rust
#35I always just disable pre-commit
Re: Prek: A better, faster, drop-in pre-commit replacement, engineered in Rust
#36I struggle to see value with git hooks. They're an opt-in, easily opt-out way of calling shell scripts from my understanding--you can't force folks to run them, and they don't integrate/display nicely with CI/CD. Why not just call a shell script directly? How would you use these with a CI/CD platform?
I think there's value in git hooks, but pre-commit is the wrong hook. This belongs in a hook that runs on attempted push, not on commit.
Re: Prek: A better, faster, drop-in pre-commit replacement, engineered in Rust
#37Another commenter is currently down voted for something similar, but I'll share my controversial take anyways: I hate pre-commit hooks. I loathe UX flows where you get turned around. If I try to make a commit, it's because that I what I intend to do . I don't want to receive surprise errors. It's just more magic, more implicit behavior. Give me explicit tooling. If you want to use pre-commit hooks, great! You do you.…
Now, if the server enforces checks on push, that's a project policy that should be respected.
Re: Prek: A better, faster, drop-in pre-commit replacement, engineered in Rust
#38I struggle to see value with git hooks. They're an opt-in, easily opt-out way of calling shell scripts from my understanding--you can't force folks to run them, and they don't integrate/display nicely with CI/CD. Why not just call a shell script directly? How would you use these with a CI/CD platform?
This might be a me problem but I extensively manipulate the git history all the time which makes me loathe git hooks. A commit should take milliseconds, not a minute.
Re: Prek: A better, faster, drop-in pre-commit replacement, engineered in Rust
#39Am I alone in that I never have had an issue with performance with pre-commit? granted I don't work on projects the size of the Linux kernel, but I haven't had any complaints.
Re: Prek: A better, faster, drop-in pre-commit replacement, engineered in Rust
#40Earlier quoted context omitted.
This might be a me problem but I extensively manipulate the git history all the time which makes me loathe git hooks. A commit should take milliseconds, not a minute.
You do seem to be doing it wrong. Extensive manipulation of the record and slow hooks are both undesirable.
Slow hooks are also not a problem in projects I manage as I don't use them.