Skip to main content

forge_lint/sol/med/
mod.rs

1use crate::sol::SolLint;
2
3mod assert_state_change;
4use assert_state_change::ASSERT_STATE_CHANGE;
5
6mod dangerous_unary_operator;
7use dangerous_unary_operator::DANGEROUS_UNARY_OPERATOR;
8
9mod div_mul;
10use div_mul::DIVIDE_BEFORE_MULTIPLY;
11
12mod ecrecover;
13use ecrecover::ECRECOVER;
14
15mod incorrect_erc20_interface;
16use incorrect_erc20_interface::INCORRECT_ERC20_INTERFACE;
17
18mod incorrect_erc721_interface;
19use incorrect_erc721_interface::INCORRECT_ERC721_INTERFACE;
20
21mod incorrect_strict_equality;
22use incorrect_strict_equality::INCORRECT_STRICT_EQUALITY;
23
24mod tautology;
25use tautology::TYPE_BASED_TAUTOLOGY;
26
27mod tx_origin;
28use tx_origin::TX_ORIGIN;
29
30mod uninitialized_local;
31use uninitialized_local::UNINITIALIZED_LOCAL;
32
33mod uninitialized_state_variables;
34use uninitialized_state_variables::UNINITIALIZED_STATE_VARIABLES;
35
36mod unsafe_oz_erc721_mint;
37use unsafe_oz_erc721_mint::UNSAFE_OZ_ERC721_MINT;
38
39mod unsafe_typecast;
40use unsafe_typecast::UNSAFE_TYPECAST;
41
42mod unused_return;
43use unused_return::UNUSED_RETURN;
44
45mod locked_ether;
46use locked_ether::LOCKED_ETHER;
47
48mod mapping_deletion;
49use mapping_deletion::MAPPING_DELETION;
50
51mod non_reentrant_not_first;
52use non_reentrant_not_first::NON_REENTRANT_NOT_FIRST;
53
54mod tautological_compare;
55use tautological_compare::TAUTOLOGICAL_COMPARE;
56
57mod weak_prng;
58use weak_prng::WEAK_PRNG;
59
60register_lints!(
61    (AssertStateChange, late, (ASSERT_STATE_CHANGE)),
62    (DangerousUnaryOperator, early, (DANGEROUS_UNARY_OPERATOR)),
63    (DivideBeforeMultiply, late, (DIVIDE_BEFORE_MULTIPLY)),
64    (Ecrecover, late, (ECRECOVER)),
65    (IncorrectERC20Interface, late, (INCORRECT_ERC20_INTERFACE)),
66    (IncorrectERC721Interface, late, (INCORRECT_ERC721_INTERFACE)),
67    (IncorrectStrictEquality, late, (INCORRECT_STRICT_EQUALITY)),
68    (TypeBasedTautology, late, (TYPE_BASED_TAUTOLOGY)),
69    (TxOrigin, early, (TX_ORIGIN)),
70    (UninitializedLocal, late, (UNINITIALIZED_LOCAL)),
71    (UninitializedStateVariables, late, (UNINITIALIZED_STATE_VARIABLES)),
72    (UnsafeOzErc721Mint, late, (UNSAFE_OZ_ERC721_MINT)),
73    (UnsafeTypecast, late, (UNSAFE_TYPECAST)),
74    (UnusedReturn, late, (UNUSED_RETURN)),
75    (LockedEther, late, (LOCKED_ETHER)),
76    (MappingDeletion, late, (MAPPING_DELETION)),
77    (NonReentrantNotFirst, late, (NON_REENTRANT_NOT_FIRST)),
78    (WeakPrng, early, (WEAK_PRNG)),
79    (TautologicalCompare, late, (TAUTOLOGICAL_COMPARE))
80);