├── contracts ├── Ignored.sol ├── IgnoredLicense.sol ├── IgnoredPragma.sol └── Lock.sol ├── .gitignore ├── tsconfig.dist.json ├── tsconfig.json ├── hardhat.config.ts ├── package.json ├── src ├── type-extensions.ts ├── error-codes.ts ├── plugin.ts └── index.ts ├── CHANGELOG.md ├── README.md └── warnings.txt /contracts/Ignored.sol: -------------------------------------------------------------------------------- 1 | // no SPDX, no pragma 2 | -------------------------------------------------------------------------------- /contracts/IgnoredLicense.sol: -------------------------------------------------------------------------------- 1 | pragma solidity *; 2 | -------------------------------------------------------------------------------- /contracts/IgnoredPragma.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: UNLICENSED 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .env 3 | coverage 4 | coverage.json 5 | typechain 6 | typechain-types 7 | 8 | # Hardhat files 9 | cache 10 | artifacts 11 | 12 | dist 13 | *.tsbuildinfo 14 | -------------------------------------------------------------------------------- /tsconfig.dist.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "noEmit": false, 5 | "outDir": "dist", 6 | "rootDir": "src", 7 | "sourceMap": true, 8 | "declaration": true, 9 | "declarationMap": true 10 | }, 11 | "include": ["src/**/*"] 12 | } 13 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "noEmit": true, 4 | "incremental": true, 5 | "target": "es2020", 6 | "module": "commonjs", 7 | "esModuleInterop": true, 8 | "forceConsistentCasingInFileNames": true, 9 | "strict": true, 10 | "noUncheckedIndexedAccess": true, 11 | "skipLibCheck": true 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /hardhat.config.ts: -------------------------------------------------------------------------------- 1 | import { HardhatUserConfig } from 'hardhat/config'; 2 | 3 | import '@nomicfoundation/hardhat-toolbox'; 4 | 5 | import './src/plugin'; 6 | 7 | export default { 8 | solidity: "0.8.9", 9 | warnings: { 10 | 'Ignored.sol': 'off', 11 | 'contracts/IgnoredLicense.sol': { 'license': 'off' }, 12 | 'contracts/IgnoredPragma.sol': { 'pragma-solidity': false }, 13 | }, 14 | typechain: { 15 | dontOverrideCompile: true, 16 | }, 17 | }; 18 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "hardhat-ignore-warnings", 3 | "version": "0.2.12", 4 | "description": "Hardhat plugin to ignore Solidity warnings", 5 | "author": "Francisco Giordano ", 6 | "license": "MIT", 7 | "main": "dist/plugin.js", 8 | "files": [ 9 | "dist", 10 | "src" 11 | ], 12 | "scripts": { 13 | "build": "tsc -b tsconfig.dist.json", 14 | "prepare": "npm run build" 15 | }, 16 | "devDependencies": { 17 | "@nomicfoundation/hardhat-toolbox": "^1.0.2", 18 | "hardhat": "^2.11.1", 19 | "typescript": "^4.8.3" 20 | }, 21 | "dependencies": { 22 | "minimatch": "^5.1.0", 23 | "node-interval-tree": "^2.0.1", 24 | "solidity-comments": "^0.0.2" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/type-extensions.ts: -------------------------------------------------------------------------------- 1 | // To extend one of Hardhat's types, you need to import the module where it has been defined, and redeclare it. 2 | import 'hardhat/types/config'; 3 | import 'hardhat/types/runtime'; 4 | 5 | import type { WarningId } from './error-codes'; 6 | 7 | export type WarningRule = boolean | 'warn' | 'error' | 'off'; 8 | 9 | export type FileRules = { 10 | [e in WarningId]?: WarningRule; 11 | } & { 12 | default?: WarningRule; 13 | }; 14 | 15 | export type Config = Record; 16 | 17 | declare module 'hardhat/types/config' { 18 | export interface HardhatUserConfig { 19 | warnings?: WarningRule | Config; 20 | } 21 | 22 | export interface HardhatConfig { 23 | warnings: Config; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /contracts/Lock.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: UNLICENSED 2 | pragma solidity ^0.8.9; 3 | 4 | contract Lock { 5 | event E(); 6 | 7 | function foo() public { 8 | revert(); 9 | // solc-ignore-next-line unreachable 10 | emit E(); 11 | } 12 | 13 | // solc-ignore-next-line unused-param 14 | function bar(uint x) public { 15 | emit E(); 16 | } 17 | 18 | function a1() external { 19 | // solc-ignore-next-line unused-call-retval 20 | msg.sender.call(""); 21 | } 22 | 23 | function z2() external pure { 24 | // solc-ignore-next-line statement-has-no-effect 25 | "hello world"; 26 | } 27 | } 28 | 29 | // solc-ignore-next-line missing-receive 30 | contract Payable { 31 | function f() external {} 32 | 33 | fallback() external payable {} 34 | } 35 | -------------------------------------------------------------------------------- /src/error-codes.ts: -------------------------------------------------------------------------------- 1 | export const errorCodes = { 2 | 'unreachable': 5740, 3 | 'unused-param': 5667, 4 | 'unused-var': 2072, 5 | 'unused-call-retval': 9302, 6 | 'code-size': 5574, 7 | 'initcode-size': 3860, 8 | 'shadowing': 2519, 9 | 'shadowing-builtin': 2319, 10 | 'shadowing-opcode': 8261, 11 | 'func-mutability': 2018, 12 | 'license': 1878, 13 | 'pragma-solidity': 3420, 14 | 'missing-receive': 3628, 15 | 'transient-storage': 2394, 16 | 'statement-has-no-effect': 6133, 17 | } as const; 18 | 19 | export type WarningId = number | keyof typeof errorCodes; 20 | 21 | export function getErrorCode(id: string): number { 22 | let code = (errorCodes as Record)[id] ?? id; 23 | if (typeof code === 'string') { 24 | if (/^\d+$/.test(code)) { 25 | code = Number(code); 26 | } else { 27 | throw new Error(`Invalid error code for solc-ignore (${code})`) 28 | } 29 | } 30 | return code; 31 | } 32 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | # 0.2.12 4 | 5 | - Added `statement-has-no-effect` warning id. 6 | 7 | 8 | # 0.2.11 9 | 10 | - Added CRLF support for inline comments. 11 | 12 | # 0.2.10 13 | 14 | - Added `transient-storage` warning id. 15 | 16 | # 0.2.9 17 | 18 | - Added `initcode-size` warning id for EIP-3860 initcode size limit. 19 | 20 | # 0.2.8 21 | 22 | - Allow ignoring warnings in older Solidity versions. 23 | 24 | # 0.2.7 25 | 26 | - Avoid type error on older Solidity versions. 27 | 28 | # 0.2.6 29 | 30 | - Added `unused-call-retval` warning id for "Return value of low-level calls not used". 31 | 32 | # 0.2.5 33 | 34 | - Added `missing-receive` warning id. 35 | 36 | # 0.2.4 37 | 38 | - Allow simpler configuration. 39 | 40 | # 0.2.3 41 | 42 | - Added `shadowing-opcode` warning id. 43 | 44 | # 0.2.2 45 | 46 | - Fixed specificity sorting of config patterns. 47 | 48 | # 0.2.1 49 | 50 | - Added `shadowing-builtin` warning id. 51 | 52 | # 0.2.0 53 | 54 | - Changed the configuration format. See the readme for a description. 55 | 56 | # 0.1.6 57 | 58 | - Fixed bug with errors that have no source location. 59 | 60 | # 0.1.5 61 | 62 | - Added a way to turn remaining warnings into errors. 63 | 64 | # 0.1.4 65 | 66 | - Improved handling of overlapping ignore patterns in the config. 67 | 68 | # 0.1.3 69 | 70 | - Added way to ignore a subset of warnings per file. 71 | - Added `license` and `pragma-solidity` warning ids. 72 | 73 | # 0.1.2 74 | 75 | - Added `func-mutability` warning id. 76 | 77 | # 0.1.1 78 | 79 | - Added a way to ignore warnings in whole files 80 | -------------------------------------------------------------------------------- /src/plugin.ts: -------------------------------------------------------------------------------- 1 | import { extendConfig, extendEnvironment, task } from 'hardhat/config'; 2 | 3 | import './type-extensions'; 4 | 5 | import { 6 | TASK_COMPILE_SOLIDITY_COMPILE_SOLC, 7 | TASK_COMPILE_SOLIDITY_CHECK_ERRORS, 8 | } from 'hardhat/builtin-tasks/task-names'; 9 | 10 | import type { Config } from './type-extensions'; 11 | import type { WarningClassifier } from '.'; 12 | 13 | interface SolcError { 14 | severity: string; 15 | errorCode?: string; 16 | sourceLocation?: SourceLocation; 17 | } 18 | 19 | interface SourceLocation { 20 | file: string; 21 | start: number; 22 | end: number; 23 | } 24 | 25 | interface IgnoreRange { 26 | start: number; 27 | end: number; 28 | code: string; 29 | } 30 | 31 | let classifier: WarningClassifier; 32 | 33 | extendConfig((config, userConfig) => { 34 | let warnings = userConfig.warnings ?? {}; 35 | if (typeof warnings !== 'object') { 36 | warnings = { '*': warnings }; 37 | } 38 | config.warnings = warnings; 39 | }); 40 | 41 | task(TASK_COMPILE_SOLIDITY_COMPILE_SOLC, async (args: { input: any }, hre, runSuper) => { 42 | const { WarningClassifier } = await import('.'); 43 | classifier ??= new WarningClassifier(hre.config.warnings); 44 | 45 | for (const [file, { content }] of Object.entries<{ content: string }>(args.input.sources)) { 46 | classifier.reprocessFile(file, content); 47 | } 48 | 49 | return runSuper(args); 50 | }); 51 | 52 | task(TASK_COMPILE_SOLIDITY_CHECK_ERRORS, async ({ output, ...params }: { output: any }, hre, runSuper) => { 53 | const { WarningClassifier } = await import('.'); 54 | classifier ??= new WarningClassifier(hre.config.warnings); 55 | 56 | output = { 57 | ...output, 58 | errors: output.errors?.flatMap((e: SolcError) => { 59 | // Make sure not to filter out errors 60 | if (e.severity !== 'warning' || !e.sourceLocation) { 61 | return [e]; 62 | } 63 | const rule = classifier.getWarningRule(parseInteger(e.errorCode), e.sourceLocation); 64 | if (rule === 'off') { 65 | return []; 66 | } else if (rule === 'error') { 67 | return [{ ...e, severity: 'error' }]; 68 | } else { 69 | return [e]; 70 | } 71 | }), 72 | }; 73 | 74 | return runSuper({ output, ...params }); 75 | }); 76 | 77 | function parseInteger(n?: string): number | undefined { 78 | if (n === undefined) { 79 | return undefined; 80 | } else if (/^\d+$/.test(n)) { 81 | return Number(n); 82 | } else { 83 | throw new Error(`Expected integer but got '${n}'`) 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # hardhat-ignore-warnings 2 | 3 | This plugin adds ways to ignore Solidity warnings, and a way to turn remaining warnings into errors. 4 | 5 | Actual compilation errors will not be silenced by the plugin. 6 | 7 | ## Quickstart 8 | 9 | You can turn off all Solidity warnings by installing the plugin and configuring it as follows. 10 | 11 | ```diff 12 | // hardhat.config.js 13 | 14 | +require('hardhat-ignore-warnings'); 15 | 16 | module.exports = { 17 | + warnings: 'off', 18 | }; 19 | ``` 20 | 21 | ## Customization 22 | 23 | You can be more selective about the warnings that should be ignored and those that shouldn't. 24 | 25 | ### Inline Comments 26 | 27 | If you want to ignore a warning in a particular line without setting rules for the entire project, you can use inline comments. 28 | 29 | ```solidity 30 | // solc-ignore-next-line unused-param 31 | function bar(uint x) public { 32 | ``` 33 | 34 | ### Configuration 35 | 36 | In order to ignore warnings or promote to errors across the entire project or in entire files, the plugin accepts more detailed configuration. 37 | 38 | The config is an object that maps glob patterns to warning rules. These rules will be applied to files matched by the glob pattern. More specific patterns override the rules of less specific ones. 39 | 40 | A warning can be set to `'off'`, `'error'` (promote to error), or `'warn'` (the default), as well as `false` (meaning `'off'`) and `true` (meaning the local default, or `'warn'` if none is set). 41 | 42 | The special id `default` can be used to apply a setting to all warnings at once. 43 | 44 | ```javascript 45 | warnings: { 46 | // make every warning an error: 47 | '*': 'error', 48 | 49 | // equivalently: 50 | '*': { 51 | default: 'error', 52 | }, 53 | 54 | // add an exception for a particular warning id: 55 | '*': { 56 | 'code-size': 'warn', 57 | default: 'error', 58 | }, 59 | 60 | // turn off all warnings under a directory: 61 | 'contracts/test/**/*': { 62 | default: 'off', 63 | }, 64 | } 65 | ``` 66 | 67 | ### Warning IDs 68 | 69 | Both inline comments and detailed configuration use the following set of names to identify warnings. 70 | 71 | - `unreachable`: "Unreachable code." 72 | - `unused-param`: "Unused function parameter. Remove or comment out the variable name to silence this warning." 73 | - `unused-var`: "Unused local variable." 74 | - `unused-call-retval`: "Return value of low-level calls not used." 75 | - `code-size`: "Contract code size is _N_ bytes and exceeds 24576 bytes (a limit introduced in Spurious Dragon). This contract may not be deployable on Mainnet. Consider enabling the optimizer (with a low "runs" value!), turning off revert strings, or using libraries." 76 | - `shadowing`: "This declaration shadows an existing declaration." 77 | - `shadowing-builtin`: "This declaration shadows a builtin symbol." 78 | - `shadowing-opcode`: "Variable is shadowed in inline assembly by an instruction of the same name." 79 | - `func-mutability`: "Function state mutability can be restricted to pure/view." 80 | - `license`: "SPDX license identifier not provided in source file. Before publishing, consider adding a comment containing "SPDX-License-Identifier: " to each source file. Use "SPDX-License-Identifier: UNLICENSED" for non-open-source code. Please see https://spdx.org for more information." 81 | - `pragma-solidity`: "Source file does not specify required compiler version!" 82 | - `missing-receive`: "This contract has a payable fallback function, but no receive ether function. Consider adding a receive ether function." -- To ignore this warning with a comment, it must be placed before the contract definition. 83 | - `transient-storage`: "Transient storage as defined by EIP-1153 can break the composability of smart contracts: Since transient storage is cleared only at the end of the transaction and not at the end of the outermost call frame to the contract within a transaction, your contract may unintentionally misbehave when invoked multiple times in a complex transaction. To avoid this, be sure to clear all transient storage at the end of any call to your contract. The use of transient storage for reentrancy guards that are cleared at the end of the call is safe." 84 | 85 | -------------------------------------------------------------------------------- /src/index.ts: -------------------------------------------------------------------------------- 1 | import { lazyObject } from 'hardhat/plugins'; 2 | import minimatch from 'minimatch'; 3 | import IntervalTree from 'node-interval-tree'; 4 | import { analyze } from 'solidity-comments'; 5 | import { getErrorCode } from './error-codes'; 6 | import { Config, FileRules, WarningRule } from './type-extensions'; 7 | 8 | const defaultRule: NormalizedWarningRule = 'warn'; 9 | 10 | type NormalizedWarningRule = WarningRule & string; 11 | 12 | type NormalizedFileRules = { 13 | [e in number]?: NormalizedWarningRule; 14 | } & { 15 | default?: NormalizedWarningRule; 16 | }; 17 | 18 | type SortedFileRules = { 19 | pattern: string; 20 | rules: NormalizedFileRules; 21 | }[]; 22 | 23 | interface SolcError { 24 | severity: string; 25 | errorCode: string; 26 | sourceLocation?: SourceLocation; 27 | } 28 | 29 | interface SourceLocation { 30 | file: string; 31 | start: number; 32 | end: number; 33 | } 34 | 35 | interface IgnoreRange { 36 | start: number; 37 | end: number; 38 | code: number; 39 | } 40 | 41 | export class WarningClassifier { 42 | private rules: SortedFileRules; 43 | private ignoreRanges: Record> = {}; 44 | 45 | constructor(private config: Config) { 46 | this.rules = lazyObject(() => sortFileRules(config)); 47 | } 48 | 49 | getWarningRule(errorCode: number | undefined, sourceLocation: SourceLocation): NormalizedWarningRule { 50 | const { file, start } = sourceLocation; 51 | const ignored = errorCode !== undefined && this.ignoreRanges[file]?.search(start, start).includes(errorCode); 52 | if (ignored) { 53 | return 'off'; 54 | } 55 | for (const rule of this.rules) { 56 | if (minimatch(file, rule.pattern, { matchBase: true })) { 57 | const r = (errorCode !== undefined && rule.rules[errorCode]) || rule.rules.default; 58 | if (r) return r; 59 | } 60 | } 61 | return defaultRule; 62 | } 63 | 64 | reprocessFile(file: string, contents: string) { 65 | const ranges: IgnoreRange[] = []; 66 | 67 | const { comments } = analyze(contents); 68 | const buf = Buffer.from(contents, 'utf8'); 69 | 70 | for (const c of comments) { 71 | const t = c.text.replace(/^\/\/\s+/, ''); 72 | const m = t.match(/^solc-ignore-next-line (.*)/); 73 | if (m) { 74 | const ids = m[1]!.trim().split(/\s+/); 75 | const lineEnd = buf.toString('utf8', c.end, c.end + 2); 76 | const start = c.end + (lineEnd === '\r\n' ? 2 : 1); 77 | const nextNewline = buf.indexOf('\n', start); 78 | const end = nextNewline >= 0 ? nextNewline : buf.length; 79 | for (const id of ids) { 80 | const code = getErrorCode(id); 81 | ranges.push({ start, end, code }); 82 | } 83 | } 84 | } 85 | 86 | if (ranges.length === 0) { 87 | delete this.ignoreRanges[file]; 88 | } else { 89 | const tree = this.ignoreRanges[file] = new IntervalTree(); 90 | for (const { start, end, code } of ranges) { 91 | tree.insert(start, end, code); 92 | } 93 | } 94 | } 95 | } 96 | 97 | const normalizeWarningRule = 98 | (r?: WarningRule, def: NormalizedWarningRule = 'warn') => r === true ? def : r === false ? 'off' : r; 99 | 100 | function normalizeFileRules(rules: WarningRule | FileRules) { 101 | if (typeof rules === 'object') { 102 | const def = normalizeWarningRule(rules.default); 103 | const res: NormalizedFileRules = {}; 104 | for (const [id, r] of Object.entries(rules)) { 105 | const code = id === 'default' ? id : getErrorCode(id); 106 | res[code] = normalizeWarningRule(r, def); 107 | } 108 | return res; 109 | } else { 110 | return { 111 | default: normalizeWarningRule(rules), 112 | }; 113 | } 114 | } 115 | 116 | function sortFileRules(config: Config): SortedFileRules { 117 | const rules = Object.entries(config).map(([pattern, rules]) => ({ pattern, rules: normalizeFileRules(rules) })); 118 | rules.sort((a, b) => ( 119 | minimatch(a.pattern, b.pattern, { matchBase: true }) 120 | ? -1 121 | : minimatch(b.pattern, a.pattern, { matchBase: true }) 122 | ? +1 123 | : 0 124 | )); 125 | return rules; 126 | } 127 | -------------------------------------------------------------------------------- /warnings.txt: -------------------------------------------------------------------------------- 1 | // Warning 1695: Assertion checker does not yet support this global variable. 2 | // Warning 1878: SPDX license identifier not provided in source file. Before publishing, consider adding a comment containing "SPDX-License-Identifier: " to each source file. Use "SPDX-License-Identifier: UNLICENSED" for non-open-source code. Please see https://spdx.org for more information. 3 | // Warning 2018: Function state mutability can be restricted to pure 4 | // Warning 2018: Function state mutability can be restricted to view 5 | // Warning 2072: Unused local variable. 6 | // Warning 2264: Experimental features are turned on. Do not use experimental features on live deployments. 7 | // Warning 2319: This declaration shadows a builtin symbol. 8 | // Warning 2462: Visibility for constructor is ignored. If you want the contract to be non-deployable, making it "abstract" is sufficient. 9 | // Warning 2519: This declaration shadows an existing declaration. 10 | // Warning 3130: Unknown option for "custom:smtchecker": "" 11 | // Warning 3130: Unknown option for "custom:smtchecker": "abstract-function" 12 | // Warning 3149: The result type of the exponentiation operation is equal to the type of the first operand (uint8) ignoring the (larger) type of the second operand (int16) which might be unexpected. Silence this warning by either converting the first or the second operand to the type of the other. 13 | // Warning 3347: Recovered in Statement at ';'. 14 | // Warning 3445: This function is named "fallback" but is not the fallback function of the contract. If you intend this to be a fallback function, use "fallback(...) { ... }" without the "function" keyword to define it. 15 | // Warning 3445: This function is named "receive" but is not the receive function of the contract. If you intend this to be a receive function, use "receive(...) { ... }" without the "function" keyword to define it. 16 | // Warning 3628: This contract has a payable fallback function, but no receive ether function. Consider adding a receive ether function. 17 | // Warning 3796: Recovered in ContractDefinition at '}'. 18 | // Warning 3796: Recovered in Statement at ';'. 19 | // Warning 4013: There are more than 256 errors. Aborting. 20 | // Warning 4375: Assertion checker does not support recursive structs. 21 | // Warning 4377: Value for @solidity tag in inline assembly specified multiple times: a 22 | // Warning 4377: Value for @solidity tag in inline assembly specified multiple times: memory-safe-assembly 23 | // Warning 4430: Unknown inline assembly flag: "a" 24 | // Warning 4430: Unknown inline assembly flag: "b" 25 | // Warning 4430: Unknown inline assembly flag: "c" 26 | // Warning 4588: Assertion checker does not yet implement this type of function call. 27 | // Warning 5188: Assertion checker does not yet implement this operator. 28 | // Warning 5523: The SMTChecker pragma has been deprecated and will be removed in the future. Please use the "model checker engine" compiler setting to activate the SMTChecker instead. If the pragma is enabled, all engines will be used. 29 | // Warning 5574: Contract code size is 27192 bytes and exceeds 24576 bytes (a limit introduced in Spurious Dragon). This contract may not be deployable on Mainnet. Consider enabling the optimizer (with a low "runs" value!), turning off revert strings, or using libraries. 30 | // Warning 5574: Contract code size is 27209 bytes and exceeds 24576 bytes (a limit introduced in Spurious Dragon). This contract may not be deployable on Mainnet. Consider enabling the optimizer (with a low "runs" value!), turning off revert strings, or using libraries. 31 | // Warning 5574: Contract code size is 27220 bytes and exceeds 24576 bytes (a limit introduced in Spurious Dragon). This contract may not be deployable on Mainnet. Consider enabling the optimizer (with a low "runs" value!), turning off revert strings, or using libraries. 32 | // Warning 5667: Unused function parameter. Remove or comment out the variable name to silence this warning. 33 | // Warning 5667: Unused try/catch parameter. Remove or comment out the variable name to silence this warning. 34 | // Warning 5740: Unreachable code. 35 | // Warning 5805: "this" used in constructor. Note that external functions of a contract cannot be called while it is being constructed. 36 | // Warning 5815: Interface functions are implicitly "virtual" 37 | // Warning 5878: Failure condition of 'send' ignored. Consider using 'transfer' instead. 38 | // Warning 6031: Internal error: Expression undefined for SMT solver. 39 | // Warning 6133: Statement has no effect. 40 | // Warning 6162: Naming function type parameters is deprecated. 41 | // Warning 6269: Unexpected NatSpec tag "after" with value "bogus-value" in inline assembly. 42 | // Warning 6269: Unexpected NatSpec tag "before" with value "bogus-value" in inline assembly. 43 | // Warning 6269: Unexpected NatSpec tag "before" with value "@solidity a memory-safe-assembly b c d" in inline assembly. 44 | // Warning 6269: Unexpected NatSpec tag "test" with value "test" in inline assembly. 45 | // Warning 6321: Unnamed return variable can remain unassigned. Add an explicit return with value to all non-reverting code paths or name the variable. 46 | // Warning 6321: Unnamed return variable can remain unassigned when the function is called when "B" is the most derived contract. Add an explicit return with value to all non-reverting code paths or name the variable. 47 | // Warning 6321: Unnamed return variable can remain unassigned when the function is called when "C" is the most derived contract. Add an explicit return with value to all non-reverting code paths or name the variable. 48 | // Warning 6417: The constructor of the contract (or its base) uses inline assembly. Because of that, it might be that the deployed bytecode is different from type(...).runtimeCode. 49 | // Warning 7229: Assertion checker does not yet implement the type function (uint256) returns (uint256) for comparisons 50 | // Warning 7238: This assignment performs two copies to storage. Since storage copies do not first copy to a temporary location, one of them might be overwritten before the second is executed and thus may have unexpected effects. It is safer to perform the copies separately or assign to storage pointers first. 51 | // Warning 7239: This assignment involves multiple accesses to a bytes array in storage while simultaneously enlarging it. When a bytes array is enlarged, it may transition from short storage layout to long storage layout, which invalidates all references to its elements. It is safer to only enlarge byte arrays in a single operation, one element at a time. 52 | // Warning 7325: Type function ()[984770902183611232881] covers a large part of storage and thus makes collisions likely. Either use mappings or dynamic arrays and allow their size to be increased only in small quantities per transaction. 53 | // Warning 7325: Type struct b.c covers a large part of storage and thus makes collisions likely. Either use mappings or dynamic arrays and allow their size to be increased only in small quantities per transaction. 54 | // Warning 7325: Type struct C.P[101] covers a large part of storage and thus makes collisions likely. Either use mappings or dynamic arrays and allow their size to be increased only in small quantities per transaction. 55 | // Warning 7325: Type struct C.P[102] covers a large part of storage and thus makes collisions likely. Either use mappings or dynamic arrays and allow their size to be increased only in small quantities per transaction. 56 | // Warning 7325: Type struct C.P[103] covers a large part of storage and thus makes collisions likely. Either use mappings or dynamic arrays and allow their size to be increased only in small quantities per transaction. 57 | // Warning 7325: Type struct C.P[104] covers a large part of storage and thus makes collisions likely. Either use mappings or dynamic arrays and allow their size to be increased only in small quantities per transaction. 58 | // Warning 7325: Type struct C.Q0 covers a large part of storage and thus makes collisions likely. Either use mappings or dynamic arrays and allow their size to be increased only in small quantities per transaction. 59 | // Warning 7325: Type struct C.Q1 covers a large part of storage and thus makes collisions likely. Either use mappings or dynamic arrays and allow their size to be increased only in small quantities per transaction. 60 | // Warning 7325: Type struct C.Q3 covers a large part of storage and thus makes collisions likely. Either use mappings or dynamic arrays and allow their size to be increased only in small quantities per transaction. 61 | // Warning 7325: Type struct C.S0 covers a large part of storage and thus makes collisions likely. Either use mappings or dynamic arrays and allow their size to be increased only in small quantities per transaction. 62 | // Warning 7325: Type struct C.S[1048576] covers a large part of storage and thus makes collisions likely. Either use mappings or dynamic arrays and allow their size to be increased only in small quantities per transaction. 63 | // Warning 7325: Type struct C.S1 covers a large part of storage and thus makes collisions likely. Either use mappings or dynamic arrays and allow their size to be increased only in small quantities per transaction. 64 | // Warning 7325: Type struct C.S covers a large part of storage and thus makes collisions likely. Either use mappings or dynamic arrays and allow their size to be increased only in small quantities per transaction. 65 | // Warning 7325: Type uint256[100000000000000000002] covers a large part of storage and thus makes collisions likely. Either use mappings or dynamic arrays and allow their size to be increased only in small quantities per transaction. 66 | // Warning 7325: Type uint256[][100000000000000000003] covers a large part of storage and thus makes collisions likely. Either use mappings or dynamic arrays and allow their size to be increased only in small quantities per transaction. 67 | // Warning 7325: Type uint256[100000000000000000004] covers a large part of storage and thus makes collisions likely. Either use mappings or dynamic arrays and allow their size to be increased only in small quantities per transaction. 68 | // Warning 7325: Type uint256[100000000000000000006] covers a large part of storage and thus makes collisions likely. Either use mappings or dynamic arrays and allow their size to be increased only in small quantities per transaction. 69 | // Warning 7325: Type uint256[][100000000000000000007] covers a large part of storage and thus makes collisions likely. Either use mappings or dynamic arrays and allow their size to be increased only in small quantities per transaction. 70 | // Warning 7325: Type uint256[100000000000000000008] covers a large part of storage and thus makes collisions likely. Either use mappings or dynamic arrays and allow their size to be increased only in small quantities per transaction. 71 | // Warning 7325: Type uint256[1][][100000000000000000001] covers a large part of storage and thus makes collisions likely. Either use mappings or dynamic arrays and allow their size to be increased only in small quantities per transaction. 72 | // Warning 7325: Type uint256[1][][100000000000000000005] covers a large part of storage and thus makes collisions likely. Either use mappings or dynamic arrays and allow their size to be increased only in small quantities per transaction. 73 | // Warning 7325: Type uint256[1267650600228229401496703205376] covers a large part of storage and thus makes collisions likely. Either use mappings or dynamic arrays and allow their size to be increased only in small quantities per transaction. 74 | // Warning 7325: Type uint256[14474011154664524427946373126085988481658748083205070504932198000989141204992] covers a large part of storage and thus makes collisions likely. Either use mappings or dynamic arrays and allow their size to be increased only in small quantities per transaction. 75 | // Warning 7325: Type uint256[18446744073709551616] covers a large part of storage and thus makes collisions likely. Either use mappings or dynamic arrays and allow their size to be increased only in small quantities per transaction. 76 | // Warning 7325: Type uint256[57896044618658097711785492504343953926634992332820282019728792003956564819968] covers a large part of storage and thus makes collisions likely. Either use mappings or dynamic arrays and allow their size to be increased only in small quantities per transaction. 77 | // Warning 7507: Assertion checker does not yet support this expression. 78 | // Warning 7650: Assertion checker does not yet support this expression. 79 | // Warning 7737: Inline assembly may cause SMTChecker to produce spurious warnings (false positives). 80 | // Warning 7828: Inline assembly has invalid NatSpec documentation. 81 | // Warning 8115: Assertion checker does not yet support the type of this variable. 82 | // Warning 8364: Assertion checker does not yet implement type function (function (uint256)) 83 | // Warning 8364: Assertion checker does not yet implement type struct C.S storage pointer 84 | // Warning 8364: Assertion checker does not yet implement type struct C.S storage ref 85 | // Warning 8364: Assertion checker does not yet implement type struct C.T storage ref 86 | // Warning 8364: Assertion checker does not yet implement type struct Test.RecursiveStruct memory 87 | // Warning 8364: Assertion checker does not yet implement type type(int256[] memory) 88 | // Warning 8364: Assertion checker does not yet implement type type(int256[] memory[] memory) 89 | // Warning 8364: Assertion checker does not yet implement type type(int256[] memory[] memory[] memory) 90 | // Warning 8364: Assertion checker does not yet implement type type(struct test.s memory[7] memory) 91 | // Warning 8364: Assertion checker does not yet implement type type(uint256[7] memory) 92 | // Warning 8544: Inline assembly marked as memory safe using both a NatSpec tag and an assembly flag. If you are not concerned with backwards compatibility, only use the assembly flag, otherwise only use the NatSpec tag. 93 | // Warning 8760: This declaration has the same name as another declaration. 94 | // Warning 8787: Unexpected value for @solidity tag in inline assembly: a 95 | // Warning 8787: Unexpected value for @solidity tag in inline assembly: b 96 | // Warning 8787: Unexpected value for @solidity tag in inline assembly: c 97 | // Warning 8787: Unexpected value for @solidity tag in inline assembly: d 98 | // Warning 8787: Unexpected value for @solidity tag in inline assembly: test 99 | // Warning 9302: Return value of low-level calls not used. 100 | // Warning 9592: "switch" statement with only a default case. 101 | --------------------------------------------------------------------------------