|
2 | 2 |
|
3 | 3 | ### BREAKING CHANGE |
4 | 4 | Some rules were removed from the recommended ruleset and other were promoted. See below: |
| 5 | +Rules revision - [#692](https://github.com/protofire/solhint/pull/692) |
5 | 6 |
|
6 | 7 | #### 🟥 DEMOTED |
7 | 8 |
|
8 | | - - `payable-fallback`: Outdated due to the introduction of receive(); rarely needed in modern Solidity. |
| 9 | +- `payable-fallback`: Outdated due to the introduction of receive(); rarely needed in modern Solidity. |
9 | 10 | <br> |
10 | 11 |
|
11 | 12 | #### ✅ PROMOTED |
12 | 13 |
|
13 | | - - `interface-starts-with-i`: Promotes clarity by clearly distinguishing interfaces from contracts. |
14 | | - - `gas-calldata-parameters`: Encourages optimal memory usage for external functions. |
15 | | - - `gas-increment-by-one`: Suggests using ++i style for gas-efficient increments. |
16 | | - - `gas-indexed-events`: Improves event indexing for off-chain systems and reduces gas usage. |
17 | | - - `gas-small-strings`: Recommends cheaper encoding using bytes32 for short strings. |
18 | | - - `gas-strict-inequalities`: Helps avoid subtle off-by-one bugs in range conditions. |
19 | | - - `gas-struct-packing`: Maximizes storage efficiency by suggesting tight struct packing. |
20 | | - - `duplicated-imports`: Prevents redundant imports that bloat the AST and confuse code structure. |
21 | | - - `import-path-check`: Ensures all imported files exist and resolve correctly, avoiding runtime errors. |
22 | | - - `function-max-lines`: Encourages smaller, more readable and maintainable functions. |
23 | | - - `constructor-syntax`: Enforces modern constructor syntax for consistency and clarity. |
24 | | - - `use-natspec`: Promotes proper documentation with NatSpec for better audits and readability. |
| 14 | +- `interface-starts-with-i`: Promotes clarity by clearly distinguishing interfaces from contracts. |
| 15 | +- `gas-calldata-parameters`: Encourages optimal memory usage for external functions. |
| 16 | +- `gas-increment-by-one`: Suggests using ++i style for gas-efficient increments. |
| 17 | +- `gas-indexed-events`: Improves event indexing for off-chain systems and reduces gas usage. |
| 18 | +- `gas-small-strings`: Recommends cheaper encoding using bytes32 for short strings. |
| 19 | +- `gas-strict-inequalities`: Helps avoid subtle off-by-one bugs in range conditions. |
| 20 | +- `gas-struct-packing`: Maximizes storage efficiency by suggesting tight struct packing. |
| 21 | +- `duplicated-imports`: Prevents redundant imports that bloat the AST and confuse code structure. |
| 22 | +- `import-path-check`: Ensures all imported files exist and resolve correctly, avoiding runtime errors. |
| 23 | +- `function-max-lines`: Encourages smaller, more readable and maintainable functions. |
| 24 | +- `constructor-syntax`: Enforces modern constructor syntax for consistency and clarity. |
| 25 | +- `use-natspec`: Promotes proper documentation with NatSpec for better audits and readability. |
25 | 26 |
|
| 27 | +### Fixed |
| 28 | +- `gas-struct-packing` false positives - [#690](https://github.com/protofire/solhint/pull/690) |
| 29 | +- `gas-increment-by-one` backward expression - [#691](https://github.com/protofire/solhint/pull/691) |
| 30 | +- Typo (thanks to @[MarkFizz77](https://github.com/MarkFizz77)) |
| 31 | + |
| 32 | +### Added |
| 33 | + - `use-natspec`: Promote the use of natspec and make several checks to enforce it - [#689](https://github.com/protofire/solhint/pull/689) |
| 34 | + |
| 35 | +<br><br> |
26 | 36 |
|
27 | 37 | ## [5.2.0] - 2025-06-27 |
28 | 38 | ### Fixed |
29 | | - - `imports-order` interference with `no-unused-imports` [#684](https://github.com/protofire/solhint/pull/684) |
| 39 | + - `imports-order` interference with `no-unused-imports` - [#684](https://github.com/protofire/solhint/pull/684) |
30 | 40 |
|
31 | 41 | ### Added |
32 | 42 | - Added `cache` flag allowing to skip already evaluated files if no error was thrown and file did not change - [#685](https://github.com/protofire/solhint/pull/685) |
33 | 43 | - Added multi-directory config support by hierarchy - [#678](https://github.com/protofire/solhint/pull/678) |
34 | | -- Added better error handling on invalid configs - [#683](https://github.com/protofire/solhint/pull/683) |
| 44 | +- Added better error handling on invalid configs - [#683](https://github.com/protofire/solhint/pull/683) |
35 | 45 |
|
36 | 46 |
|
37 | 47 | Thanks to [@smol-ninja](https://github.com/smol-ninja) - [@PaulRBerg](https://github.com/PaulRBerg) [@lechpzn](https://github.com/lechpzn), [@otc-png](https://github.com/otc-png), [@MamunC0der](https://github.com/MamunC0der), [@kks-code](https://github.com/kks-code), [@RidaMichofi](https://github.com/RidaMichofi) |
|
0 commit comments