pub struct Linter { /* private fields */ }Expand description
The SQL linter, holding a set of rules and configuration.
Implementations§
Source§impl Linter
impl Linter
Sourcepub fn new(config: LintConfig) -> Self
pub fn new(config: LintConfig) -> Self
Creates a new linter with the given configuration.
Sourcepub fn is_enabled(&self) -> bool
pub fn is_enabled(&self) -> bool
Returns true if linting is enabled.
Sourcepub fn check_document(&self, document: &LintDocument<'_>) -> Vec<Issue>
pub fn check_document(&self, document: &LintDocument<'_>) -> Vec<Issue>
Checks a full lint document across semantic, lexical, and document engines.
Sourcepub fn check_statement(
&self,
stmt: &Statement,
ctx: &LintContext<'_>,
) -> Vec<Issue>
pub fn check_statement( &self, stmt: &Statement, ctx: &LintContext<'_>, ) -> Vec<Issue>
Checks a single statement against all enabled lint rules.
This adapter is kept for tests and rule-level helpers. Production paths
should prefer check_document().
Auto Trait Implementations§
impl Freeze for Linter
impl !RefUnwindSafe for Linter
impl Send for Linter
impl Sync for Linter
impl Unpin for Linter
impl UnsafeUnpin for Linter
impl !UnwindSafe for Linter
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