#![cfg_attr(coverage_nightly, coverage(off))]
use crate::docs_enforcement::generic_detector::is_generic_description;
use anyhow::Result;
use std::collections::HashSet;
use std::process::Command;
#[derive(Debug, Clone)]
pub struct CliDocumentationReport {
pub command: String,
pub has_help: bool,
pub has_usage_section: bool,
pub has_options_section: bool,
pub has_examples_section: bool,
pub documented_flags: Vec<String>,
pub generic_descriptions: Vec<String>,
pub missing_descriptions: Vec<String>,
pub issues: Vec<String>,
}
impl CliDocumentationReport {
#[provable_contracts_macros::contract("pmat-core.yaml", equation = "check_compliance")]
pub fn is_valid(&self) -> bool {
self.has_help
&& self.has_usage_section
&& self.has_options_section
&& self.generic_descriptions.is_empty()
&& self.missing_descriptions.is_empty()
}
}
include!("cli_checker_validation.rs");
include!("cli_checker_parsing.rs");
include!("cli_checker_tests.rs");