Skip to main content

forge_lint/sol/med/
mod.rs

1use crate::sol::{EarlyLintPass, LateLintPass, 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 incorrect_erc20_interface;
13use incorrect_erc20_interface::INCORRECT_ERC20_INTERFACE;
14
15mod incorrect_erc721_interface;
16use incorrect_erc721_interface::INCORRECT_ERC721_INTERFACE;
17
18mod incorrect_strict_equality;
19use incorrect_strict_equality::INCORRECT_STRICT_EQUALITY;
20
21mod tautology;
22use tautology::TYPE_BASED_TAUTOLOGY;
23
24mod tx_origin;
25use tx_origin::TX_ORIGIN;
26
27mod uninitialized_local;
28use uninitialized_local::UNINITIALIZED_LOCAL;
29
30mod uninitialized_state_variables;
31use uninitialized_state_variables::UNINITIALIZED_STATE_VARIABLES;
32
33mod unsafe_typecast;
34use unsafe_typecast::UNSAFE_TYPECAST;
35
36mod unused_return;
37use unused_return::UNUSED_RETURN;
38
39mod locked_ether;
40use locked_ether::LOCKED_ETHER;
41
42mod mapping_deletion;
43use mapping_deletion::MAPPING_DELETION;
44
45mod non_reentrant_not_first;
46use non_reentrant_not_first::NON_REENTRANT_NOT_FIRST;
47
48mod tautological_compare;
49use tautological_compare::TAUTOLOGICAL_COMPARE;
50
51mod weak_prng;
52use weak_prng::WEAK_PRNG;
53
54register_lints!(
55    (AssertStateChange, late, (ASSERT_STATE_CHANGE)),
56    (DangerousUnaryOperator, early, (DANGEROUS_UNARY_OPERATOR)),
57    (DivideBeforeMultiply, late, (DIVIDE_BEFORE_MULTIPLY)),
58    (IncorrectERC20Interface, late, (INCORRECT_ERC20_INTERFACE)),
59    (IncorrectERC721Interface, late, (INCORRECT_ERC721_INTERFACE)),
60    (IncorrectStrictEquality, late, (INCORRECT_STRICT_EQUALITY)),
61    (TypeBasedTautology, late, (TYPE_BASED_TAUTOLOGY)),
62    (TxOrigin, early, (TX_ORIGIN)),
63    (UninitializedLocal, late, (UNINITIALIZED_LOCAL)),
64    (UninitializedStateVariables, late, (UNINITIALIZED_STATE_VARIABLES)),
65    (UnsafeTypecast, late, (UNSAFE_TYPECAST)),
66    (UnusedReturn, late, (UNUSED_RETURN)),
67    (LockedEther, late, (LOCKED_ETHER)),
68    (MappingDeletion, late, (MAPPING_DELETION)),
69    (NonReentrantNotFirst, late, (NON_REENTRANT_NOT_FIRST)),
70    (WeakPrng, early, (WEAK_PRNG)),
71    (TautologicalCompare, late, (TAUTOLOGICAL_COMPARE))
72);