build: mark untestable function to be excluded from mutation tests
All checks were successful
Test / checks (map[name:nightly]) (push) Successful in 2m7s
Test / checks (map[name:stable]) (push) Successful in 1m57s

This commit is contained in:
Paul Campbell 2024-11-28 17:31:08 +00:00
parent a09f95c019
commit 748cc15ea2
3 changed files with 4 additions and 0 deletions

View file

@ -22,5 +22,7 @@ assert2 = "0.3"
pretty_assertions = "1.4"
rstest = "0.23"
mutants = "0.0"
[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(tarpaulin_include)'] }

View file

@ -17,6 +17,7 @@ mod tests;
#[tokio::main]
#[cfg(not(tarpaulin_include))]
#[cfg_attr(test, mutants::skip)]
async fn main() -> std::result::Result<(), Box<dyn std::error::Error>> {
let github_workspace = std::env::var("GITHUB_WORKSPACE").context("GITHUB_WORKSPACE")?;
let fs = kxio::fs::new(github_workspace);

View file

@ -6,6 +6,7 @@ pub trait Printer {
pub struct StandardPrinter;
impl Printer for StandardPrinter {
#[cfg(not(tarpaulin_include))]
#[cfg_attr(test, mutants::skip)]
fn println(&self, message: impl Into<String>) {
println!("{}", message.into());
}