add treefmt check

main
Jörg Thalheim 2 years ago
parent 5cc4bba4a3
commit 9b26507e14
No known key found for this signature in database

@ -0,0 +1,22 @@
{
runCommandNoCC,
gofumpt,
alejandra,
python3,
treefmt,
}:
runCommandNoCC "treefmt" {
nativeBuildInputs = [
gofumpt
treefmt
alejandra
python3.pkgs.flake8
python3.pkgs.black
];
} ''
# keep timestamps so that treefmt is able to detect mtime changes
cp --no-preserve=mode --preserve=timestamps -r ${../..} source
cd source
HOME=$TMPDIR treefmt --no-cache --fail-on-change
touch $out
''
Loading…
Cancel
Save