pub struct FixCoordinator { /* private fields */ }Expand description
Coordinates rule fixing to minimize the number of passes needed
Implementations§
Source§impl FixCoordinator
impl FixCoordinator
pub fn new() -> Self
Sourcepub fn get_optimal_order<'a>(
&self,
rules: &'a [Box<dyn Rule>],
) -> Vec<&'a dyn Rule>
pub fn get_optimal_order<'a>( &self, rules: &'a [Box<dyn Rule>], ) -> Vec<&'a dyn Rule>
Get the optimal order for running rules based on dependencies
Sourcepub fn apply_fixes_iterative(
&self,
rules: &[Box<dyn Rule>],
_all_warnings: &[LintWarning],
content: &mut String,
config: &Config,
max_iterations: usize,
) -> Result<FixResult, String>
pub fn apply_fixes_iterative( &self, rules: &[Box<dyn Rule>], _all_warnings: &[LintWarning], content: &mut String, config: &Config, max_iterations: usize, ) -> Result<FixResult, String>
Apply fixes iteratively until no more fixes are needed or max iterations reached.
This implements a Ruff-inspired fix loop that re-checks ALL rules after each fix to detect cascading issues (e.g., MD046 creating code blocks that MD040 needs to fix).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FixCoordinator
impl RefUnwindSafe for FixCoordinator
impl Send for FixCoordinator
impl Sync for FixCoordinator
impl Unpin for FixCoordinator
impl UnwindSafe for FixCoordinator
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> 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