Might be nice to have some out-of-the-box support for format checking. I'm doing so in a testPostRun in some personal projects at the moment:
testPostRun = ''
if [ "$_FMT_CHECKED" != "1" ]; then
PATH=${toolchain}/bin:$PATH
cp ${cargonix}/crate/rustfmt.toml .
echo "Checking formatting..."
_checkFiles=$(find . -name '*.rs')
echo -e "$_checkFiles\n"
rustfmt --check $_checkFiles
_FMT_CHECKED=1
fi
'';
Doing it in crate2nix proper might help with the cargonix and toolchain plumbing, as well as remove the need for the guard to prevent checking multiple times.
Might be nice to have some out-of-the-box support for format checking. I'm doing so in a
testPostRunin some personal projects at the moment:Doing it in crate2nix proper might help with the
cargonixandtoolchainplumbing, as well as remove the need for the guard to prevent checking multiple times.