Skip to main content

forge_lint/sol/med/
mod.rs

1use crate::sol::SolLint;
2
3mod assert_state_change;
4mod cheatcode_environment;
5mod dangerous_unary_operator;
6mod div_mul;
7mod duplicate_storage_namespace;
8mod ecrecover;
9mod incorrect_erc20_interface;
10mod incorrect_erc721_interface;
11mod incorrect_storage_namespace_slot;
12mod incorrect_strict_equality;
13mod locked_ether;
14mod mapping_deletion;
15mod non_reentrant_not_first;
16mod tautological_compare;
17mod tautology;
18mod tx_origin;
19mod uninitialized_local;
20mod uninitialized_state_variables;
21mod unsafe_oz_erc721_mint;
22mod unsafe_typecast;
23mod unused_return;
24mod weak_prng;
25
26register_lints!(
27    assert_state_change: (AssertStateChange, late, (ASSERT_STATE_CHANGE));
28    cheatcode_environment: (CheatcodeEnvironment, project, (ENVIRONMENT_READ_ACROSS_MUTATION));
29    dangerous_unary_operator: (DangerousUnaryOperator, early, (DANGEROUS_UNARY_OPERATOR));
30    div_mul: (DivideBeforeMultiply, late, (DIVIDE_BEFORE_MULTIPLY));
31    ecrecover: (Ecrecover, late, (ECRECOVER));
32    incorrect_erc20_interface: (IncorrectERC20Interface, late, (INCORRECT_ERC20_INTERFACE));
33    incorrect_erc721_interface: (IncorrectERC721Interface, late, (INCORRECT_ERC721_INTERFACE));
34    incorrect_strict_equality: (IncorrectStrictEquality, late, (INCORRECT_STRICT_EQUALITY));
35    tautology: (TypeBasedTautology, late, (TYPE_BASED_TAUTOLOGY));
36    tx_origin: (TxOrigin, early, (TX_ORIGIN));
37    uninitialized_local: (UninitializedLocal, late, (UNINITIALIZED_LOCAL));
38    uninitialized_state_variables:
39        (UninitializedStateVariables, late, (UNINITIALIZED_STATE_VARIABLES));
40    unsafe_oz_erc721_mint: (UnsafeOzErc721Mint, late, (UNSAFE_OZ_ERC721_MINT));
41    unsafe_typecast: (UnsafeTypecast, late, (UNSAFE_TYPECAST));
42    unused_return: (UnusedReturn, late, (UNUSED_RETURN));
43    locked_ether: (LockedEther, late, (LOCKED_ETHER));
44    mapping_deletion: (MappingDeletion, late, (MAPPING_DELETION));
45    non_reentrant_not_first: (NonReentrantNotFirst, late, (NON_REENTRANT_NOT_FIRST));
46    weak_prng: (WeakPrng, late, (WEAK_PRNG));
47    tautological_compare: (TautologicalCompare, late, (TAUTOLOGICAL_COMPARE));
48    duplicate_storage_namespace:
49        (DuplicateStorageNamespace, late, (DUPLICATE_STORAGE_NAMESPACE));
50    incorrect_storage_namespace_slot:
51        (IncorrectStorageNamespaceSlot, late, (INCORRECT_STORAGE_NAMESPACE_SLOT));
52);