shakrs-json-parser 0.1.0

Parser, validator, scaffolder, and canonical formatter for the shakrs.json workspace config. Zero I/O; no policy-registry knowledge.
Documentation
//! Runtime defaults for config document types.

use std::collections::BTreeMap;

use crate::types::{PoliciesSection, ShakrsConfig};

/// Serde default for [`PoliciesSection::default_enabled`].
pub const fn default_true() -> bool {
    true
}

impl Default for ShakrsConfig {
    fn default() -> Self {
        Self {
            version: 1,
            policies: PoliciesSection::default(),
            waivers: Vec::new(),
        }
    }
}

impl Default for PoliciesSection {
    fn default() -> Self {
        Self {
            default_enabled: true,
            overrides: BTreeMap::new(),
        }
    }
}