nix-direnv/treefmt.nix
Bryan Bennett c59b60e747 Switch to bats over pytest
This removes python entirely from the stack.
Yet to run the tests on macOS, but they're buildable by way of nix
wrapping. Worst case scenario, you cannot run them from the devshell
but `nix run .#test-runner-<latest||stable>` should work okay.
2025-08-19 08:44:42 -04:00

37 lines
820 B
Nix

{ inputs, ... }:
{
imports = [ inputs.treefmt-nix.flakeModule ];
perSystem =
{ pkgs, ... }:
{
treefmt = {
# Used to find the project root
projectRootFile = ".git/config";
programs = {
deadnix.enable = true;
deno.enable = true;
nixfmt.enable = true;
nixfmt.package = pkgs.nixfmt-rfc-style;
shellcheck.enable = true;
shfmt.enable = true;
statix.enable = true;
yamlfmt.enable = true;
};
settings.formatter = {
shellcheck.includes = [
"direnvrc"
"tests/*.bash"
"tests/*.bats"
];
shfmt.includes = [
"direnvrc"
"tests/*.bash"
"tests/*.bats"
];
};
};
};
}