Slippy rules
Rules that have a 🔧 next to them can be automatically fixed by running Slippy with the --fix flag.
compatible-pragma: checks that the minimum supported pragma version is compatible with the features used in the file.curly: enforces the use of curly braces for all control structures.explicit-types: enforces or forbids the use of aliases likeuintinstead ofuint256. 🔧id-denylist: allows you to specify a list of forbidden identifiers.imports-on-top: enforces that all import statements are at the top of the file.max-state-vars: limits the number of state variables in a contract.named-return-params: enforces that functions with multiple return parameters use named return parameters.naming-convention: enforces a naming convention across the codebase.no-console: forbids the use ofconsole.logand the import ofconsole.sol.no-default-visibility: forbids the use of default visibility for state variables. 🔧no-duplicate-imports: forbids importing the same file multiple times.no-empty-blocks: forbids blocks without statements.no-global-imports: forbids global imports likeimport "./foo.sol".no-hardcoded-gas: disallows hardcoded gas values in call options.no-restricted-syntax: disallows syntax patterns specified with Slang queries.no-send: forbids the use ofsendandtransferfor sending value, in favor of usingcallwith value.no-tx-origin: forbids the use oftx.origin.no-unchecked-calls: disallows low-level calls likecall,staticcall, anddelegatecallthat don’t use their return values.no-uninitialized-immutable-references: forbids using immutable references before they are initialized.no-unnecessary-boolean-compare: forbids unnecessary comparisons to boolean literals.no-unnecessary-else: disallowselseblocks followingifstatements that end with a control-flow-terminating statement (return,break, etc.)no-unused-vars: detects unused variables, imports and functions.one-contract-per-file: enforces that a file contains at most one contract/interface/library definition.private-vars: enforces that all state variables are private.require-revert-reason: enforces that all reverts have a reason.sort-imports: enforces a specific order for import statements.sort-members: enforces a specific order for top-level elements and contract/interface/library members.sort-modifiers: enforces a specific order for modifiers. 🔧yul-prefer-iszero: recommends usingiszeroinstead ofeqwhen comparing to the0literal in Yul code.
Don’t see a rule you need? Open an issue.