Skip to main content

LateLintPass

Trait LateLintPass 

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

A lint pass that runs on Solar’s analyzed HIR.

Every hook receives the global context; the HIR is available as gcx.hir.

Provided Methods§

fn check_nested_source( &mut self, _ctx: &LintContext<'_, '_>, _gcx: Gcx<'gcx>, _id: SourceId, )

fn check_nested_item( &mut self, _ctx: &LintContext<'_, '_>, _gcx: Gcx<'gcx>, _id: ItemId, )

fn check_nested_contract( &mut self, _ctx: &LintContext<'_, '_>, _gcx: Gcx<'gcx>, _id: ContractId, )

fn check_nested_function( &mut self, _ctx: &LintContext<'_, '_>, _gcx: Gcx<'gcx>, _id: FunctionId, )

fn check_nested_var( &mut self, _ctx: &LintContext<'_, '_>, _gcx: Gcx<'gcx>, _id: VariableId, )

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

fn check_contract( &mut self, _ctx: &LintContext<'_, '_>, _gcx: Gcx<'gcx>, _contract: &'gcx Contract<'gcx>, )

fn check_function( &mut self, _ctx: &LintContext<'_, '_>, _gcx: Gcx<'gcx>, _function: &'gcx Function<'gcx>, )

fn check_modifier( &mut self, _ctx: &LintContext<'_, '_>, _gcx: Gcx<'gcx>, _modifier: &'gcx Modifier<'gcx>, )

fn check_var( &mut self, _ctx: &LintContext<'_, '_>, _gcx: Gcx<'gcx>, _var: &'gcx Variable<'gcx>, )

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

fn check_call_args( &mut self, _ctx: &LintContext<'_, '_>, _gcx: Gcx<'gcx>, _args: &'gcx CallArgs<'gcx>, )

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

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

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl<'gcx> LateLintPass<'gcx> for ArbitrarySendErc20

Source§

impl<'gcx> LateLintPass<'gcx> for ArbitrarySendEth

Source§

impl<'gcx> LateLintPass<'gcx> for AsmKeccak256

Source§

impl<'gcx> LateLintPass<'gcx> for AssertStateChange

Source§

impl<'gcx> LateLintPass<'gcx> for BlockTimestamp

Source§

impl<'gcx> LateLintPass<'gcx> for CacheArrayLength

Source§

impl<'gcx> LateLintPass<'gcx> for CallsLoop

Source§

impl<'gcx> LateLintPass<'gcx> for ControlledDelegatecall

Source§

impl<'gcx> LateLintPass<'gcx> for CostlyLoop

Source§

impl<'gcx> LateLintPass<'gcx> for CyclomaticComplexity

Source§

impl<'gcx> LateLintPass<'gcx> for DelegatecallLoop

Source§

impl<'gcx> LateLintPass<'gcx> for DeprecatedOzFunction

Source§

impl<'gcx> LateLintPass<'gcx> for DivideBeforeMultiply

Source§

impl<'gcx> LateLintPass<'gcx> for Ecrecover

Source§

impl<'gcx> LateLintPass<'gcx> for EncodedPackedCollision

Source§

impl<'gcx> LateLintPass<'gcx> for EnumerableLoopRemoval

Source§

impl<'gcx> LateLintPass<'gcx> for ExternalFunction

Source§

impl<'gcx> LateLintPass<'gcx> for FunctionInitState

Source§

impl<'gcx> LateLintPass<'gcx> for FunctionSelectorCollision

Source§

impl<'gcx> LateLintPass<'gcx> for IncorrectERC20Interface

Source§

impl<'gcx> LateLintPass<'gcx> for IncorrectERC721Interface

Source§

impl<'gcx> LateLintPass<'gcx> for IncorrectExp

Source§

impl<'gcx> LateLintPass<'gcx> for IncorrectModifier

Source§

impl<'gcx> LateLintPass<'gcx> for IncorrectStrictEquality

Source§

impl<'gcx> LateLintPass<'gcx> for IncorrectUsingFor

Source§

impl<'gcx> LateLintPass<'gcx> for LiteralInsteadOfConstant

Source§

impl<'gcx> LateLintPass<'gcx> for LockedEther

Source§

impl<'gcx> LateLintPass<'gcx> for MappingDeletion

Source§

impl<'gcx> LateLintPass<'gcx> for MissingEventsAccessControl

Source§

impl<'gcx> LateLintPass<'gcx> for MissingEventsArithmetic

Source§

impl<'gcx> LateLintPass<'gcx> for MissingZeroCheck

Source§

impl<'gcx> LateLintPass<'gcx> for MsgValueLoop

Source§

impl<'gcx> LateLintPass<'gcx> for NamedStructFields

Source§

impl<'gcx> LateLintPass<'gcx> for NonReentrantNotFirst

Source§

impl<'gcx> LateLintPass<'gcx> for ProtectedVars

Source§

impl<'gcx> LateLintPass<'gcx> for RedundantBaseConstructorCall

Source§

impl<'gcx> LateLintPass<'gcx> for ReentrancyEth

Source§

impl<'gcx> LateLintPass<'gcx> for ReentrancyEvents

Source§

impl<'gcx> LateLintPass<'gcx> for RequireRevertInLoop

Source§

impl<'gcx> LateLintPass<'gcx> for ReturnBomb

Source§

impl<'gcx> LateLintPass<'gcx> for SolmateSafeTransferLib

Source§

impl<'gcx> LateLintPass<'gcx> for TautologicalCompare

Source§

impl<'gcx> LateLintPass<'gcx> for TypeBasedTautology

Source§

impl<'gcx> LateLintPass<'gcx> for UnchangedStateVariables

Source§

impl<'gcx> LateLintPass<'gcx> 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<'gcx> LateLintPass<'gcx> for UninitializedLocal

Source§

impl<'gcx> LateLintPass<'gcx> for UninitializedStateVariables

Source§

impl<'gcx> LateLintPass<'gcx> for UnprotectedInitializer

Source§

impl<'gcx> LateLintPass<'gcx> for UnsafeOzErc721Mint

Source§

impl<'gcx> LateLintPass<'gcx> for UnsafeTypecast

Source§

impl<'gcx> LateLintPass<'gcx> for UnusedReturn

Source§

impl<'gcx> LateLintPass<'gcx> for UnusedStateVariables

Source§

impl<'gcx> LateLintPass<'gcx> for UnwrappedModifierLogic

Source§

impl<'gcx> LateLintPass<'gcx> for VarReadUsingThis

Source§

impl<'gcx> LateLintPass<'gcx> for WeakPrng

Source§

impl<'gcx> LateLintPass<'gcx> for WriteAfterWrite