cartulary 0.3.0-alpha.1

The knowledge layer of your project — decisions, issues, docs, all in one place.
Documentation
//! [`IssueRule`] 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 multi_parent;
pub mod ordered_tag;
pub mod parent_of_cycle;
pub mod symmetric_links;
pub mod tag_descriptor;
pub mod terminal_parent_open_child;
pub mod unknown_link_target;

use crate::domain::usecases::check::IssueRule;

/// The set of issue rules that participate in `cartu check` / `cartu check --fix`.
pub fn issue_rules() -> Vec<Box<dyn IssueRule>> {
    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(multi_parent::MultiParentRule),
        Box::new(ordered_tag::OrderedTagRule),
        Box::new(parent_of_cycle::ParentOfCycleRule),
        Box::new(symmetric_links::SymmetricLinksRule),
        Box::new(tag_descriptor::TagDescriptorRule),
        Box::new(terminal_parent_open_child::TerminalParentOpenChildRule),
        Box::new(unknown_link_target::UnknownLinkTargetRule),
    ]
}