pub struct MDBOOK005 { /* private fields */ }Expand description
MDBOOK005: Detect orphaned markdown files not referenced in SUMMARY.md
This rule checks for markdown files in the project that are not referenced in SUMMARY.md. Such files are “orphaned” and won’t be included in the generated book, which may indicate:
- Incomplete documentation structure
- Forgotten content that should be added to the book
- Old files that should be removed
The rule:
- Only runs on SUMMARY.md files
- Parses all chapter references in SUMMARY.md
- Scans for .md and .markdown files in the project directory
- Reports files that exist but aren’t referenced
- Ignores common files like README.md by default
- Supports configuration for custom ignore patterns
Implementations§
Source§impl MDBOOK005
impl MDBOOK005
Sourcepub fn with_ignored_files(additional_ignored: Vec<String>) -> Self
pub fn with_ignored_files(additional_ignored: Vec<String>) -> Self
Create a new instance with custom ignored files (in addition to defaults)
Sourcepub fn ignore_file(&mut self, filename: &str)
pub fn ignore_file(&mut self, filename: &str)
Add a file to the ignore list
Trait Implementations§
Source§impl Rule for MDBOOK005
impl Rule for MDBOOK005
Source§fn description(&self) -> &'static str
fn description(&self) -> &'static str
Description of what the rule checks
Source§fn metadata(&self) -> RuleMetadata
fn metadata(&self) -> RuleMetadata
Metadata about this rule’s status and properties
Source§fn check_with_ast<'a>(
&self,
document: &Document,
_ast: Option<&'a AstNode<'a>>,
) -> Result<Vec<Violation>>
fn check_with_ast<'a>( &self, document: &Document, _ast: Option<&'a AstNode<'a>>, ) -> Result<Vec<Violation>>
Check a document for violations of this rule with optional pre-parsed AST
Source§fn check(&self, document: &Document) -> Result<Vec<Violation>>
fn check(&self, document: &Document) -> Result<Vec<Violation>>
Check a document for violations of this rule (backward compatibility)
Auto Trait Implementations§
impl Freeze for MDBOOK005
impl RefUnwindSafe for MDBOOK005
impl Send for MDBOOK005
impl Sync for MDBOOK005
impl Unpin for MDBOOK005
impl UnwindSafe for MDBOOK005
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more