4 ms·
My favourite pre-commit feature is how it'll stash any unstaged changes before running checks when committing. No more irrelevant linter errors when committing
by l0b0 5y ago
My favourite pre-commit feature is how it'll stash any unstaged changes before running checks when committing. No more irrelevant linter errors when committing part of a change. (And yes, it does the right thing when doing `commit -a`.)
My least favourite bug is that it doesn't always play nicely with NixOS [1], and the maintainer locked me out of the issue for pointing it out.
[1] https://github.com/pre-commit/pre-commit/pull/1938 https://github.com/pre-commit/pre-commit/pull/1938
- chriswarbo 5y ago> My least favourite bug is that it doesn't always play nicely with NixOS [1], and the maintainer locked me out of the issue for pointing it out. Oof. Does this solve the problem https://github.com/cachix/pre-commit-hooks.nix https://github.com/cachix/pre-commit-hooks.nix (using Nix to manage dependencies)? I was looking at pre-commit the other day, and wanted to incorporate it into the Nix setup of my projects.
- l0b0 5y agoThank you for the tip. The issue is that I want the project to be usable by people who are not using Nix. IIUC I'd have to duplicate the configuration to do that with pre-commit-hooks.nix. Is that correct?
- chriswarbo 5y agoNot sure (I still haven't used it!), but I wouldn't be surprised :(
- EdwardDiego 5y agoThat thorn in the side bit was a little OTT. He's doing this for free, yeah?
- l0b0 5y agoDid you actually read the comment thread? My comment: > NixOS isn't broken. I'm running into the same problem (link above). The response: > if you don't have a functioning ld or libstdc++ that's on you, sorry So they basically consider the way NixOS works to be "broken", and then go out of their way to block me from responding further to the discussion. I've been maintaining and contributing to FOSS for many years, and this is one of the most rude responses I've seen so far.