Skip to main content

EarlyLintPass

Trait EarlyLintPass 

pub trait EarlyLintPass<'ast>: Send + Sync {
Show 13 methods // Provided methods fn check_expr( &mut self, _ctx: &LintContext<'_, '_>, _expr: &'ast Expr<'ast>, ) { ... } fn check_item_struct( &mut self, _ctx: &LintContext<'_, '_>, _item: &'ast ItemStruct<'ast>, ) { ... } fn check_item_function( &mut self, _ctx: &LintContext<'_, '_>, _item: &'ast ItemFunction<'ast>, ) { ... } fn check_variable_definition( &mut self, _ctx: &LintContext<'_, '_>, _var: &'ast VariableDefinition<'ast>, ) { ... } fn check_import_directive( &mut self, _ctx: &LintContext<'_, '_>, _import: &'ast ImportDirective<'ast>, ) { ... } fn check_using_directive( &mut self, _ctx: &LintContext<'_, '_>, _using: &'ast UsingDirective<'ast>, ) { ... } fn check_item_contract( &mut self, _ctx: &LintContext<'_, '_>, _contract: &'ast ItemContract<'ast>, ) { ... } fn check_doc_comment( &mut self, _ctx: &LintContext<'_, '_>, _comment: &'ast DocComment<'ast>, ) { ... } fn check_item( &mut self, _ctx: &LintContext<'_, '_>, _item: &'ast Item<'ast>, ) { ... } fn check_stmt( &mut self, _ctx: &LintContext<'_, '_>, _stmt: &'ast Stmt<'ast>, ) { ... } fn check_path(&mut self, _ctx: &LintContext<'_, '_>, _path: &'ast PathSlice) { ... } fn check_ty(&mut self, _ctx: &LintContext<'_, '_>, _ty: &'ast Type<'ast>) { ... } fn check_full_source_unit( &mut self, _ctx: &LintContext<'ast, '_>, _ast: &'ast SourceUnit<'ast>, ) { ... }
}
Expand description

A lint pass that runs directly on the parsed AST.

Provided Methods§

fn check_expr(&mut self, _ctx: &LintContext<'_, '_>, _expr: &'ast Expr<'ast>)

fn check_item_struct( &mut self, _ctx: &LintContext<'_, '_>, _item: &'ast ItemStruct<'ast>, )

fn check_item_function( &mut self, _ctx: &LintContext<'_, '_>, _item: &'ast ItemFunction<'ast>, )

fn check_variable_definition( &mut self, _ctx: &LintContext<'_, '_>, _var: &'ast VariableDefinition<'ast>, )

fn check_import_directive( &mut self, _ctx: &LintContext<'_, '_>, _import: &'ast ImportDirective<'ast>, )

fn check_using_directive( &mut self, _ctx: &LintContext<'_, '_>, _using: &'ast UsingDirective<'ast>, )

fn check_item_contract( &mut self, _ctx: &LintContext<'_, '_>, _contract: &'ast ItemContract<'ast>, )

fn check_doc_comment( &mut self, _ctx: &LintContext<'_, '_>, _comment: &'ast DocComment<'ast>, )

fn check_item(&mut self, _ctx: &LintContext<'_, '_>, _item: &'ast Item<'ast>)

fn check_stmt(&mut self, _ctx: &LintContext<'_, '_>, _stmt: &'ast Stmt<'ast>)

fn check_path(&mut self, _ctx: &LintContext<'_, '_>, _path: &'ast PathSlice)

fn check_ty(&mut self, _ctx: &LintContext<'_, '_>, _ty: &'ast Type<'ast>)

fn check_full_source_unit( &mut self, _ctx: &LintContext<'ast, '_>, _ast: &'ast SourceUnit<'ast>, )

Runs after the complete source unit has been visited.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl<'ast, const FUNCTIONS: bool> EarlyLintPass<'ast> for MixedCasePass<FUNCTIONS>

Source§

impl<'ast> EarlyLintPass<'ast> for BooleanCst

Source§

impl<'ast> EarlyLintPass<'ast> for BooleanEqual

Source§

impl<'ast> EarlyLintPass<'ast> for CustomErrors

Source§

impl<'ast> EarlyLintPass<'ast> for DangerousUnaryOperator

Source§

impl<'ast> EarlyLintPass<'ast> for EmptyBlock

Source§

impl<'ast> EarlyLintPass<'ast> for EventFields

Source§

impl<'ast> EarlyLintPass<'ast> for Imports

Source§

impl<'ast> EarlyLintPass<'ast> for IncorrectShift

Source§

impl<'ast> EarlyLintPass<'ast> for InlineAssembly

Source§

impl<'ast> EarlyLintPass<'ast> for InterfaceFileNaming

Source§

impl<'ast> EarlyLintPass<'ast> for LowLevelCalls

Source§

impl<'ast> EarlyLintPass<'ast> for MultiContractFilePass

Source§

impl<'ast> EarlyLintPass<'ast> for PascalCaseStructPass

Source§

impl<'ast> EarlyLintPass<'ast> for Rtlo

Source§

impl<'ast> EarlyLintPass<'ast> for ScreamingSnakeCase

Source§

impl<'ast> EarlyLintPass<'ast> for TodoComment

Source§

impl<'ast> EarlyLintPass<'ast> for TooManyDigits

Source§

impl<'ast> EarlyLintPass<'ast> for TxOrigin

Source§

impl<'ast> EarlyLintPass<'ast> for UncheckedCall

Unchecked low-level calls appear as standalone expression statements, or with the success value discarded in a tuple. When the success value is checked (in require, if, etc.), the call is part of a larger expression and is not flagged.

Source§

impl<'ast> EarlyLintPass<'ast> for UnsafeCheatcodes