Expand description
Shared markdown file discovery semantics.
The CLI walker (file_processor::discovery in the binary crate) and the
LSP workspace index scanner answer the same question: which files does
rumdl process here? The pieces of that answer that must never diverge
live in this module:
- the markdown extension set and how it is matched,
- the final source-kind gate for each adapter’s capabilities,
- how ignore-file handling (
.gitignore,.markdownlintignore, hidden entries) is configured on a walker, - how
excludepatterns from config are expanded and matched.
Callers still differ deliberately: the LSP skips .git/node_modules/
target outright as an editor-performance safety net, while the CLI
walks whatever gitignore semantics allow.
Structs§
- Exclude
Matchers - Compiled
excludepatterns with directory-pattern expansion applied. - Explicit
Include Matchers - Compiled matchers for the explicitly-named files in a set of config
includepatterns (seeexplicit_file_name_glob). - Lintable
Path Selector - The shared final gate for files yielded by CLI and LSP discovery walks.
- Markdown
Walk Options - Ignore-handling options applied to a markdown discovery walk.
- Markdown
Workspace Scan - A complete, configured Markdown workspace scan.
- Path
Aliases - Alternative spellings of a path, implied by the absolute patterns in a configuration.
Enums§
- Lintable
File Mode - Source kinds an adapter can interpret after a path passes include matching.
Constants§
- MARKDOWN_
EXTENSIONS - File extensions rumdl treats as markdown, lowercase.
Functions§
- any_
case_ extension_ glob - A glob selecting
extin any letter case, as*.[mM][dD]formd. - apply_
markdown_ walk_ options - Apply the shared ignore-handling configuration to a walker over
roots. - canonicalize_
for_ matching - Canonicalize
pathfor pattern matching, orNonewhen it cannot be resolved (a missing or unreadable file). - exclude_
override_ rule - The
ignoreoverride rule that excludespattern. - exclude_
pattern_ compiles - Whether every glob an
excludepattern turns into compiles. - expand_
directory_ pattern - Expands directory-style patterns to also match files within them.
Pattern “dir/path” becomes [“dir/path”, “dir/path/**”] to match both
the directory itself and all contents recursively. A leading
~is expanded first (seeexpand_home_prefix). - expand_
home_ prefix - Expand a leading
~in a path pattern to the user’s home directory, so a user-level config (~/.config/rumdl/rumdl.toml) can name a home path without hardcoding a username. - explicit_
file_ name_ glob - The file-name glob of an
includepattern that explicitly names files, if it does. - has_
absolute_ spelling - Whether
patternnames an absolute location in any of its spellings. - has_
markdown_ extension - Whether
pathhas a markdown extension. - include_
pattern_ compiles - Whether an
includepattern compiles as a walker override. - is_
absolute_ pattern - Whether
patternnames an absolute location. A leading/counts on every platform: patterns use/separators, so a Unix-style path stays absolute when the same config is read on Windows. - is_
markdown_ extension - Whether
extis a markdown extension. Matches case-insensitively so conventional variants likeRmd(and shouting-caseMD) qualify. - markdown_
walk_ builder - Build a walker over
rootconfigured with the shared options. - normalize_
pattern_ for_ base - Normalize a config path pattern for matching against paths discovered under
base: expand a leading~, then rewrite an absolute pattern as one relative tobasewhenbasecontains it. - path_
relative_ to - Relativize
pathagainstbasefor exclude-pattern matching, canonicalizing both sides so symlinks (e.g. macOS/tmp) and Windows path-representation differences don’t defeat the prefix strip. ReturnsNonewhenpathis not underbase. - stops_
at_ repository_ root - Whether a walk over
rootsstops reading gitignores at the repository root.