modernize treefmt configuration

This commit is contained in:
Jörg Thalheim 2024-07-08 12:55:14 +02:00
parent bd2255044c
commit c57fe2b791

View file

@ -3,10 +3,10 @@
inputs.treefmt-nix.flakeModule inputs.treefmt-nix.flakeModule
]; ];
perSystem = _: { perSystem = {
treefmt = { treefmt = {
# Used to find the project root # Used to find the project root
projectRootFile = "flake.lock"; projectRootFile = ".git/config";
programs = { programs = {
deadnix.enable = true; deadnix.enable = true;
@ -20,9 +20,13 @@
statix.enable = true; statix.enable = true;
}; };
settings.formatter = { settings.formatter =
shellcheck.includes = [ "*.sh" "direnvrc" ]; let
shfmt.includes = [ "*.sh" "direnvrc" ]; shellIncludes = [ "*.sh" "direnvrc" ];
in
{
shellcheck.includes = shellIncludes;
shfmt.includes = shellIncludes;
}; };
}; };
}; };