Skip to content

Support rustfmt checks #449

@jrobsonchase

Description

@jrobsonchase

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions