1
2
3
4
5
6
7
8
9
10
11
12
13
14
use miette::Result;
use mit_lint::Lints;

use crate::external::Vcs;
/// # Errors
///
/// Errors if writing to the VCS config fails
pub fn set_status(lints: Lints, vcs: &mut dyn Vcs, status: bool) -> Result<()> {
    lints
        .config_keys()
        .into_iter()
        .try_for_each(|lint| vcs.set_str(&lint, &status.to_string()))?;
    Ok(())
}