Skip to content
Merged
Show file tree
Hide file tree
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
4 changes: 4 additions & 0 deletions docs/quality.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,10 @@ cargo install knots --version 1.16.0 --locked --root .work/tools
KNOTS_BIN=.work/tools/bin/knots scripts/crap-report.sh
```

`cargo-llvm-cov` also needs the `llvm-tools-preview` toolchain component. The
`nix develop` shell includes it. With rustup, run
`rustup component add llvm-tools-preview` once. CI does not install it.

The script builds an instrumented binary and runs the whole test suite, which
takes several minutes, and writes `crap.md` and `crap.json` below
`target/crap/`. CI does not run it. Add meaningful tests or simplify risky code. Never game the score
Expand Down
7 changes: 6 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,12 @@
inherit system;
overlays = [ rust-overlay.overlays.default ];
};
rust = pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml;
# The pinned toolchain, plus llvm-tools for `scripts/crap-report.sh`. CI and
# rustup users install only the components in rust-toolchain.toml.
toolchain = (builtins.fromTOML (builtins.readFile ./rust-toolchain.toml)).toolchain;
rust = pkgs.rust-bin.fromRustupToolchain (toolchain // {
components = toolchain.components ++ [ "llvm-tools-preview" ];
});
in {
default = pkgs.mkShell {
packages = [
Expand Down
Loading