mdbook_lint_core/rules/standard/
md016.rs

1//! MD016: Gap in rule numbering
2//!
3//! This rule number never existed in markdownlint - it was a gap in the numbering sequence.
4//! It exists as a placeholder to maintain complete rule numbering.
5
6use crate::error::Result;
7use crate::rule::{Rule, RuleMetadata};
8use crate::{Document, violation::Violation};
9use comrak::nodes::AstNode;
10
11/// Placeholder for non-existent rule MD016
12pub struct MD016;
13
14impl Rule for MD016 {
15    fn id(&self) -> &'static str {
16        "MD016"
17    }
18
19    fn name(&self) -> &'static str {
20        "gap"
21    }
22
23    fn description(&self) -> &'static str {
24        "Gap in rule numbering (never existed)"
25    }
26
27    fn metadata(&self) -> RuleMetadata {
28        RuleMetadata::reserved("This rule number never existed in markdownlint numbering")
29            .introduced_in("mdbook-lint v0.1.0")
30    }
31
32    fn check_with_ast<'a>(
33        &self,
34        _document: &Document,
35        _ast: Option<&'a AstNode<'a>>,
36    ) -> Result<Vec<Violation>> {
37        // Gap rules never produce violations
38        Ok(vec![])
39    }
40}