Updates readme

This commit is contained in:
Dandaedre 2025-03-10 15:21:58 -05:00
parent c71754589c
commit d6449a13f4
2 changed files with 19 additions and 2 deletions

View File

@ -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)

View File

@ -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();