pub struct Linter { /* private fields */ }Expand description
The linter engine
Implementations§
Source§impl Linter
impl Linter
Sourcepub fn new(config: &LintConfig) -> Result<Self, String>
pub fn new(config: &LintConfig) -> Result<Self, String>
Create a new linter with the given configuration
Sourcepub fn with_defaults() -> Result<Self, String>
pub fn with_defaults() -> Result<Self, String>
Create a linter with default configuration
Sourcepub fn lint_program(
&self,
program: &Program,
file: &Path,
) -> Vec<LintDiagnostic>
pub fn lint_program( &self, program: &Program, file: &Path, ) -> Vec<LintDiagnostic>
Lint a program and return all diagnostics
Auto Trait Implementations§
impl Freeze for Linter
impl RefUnwindSafe for Linter
impl Send for Linter
impl Sync for Linter
impl Unpin 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