Skip to main content

LateLintPass

Trait LateLintPass 

Source
pub trait LateLintPass<'hir>: Send + Sync {
Show 15 methods // Provided methods fn check_nested_source( &mut self, _ctx: &LintContext<'_, '_>, _hir: &'hir Hir<'hir>, _id: SourceId, ) { ... } fn check_nested_item( &mut self, _ctx: &LintContext<'_, '_>, _hir: &'hir Hir<'hir>, _id: ItemId, ) { ... } fn check_nested_contract( &mut self, _ctx: &LintContext<'_, '_>, _hir: &'hir Hir<'hir>, _id: ContractId, ) { ... } fn check_nested_function( &mut self, _ctx: &LintContext<'_, '_>, _hir: &'hir Hir<'hir>, _id: FunctionId, ) { ... } fn check_nested_var( &mut self, _ctx: &LintContext<'_, '_>, _hir: &'hir Hir<'hir>, _id: VariableId, ) { ... } fn check_item( &mut self, _ctx: &LintContext<'_, '_>, _hir: &'hir Hir<'hir>, _item: Item<'hir, 'hir>, ) { ... } fn check_contract( &mut self, _ctx: &LintContext<'_, '_>, _hir: &'hir Hir<'hir>, _contract: &'hir Contract<'hir>, ) { ... } fn check_function( &mut self, _ctx: &LintContext<'_, '_>, _hir: &'hir Hir<'hir>, _func: &'hir Function<'hir>, ) { ... } fn check_function_with_gcx( &mut self, ctx: &LintContext<'_, '_>, _gcx: Gcx<'hir>, hir: &'hir Hir<'hir>, func: &'hir Function<'hir>, ) { ... } fn check_modifier( &mut self, _ctx: &LintContext<'_, '_>, _hir: &'hir Hir<'hir>, _mod: &'hir Modifier<'hir>, ) { ... } fn check_var( &mut self, _ctx: &LintContext<'_, '_>, _hir: &'hir Hir<'hir>, _var: &'hir Variable<'hir>, ) { ... } fn check_expr( &mut self, _ctx: &LintContext<'_, '_>, _hir: &'hir Hir<'hir>, _expr: &'hir Expr<'hir>, ) { ... } fn check_call_args( &mut self, _ctx: &LintContext<'_, '_>, _hir: &'hir Hir<'hir>, _args: &'hir CallArgs<'hir>, ) { ... } fn check_stmt( &mut self, _ctx: &LintContext<'_, '_>, _hir: &'hir Hir<'hir>, _stmt: &'hir Stmt<'hir>, ) { ... } fn check_ty( &mut self, _ctx: &LintContext<'_, '_>, _hir: &'hir Hir<'hir>, _ty: &'hir Type<'hir>, ) { ... }
}
Expand description

Trait for lints that operate on the HIR (High-level Intermediate Representation). Its methods mirror hir::visit::Visit, with the addition of LintContext.

Provided Methods§

Source

fn check_nested_source( &mut self, _ctx: &LintContext<'_, '_>, _hir: &'hir Hir<'hir>, _id: SourceId, )

Source

fn check_nested_item( &mut self, _ctx: &LintContext<'_, '_>, _hir: &'hir Hir<'hir>, _id: ItemId, )

Source

fn check_nested_contract( &mut self, _ctx: &LintContext<'_, '_>, _hir: &'hir Hir<'hir>, _id: ContractId, )

Source

fn check_nested_function( &mut self, _ctx: &LintContext<'_, '_>, _hir: &'hir Hir<'hir>, _id: FunctionId, )

Source

fn check_nested_var( &mut self, _ctx: &LintContext<'_, '_>, _hir: &'hir Hir<'hir>, _id: VariableId, )

Source

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

Source

fn check_contract( &mut self, _ctx: &LintContext<'_, '_>, _hir: &'hir Hir<'hir>, _contract: &'hir Contract<'hir>, )

Source

fn check_function( &mut self, _ctx: &LintContext<'_, '_>, _hir: &'hir Hir<'hir>, _func: &'hir Function<'hir>, )

Source

fn check_function_with_gcx( &mut self, ctx: &LintContext<'_, '_>, _gcx: Gcx<'hir>, hir: &'hir Hir<'hir>, func: &'hir Function<'hir>, )

Source

fn check_modifier( &mut self, _ctx: &LintContext<'_, '_>, _hir: &'hir Hir<'hir>, _mod: &'hir Modifier<'hir>, )

Source

fn check_var( &mut self, _ctx: &LintContext<'_, '_>, _hir: &'hir Hir<'hir>, _var: &'hir Variable<'hir>, )

Source

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

Source

fn check_call_args( &mut self, _ctx: &LintContext<'_, '_>, _hir: &'hir Hir<'hir>, _args: &'hir CallArgs<'hir>, )

Source

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

Source

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

Implementors§

Source§

impl<'hir> LateLintPass<'hir> for UnwrappedModifierLogic

Source§

impl<'hir> LateLintPass<'hir> for AsmKeccak256

Source§

impl<'hir> LateLintPass<'hir> for CacheArrayLength

Source§

impl<'hir> LateLintPass<'hir> for CostlyLoop

Source§

impl<'hir> LateLintPass<'hir> for ExternalFunction

Source§

impl<'hir> LateLintPass<'hir> for UnchangedStateVariables

Source§

impl<'hir> LateLintPass<'hir> for UnusedStateVariables

Source§

impl<'hir> LateLintPass<'hir> for VarReadUsingThis

Source§

impl<'hir> LateLintPass<'hir> for ReentrancyUnlimitedGas

Source§

impl<'hir> LateLintPass<'hir> for UncheckedTransferERC20

Checks that calls to functions with the same signature as the ERC20 transfer methods, and which return a boolean are not ignored.

WARN: can issue false positives, as it doesn’t check that the contract being called sticks to the full ERC20 specification.

Source§

impl<'hir> LateLintPass<'hir> for NamedStructFields

Source§

impl<'hir> LateLintPass<'hir> for RedundantBaseConstructorCall

Source§

impl<'hir> LateLintPass<'hir> for CallsLoop

Source§

impl<'hir> LateLintPass<'hir> for DelegatecallLoop

Source§

impl<'hir> LateLintPass<'hir> for MissingZeroCheck

Source§

impl<'hir> LateLintPass<'hir> for ReturnBomb

Source§

impl<'hir> LateLintPass<'hir> for IncorrectERC20Interface

Source§

impl<'hir> LateLintPass<'hir> for IncorrectERC721Interface

Source§

impl<'hir> LateLintPass<'hir> for IncorrectStrictEquality

Source§

impl<'hir> LateLintPass<'hir> for TypeBasedTautology

Source§

impl<'hir> LateLintPass<'hir> for UninitializedLocal

Source§

impl<'hir> LateLintPass<'hir> for UnsafeTypecast

Source§

impl<'hir> LateLintPass<'hir> for UnusedReturn