pub struct InlineConfig { /* private fields */ }Implementations§
Source§impl InlineConfig
impl InlineConfig
pub fn new() -> Self
Sourcepub fn from_content(content: &str) -> Self
pub fn from_content(content: &str) -> Self
Process all inline comments in the content and return the configuration state
Sourcepub fn from_content_with_code_blocks(
content: &str,
code_blocks: &[(usize, usize)],
) -> Self
pub fn from_content_with_code_blocks( content: &str, code_blocks: &[(usize, usize)], ) -> Self
Process all inline comments in the content with precomputed code blocks.
Sourcepub fn is_rule_disabled(&self, rule_name: &str, line_number: usize) -> bool
pub fn is_rule_disabled(&self, rule_name: &str, line_number: usize) -> bool
Check if a rule is disabled at a specific line
Sourcepub fn get_disabled_rules(&self, line_number: usize) -> HashSet<String>
pub fn get_disabled_rules(&self, line_number: usize) -> HashSet<String>
Get all disabled rules at a specific line
Sourcepub fn get_rule_config(&self, rule_name: &str) -> Option<&JsonValue>
pub fn get_rule_config(&self, rule_name: &str) -> Option<&JsonValue>
Get configuration overrides for a specific rule from configure-file comments
Sourcepub fn get_all_rule_configs(&self) -> &HashMap<String, JsonValue>
pub fn get_all_rule_configs(&self) -> &HashMap<String, JsonValue>
Get all configuration overrides from configure-file comments
Sourcepub fn export_for_file_index(
&self,
) -> (HashSet<String>, HashMap<usize, HashSet<String>>)
pub fn export_for_file_index( &self, ) -> (HashSet<String>, HashMap<usize, HashSet<String>>)
Export the disabled rules data for storage in FileIndex
Returns (file_disabled_rules, line_disabled_rules) for use in cross-file checks. Merges both persistent disables and line-specific disables into a single map.
Trait Implementations§
Source§impl Clone for InlineConfig
impl Clone for InlineConfig
Source§fn clone(&self) -> InlineConfig
fn clone(&self) -> InlineConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for InlineConfig
impl Debug for InlineConfig
Auto Trait Implementations§
impl Freeze for InlineConfig
impl RefUnwindSafe for InlineConfig
impl Send for InlineConfig
impl Sync for InlineConfig
impl Unpin for InlineConfig
impl UnwindSafe for InlineConfig
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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