Compare commits

..

10 Commits

3 changed files with 25 additions and 1 deletions

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
/target
result/
*.json
tarpaulin-report.*

23
Makefile Normal file
View File

@ -0,0 +1,23 @@
rwildcard=$(foreach d,$(wildcard $(1:=/*)),$(call rwildcard,$d,$2) $(filter $(subst *,%,$2),$d))
rust_files=$(call rwildcard,src,*.rs)
test: $(rust-files)
cargo test
build: $(rust-files)
cargo build
tarpaulin-report.%: $(rust_files)
cargo tarpaulin --skip-clean --test --out $*
cover: tarpaulin-report.html
view-cover: tarpaulin-report.html
open $<
clean-tarpaulin:
rm -f tarpaulin-report.*
clean: clean-tarpaulin
cargo clean

View File

@ -37,7 +37,7 @@
rust-bin = pkgs.rust-bin;
devShells.default = pkgs.mkShell {
nativeBuildInputs = with pkgs; [ gnumake my-rust-bin rust-analyzer ];
nativeBuildInputs = with pkgs; [ gnumake my-rust-bin rust-analyzer cargo-tarpaulin ];
};
});
}