cartulary 0.3.0-alpha.1

The knowledge layer of your project — decisions, issues, docs, all in one place.
Documentation
//! [`DecisionRecordRule`] implementations. Phase 1 ships the
//! symmetric-links rule (the only one with a repair); phase 2 will
//! migrate the remaining inline validations.

pub mod configured_prefix;
pub mod duplicate_id;
pub mod event_log_integrity;
pub mod id_matches_directory;
pub mod symmetric_links;
pub mod tag_descriptor;
pub mod unknown_link_target;

use crate::domain::usecases::check::DecisionRecordRule;

/// The set of DR rules that participate in `cartu check` / `cartu check --fix`.
pub fn dr_rules() -> Vec<Box<dyn DecisionRecordRule>> {
    vec![
        Box::new(configured_prefix::ConfiguredPrefixRule),
        Box::new(duplicate_id::DuplicateIdRule),
        Box::new(event_log_integrity::EventLogIntegrityRule),
        Box::new(id_matches_directory::IdMatchesDirectoryRule),
        Box::new(symmetric_links::SymmetricLinksRule),
        Box::new(tag_descriptor::TagDescriptorRule),
        Box::new(unknown_link_target::UnknownLinkTargetRule),
    ]
}