git-hooks.nix
git-hooks.nix copied to clipboard
Seamless integration of https://pre-commit.com git hooks with Nix.
Follow instructions from readme: https://github.com/cachix/pre-commit-hooks.nix/blob/61a3511668891c68ebd19d40122150b98dc2fe3b/README.md?plain=1#L31-L73 Now inspect `.pre-commit-config.yaml`: ```yaml # DO NOT MODIFY # This file was generated by pre-commit-hooks.nix { "default_stages": [ "commit" ], "repos": [ { "hooks": [...
Currently, I have to `settings.tools.fourmolu = lib.mkForce config.haskellProjects.default.outputs.finalPackages.fourmolu_0_13_1_0;` I would rather not use `mkForce` here, it would be nice if the toolset was defined with `mkDefault` in order to do...
currently we have the `pass_filenames`, but in certain cases it would be nice if the passed file names could be absolute paths. Use case: We have a monorepo with multiple...
Basically what I want to do is define the pre-commit-hooks with this project and then want to add them to my devshells buildInputs. Is there a way to do that,...
Looks like these options don't make their way into the config.
Examples from my current `.pre-commit-config.yaml`: ``` repos: - repo: https://github.com/asottile/pyupgrade rev: v3.3.1 hooks: - id: pyupgrade args: [--py310-plus] exclude: /migrations/ - repo: https://github.com/pre-commit/mirrors-mypy rev: v0.991 hooks: - id: mypy additional_dependencies:...
I see that there is already [an issue](https://github.com/cachix/pre-commit-hooks.nix/issues/2) for documenting how to "override" a hook. I also want to override a hook, but I think we mean "override" in different...
Follow-up to https://github.com/cachix/pre-commit-hooks.nix/issues/277#issuecomment-1522513159. It seems that the best place to configure a `make`-based project's tests is via `mkDerivation`'s `checkPhase`. It's unclear how best to interoperate between pre-commit hooks and `checkPhase`...
I'm setting up CI for a C/C++ project at https://github.com/alex-courtis/way-displays/pull/86. `cppcheck` and `include-what-you-use` are used, and I want to add pre-commit hooks for them. There is an existing hooks repo...