Trait Linter

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

    // Required method
    fn lint(&self, input: &[PathBuf]);
}
Expand description

Trait representing a generic linter for analyzing and reporting issues in smart contract source code files. A linter can be implemented for any smart contract language supported by Foundry.

§Type Parameters

  • Language: Represents the target programming language. Must implement the [Language] trait.
  • Lint: Represents the types of lints performed by the linter. Must implement the Lint trait.

§Required Methods

  • lint: Scans the provided source files emitting a daignostic for lints found.

Required Associated Types§

Source

type Language: Language

Source

type Lint: Lint

Required Methods§

Source

fn lint(&self, input: &[PathBuf])

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§