Open JayRovacsek opened 2 months ago
The flake-parts module has a special integration that activates when you load both git-hooks.nix
and treefmt-nix
. Might that help?
It's defined here: https://github.com/cachix/git-hooks.nix/blob/40e6053ecb65fcbf12863338a6dcefb3f55f1bf8/flake-module.nix#L72
Thanks for the fast response @roberth, unfortunately I don't utilise flake-parts myself (though I might be misunderstanding how I'd consume the flakeModule code)
Would the project be open to a PR that added a setting for config/configFile akin to the implementation for typos
? (ref)
Currently the treefmt hook does not support a configuration path option that would enable the reference of treefmt.toml. Without running treefmt --init or --config-file the check cannot be utilised in a consistent way if the config file is not committed to the repository
Happy to contribute a PR that adds this if deemed suitable :pray: