Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 22 additions & 8 deletions nix/checks.nix
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,19 @@
mkdir -p $out
'';

unused-lints = toolchains.nightly.mkCargoDerivation (
commonArgs
// {
cargoArtifacts = cargoArtifactsDev;
CARGO_PROFILE = "dev";
pnameSuffix = "-unused-lints";
buildPhaseCargoCommand = ''
RUSTFLAGS="''${RUSTFLAGS:-} -D unused" cargo check --all-targets --all-features
'';
installPhase = "mkdir -p $out";
}
);

no-todo-comments = pkgs.runCommand "no-todo-comments-${rev}" { inherit src; } ''
if grep -rn --exclude-dir=contrib 'TO[D]O\|FIX[M]E' $src/ 2>/dev/null; then
echo "FAIL: unresolved work-item markers found"
Expand All @@ -113,18 +126,19 @@
checks = checks // {
quick = pkgs.symlinkJoin {
name = "quick-checks-${rev}";
paths = [
checks.tests-nightly-dev
checks.clippy
paths = with checks; [
tests-nightly-dev
clippy
];
};
lint = pkgs.symlinkJoin {
name = "lint-checks-${rev}";
paths = [
checks.cargo-sort
checks.clippy
checks.doc
checks.no-todo-comments
paths = with checks; [
cargo-sort
clippy
doc
unused-lints
no-todo-comments
];
};
nightly = pkgs.symlinkJoin {
Expand Down
Loading