From b1a97f90f672dbbd7d32cc77498b4d1c7520ddbf Mon Sep 17 00:00:00 2001 From: Eval EXEC Date: Sat, 25 Nov 2023 12:23:13 +0800 Subject: [PATCH] Drop `cargo-count` in `make stats`, replace it by `tokei` Signed-off-by: Eval EXEC --- Makefile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 32b03bbc36..99d3d2bbe7 100644 --- a/Makefile +++ b/Makefile @@ -261,8 +261,11 @@ clean-node-files: ## Clean files generated by `ckb init` ##@ Helpers .PHONY: stats stats: ## Counting lines of code. - @cargo count --version || cargo +nightly-2022-03-22 install --git https://github.com/kbknapp/cargo-count - @cargo count --separator , --unsafe-statistics + @command -v tokei || cargo install tokei + @tokei + # count lines of unsafe code + # =============================================================================== + @rg --no-heading unsafe --count-matches | sed 's/:/\ /g' | column -t .PHONY: help help: ## Display help message.