Skip to main content

Linter

Trait Linter 

Source
pub trait Linter: Send + Sync {
    type Language: Language;
    type Lint: Lint;

    // Required method
    fn lint(
        &self,
        input: &[PathBuf],
        deny: DenyLevel,
        compiler: &mut Compiler,
    ) -> Result<()>;
}
Expand description

Trait representing a linter for a language supported by Foundry.

Required Associated Types§

Source

type Language: Language

The target language.

Source

type Lint: Lint

The lint metadata type.

Required Methods§

Source

fn lint( &self, input: &[PathBuf], deny: DenyLevel, compiler: &mut Compiler, ) -> Result<()>

Runs all configured lints against an already parsed Solar compiler.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<'a> Linter for SolidityLinter<'a>

Source§

type Language = SolcLanguage

Source§

type Lint = SolLint