From d6449a13f4610ee7b67bf07ffa7feb68fd181966 Mon Sep 17 00:00:00 2001 From: Dandaedre Date: Mon, 10 Mar 2025 15:21:58 -0500 Subject: [PATCH] Updates readme --- README.md | 16 ++++++++++++++-- src/main.rs | 5 +++++ 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b239e9d..660082f 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,6 @@ # rust_autobadges ![code coverage](badges/coverage.svg) ![version](badges/version.svg) ![code coverage](badges/test.svg) - -Automatically create a folder badges/ with the generated coverage.svg, test.svg and version.svg +Runs cargo-tarpaulin to generate coverage and automatically create a badges/ folder with the generated coverage.svg, test.svg and version.svg # Usage @@ -40,3 +39,16 @@ Options: -V, --version Print version ``` + +# Future Features + * Only run tests + * Clean the badges folder + * Have a better indication of the actions of tarpaulin run + * (optionnal) Save info of the previous run to allow a progress bar + +# TODO + * Better error handling + * Structs to allow centralisation of pb/error handling/.close() + * Better alignment + * (consideration) A config file to avoid passing so many arguments and have a better CI + * Having a coverage above 0% ? (even if testing something that runs tests require some smart) diff --git a/src/main.rs b/src/main.rs index 86cfbd4..02fe132 100644 --- a/src/main.rs +++ b/src/main.rs @@ -96,6 +96,7 @@ fn main() -> anyhow::Result<()> { match (args.no_coverage, args.no_test) { (true, true) => (), (true, false) => { + unimplemented!("Please run with tarpaulin") // run_tests_only(&sh, pb_model.clone(), &args)?; } (false, true) => run_coverage(&sh, new_progress_bar(), &args)?, // The coverage know wether to write the badge test with the cli args @@ -106,6 +107,10 @@ fn main() -> anyhow::Result<()> { } /// Run the coverage functions +// FORMAT: Compiling strsim v0.11.1 +// FORMAT: Finished `test` profile [unoptimized + debuginfo] target(s) in 6.87s +// FORMAT: 2025-03-10T20:00:03.543721Z INFO cargo_tarpaulin::process_handling::linux: Launching test +// FORMAT: 2025-03-10T20:00:08.030646Z INFO cargo_tarpaulin::report: Coverage Results: // #[coverage(off)] // No real coverage can be done as it would recurse indefinitely fn run_coverage(_sh: &Shell, pb: ProgressBar, args: &CLIArgs) -> Result<(), anyhow::Error> { let started = Instant::now();