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 div_mul;
7use div_mul::DIVIDE_BEFORE_MULTIPLY;
8
9mod incorrect_erc20_interface;
10use incorrect_erc20_interface::INCORRECT_ERC20_INTERFACE;
11
12mod incorrect_erc721_interface;
13use incorrect_erc721_interface::INCORRECT_ERC721_INTERFACE;
14
15mod incorrect_strict_equality;
16use incorrect_strict_equality::INCORRECT_STRICT_EQUALITY;
17
18mod tautology;
19use tautology::TYPE_BASED_TAUTOLOGY;
20
21mod tx_origin;
22use tx_origin::TX_ORIGIN;
23
24mod uninitialized_local;
25use uninitialized_local::UNINITIALIZED_LOCAL;
26
27mod uninitialized_state_variables;
28use uninitialized_state_variables::UNINITIALIZED_STATE_VARIABLES;
29
30mod unsafe_typecast;
31use unsafe_typecast::UNSAFE_TYPECAST;
32
33mod unused_return;
34use unused_return::UNUSED_RETURN;
35
36mod locked_ether;
37use locked_ether::LOCKED_ETHER;
38
39mod weak_prng;
40use weak_prng::WEAK_PRNG;
41
42register_lints!(
43    (AssertStateChange, late, (ASSERT_STATE_CHANGE)),
44    (DivideBeforeMultiply, late, (DIVIDE_BEFORE_MULTIPLY)),
45    (IncorrectERC20Interface, late, (INCORRECT_ERC20_INTERFACE)),
46    (IncorrectERC721Interface, late, (INCORRECT_ERC721_INTERFACE)),
47    (IncorrectStrictEquality, late, (INCORRECT_STRICT_EQUALITY)),
48    (TypeBasedTautology, late, (TYPE_BASED_TAUTOLOGY)),
49    (TxOrigin, early, (TX_ORIGIN)),
50    (UninitializedLocal, late, (UNINITIALIZED_LOCAL)),
51    (UninitializedStateVariables, late, (UNINITIALIZED_STATE_VARIABLES)),
52    (UnsafeTypecast, late, (UNSAFE_TYPECAST)),
53    (UnusedReturn, late, (UNUSED_RETURN)),
54    (LockedEther, late, (LOCKED_ETHER)),
55    (WeakPrng, early, (WEAK_PRNG))
56);