Compiler version must satisfy a semver requirementSOLHINT-W1043No console.log/logInt/logBytesX/logString/etc & No hardhat and forge-std console.sol import statementsSOLHINT-W1007Enforces the use of double or simple quotes as configured for string literals. Values must be 'single' or 'double'SOLHINT-W1017Avoid to use `.call.value()()`SOLHINT-W1036Avoid to use low level callsSOLHINT-W1037Explicitly mark visibility in functionSOLHINT-W1044Explicitly mark all external contracts as trusted or untrustedSOLHINT-W1045Avoid multiple calls of `send` method in single transactionSOLHINT-W1046Fallback function must be simpleSOLHINT-W1047Do not rely on `block.blockhash`. Miners can influence its valueSOLHINT-W1049Use `keccak256` instead of deprecated `sha3`SOLHINT-W1038Use `selfdestruct` instead of deprecated `suicide`SOLHINT-W1039`throw` is deprecated, avoid to use itSOLHINT-W1040Avoid to use tx.originSOLHINT-W1041Check result of `send` callSOLHINT-W1042Line length must be no more than maxlenSOLHINT-W1005Avoid to use inline assembly. It is acceptable only in rare casesSOLHINT-W1048Avoid making time-based decisions in your business logicSOLHINT-W1050Possible reentrancy vulnerabilities. Avoid state changes after transferSOLHINT-W1051Explicitly mark visibility of stateSOLHINT-W1052Function body contains `count` lines but allowed no more than maxlinesSOLHINT-W1004Function order is incorrectSOLHINT-W1032Import statements must be on topSOLHINT-W1033Function has cyclomatic complexity `current` but allowed no more than maxcomplSOLHINT-W1001Forbid or enforce explicit types (like uint256) that have an alias (like uint)SOLHINT-W1003Contract has `some count` states declarations but allowed no more than maxstatesSOLHINT-W1006Code block has zero statements inside. Exceptions applySOLHINT-W1008Import statement includes an entire file instead of selected symbolsSOLHINT-W1009Imported object name is not being used by the contractSOLHINT-W1010Variable `name` is unusedSOLHINT-W1011Enforces the use of ONE Contract per fileSOLHINT-W1012When fallback is not payable you will not be able to receive ethersSOLHINT-W1013Require or revert statement must have a reason string and check that each reason string is at most N characters longSOLHINT-W1014Constructors should use the new constructor keywordSOLHINT-W1015Constant name must be in capitalized SNAKE_CASE. (Does not check IMMUTABLES, use immutable-vars-naming)SOLHINT-W1018Contract, Structs and Enums should be in CamelCaseSOLHINT-W1019Event name must be in CamelCaseSOLHINT-W1020Enforce naming convention on functions for Foundry test casesSOLHINT-W1021Function name must be in mixedCaseSOLHINT-W1022Enforce named parameters for function calls with 4 or more arguments. This rule may have some false positivesSOLHINT-W1023Function param name must be in mixedCaseSOLHINT-W1024Check Immutable variables. Capitalized SNAKE_CASE or mixedCase depending on configurationSOLHINT-W1025Modifier name must be in mixedCaseSOLHINT-W1026Solidity v0.8.18 introduced named parameters on the mappings definitionSOLHINT-W1027Enforce the return values of a function to be namedSOLHINT-W1028Non-external functions and state variables should start with a single underscore. Others, shouldn'tSOLHINT-W1029Variable name must be in mixedCase. (Does not check IMMUTABLES, use immutable-vars-naming)SOLHINT-W1031Check order of elements in file and inside each contract, according to the style guideSOLHINT-W1034Visibility modifier must be first in list of modifiersSOLHINT-W1035Check that all public or external functions are override. This is iseful to make sure that the whole API is extracted in an interfaceSOLHINT-W1016Avoid to use letters 'I', 'l', 'O' as identifiersSOLHINT-W1030Enforces the use of Custom Errors over Require and Revert statementsSOLHINT-W1002
Solhint logo

Solhint

Static Analysis, SAST, Code Coverage, Code Complexity

Sample Configuration
.deepsource.toml
version = 1

[[analyzers]]
name = "solhint"
type = "community"
Explore the docs for all configuration options.