Struct sqruff_lib::core::linter::linted_file::LintedFile
source · pub struct LintedFile {
pub path: String,
pub patches: Vec<FixPatch>,
pub templated_file: TemplatedFile,
pub violations: Vec<SQLBaseError>,
}Fields§
§path: String§patches: Vec<FixPatch>§templated_file: TemplatedFile§violations: Vec<SQLBaseError>Implementations§
source§impl LintedFile
impl LintedFile
pub fn get_violations(&self, fixable: Option<bool>) -> Vec<SQLBaseError>
sourcepub fn build_up_fixed_source_string(
source_file_slices: &[Range<usize>],
source_patches: &[FixPatch],
raw_source_string: &str,
) -> String
pub fn build_up_fixed_source_string( source_file_slices: &[Range<usize>], source_patches: &[FixPatch], raw_source_string: &str, ) -> String
Use patches and raw file to fix the source file.
This assumes that patches and slices have already been coordinated. If they haven’t then this will fail because we rely on patches having a corresponding slice of exactly the right file in the list of file slices.
pub fn fix_string(self) -> String
Trait Implementations§
source§impl Debug for LintedFile
impl Debug for LintedFile
source§impl Default for LintedFile
impl Default for LintedFile
source§fn default() -> LintedFile
fn default() -> LintedFile
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for LintedFile
impl !RefUnwindSafe for LintedFile
impl Send for LintedFile
impl Sync for LintedFile
impl Unpin for LintedFile
impl !UnwindSafe for LintedFile
Blanket Implementations§
source§impl<T> AsAnyMut for Twhere
T: Any,
impl<T> AsAnyMut for Twhere
T: Any,
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
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