Struct sqruff_lib::core::linter::linted_file::LintedFile
source · pub struct LintedFile {
pub path: String,
pub tree: ErasedSegment,
pub templated_file: TemplatedFile,
pub violations: Vec<SQLLintError>,
}
Fields§
§path: String
§tree: ErasedSegment
§templated_file: TemplatedFile
§violations: Vec<SQLLintError>
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§
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> 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