pub struct LintOptions {
pub files: Vec<String>,
pub strings: HashMap<String, String>,
pub config: Option<Config>,
pub config_file: Option<String>,
pub custom_rules: Vec<BoxedRule>,
pub front_matter: Option<String>,
pub no_inline_config: bool,
pub result_version: u32,
pub handle_rule_failures: bool,
}Expand description
Options for linting markdown content
Fields§
§files: Vec<String>Files to lint (paths)
strings: HashMap<String, String>Strings to lint (keyed by identifier)
config: Option<Config>Configuration object
config_file: Option<String>Path to configuration file
custom_rules: Vec<BoxedRule>Custom rules to use
front_matter: Option<String>Front matter pattern (regex)
no_inline_config: boolWhether to ignore inline configuration
result_version: u32Result version for backward compatibility
handle_rule_failures: boolHandle errors during rule execution
Implementations§
Source§impl LintOptions
impl LintOptions
Sourcepub fn with_files(
self,
files: impl IntoIterator<Item = impl Into<String>>,
) -> Self
pub fn with_files( self, files: impl IntoIterator<Item = impl Into<String>>, ) -> Self
Add multiple files to lint
Sourcepub fn with_string(
self,
name: impl Into<String>,
content: impl Into<String>,
) -> Self
pub fn with_string( self, name: impl Into<String>, content: impl Into<String>, ) -> Self
Add a string to lint
Sourcepub fn with_config(self, config: Config) -> Self
pub fn with_config(self, config: Config) -> Self
Set the configuration
Sourcepub fn with_config_file(self, path: impl Into<String>) -> Self
pub fn with_config_file(self, path: impl Into<String>) -> Self
Set the configuration file path
Sourcepub fn with_custom_rule(self, rule: BoxedRule) -> Self
pub fn with_custom_rule(self, rule: BoxedRule) -> Self
Add a custom rule
Sourcepub fn with_front_matter(self, pattern: impl Into<String>) -> Self
pub fn with_front_matter(self, pattern: impl Into<String>) -> Self
Set the front matter pattern
Sourcepub fn no_inline_config(self) -> Self
pub fn no_inline_config(self) -> Self
Disable inline configuration
Trait Implementations§
Source§impl Default for LintOptions
impl Default for LintOptions
Source§fn default() -> LintOptions
fn default() -> LintOptions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for LintOptions
impl !RefUnwindSafe for LintOptions
impl Send for LintOptions
impl Sync for LintOptions
impl Unpin for LintOptions
impl UnsafeUnpin for LintOptions
impl !UnwindSafe for LintOptions
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more