ITADN

v6.2.1: same solhint:recommended config as 5.2.0 now reports 697 warnings

#767ClosedSvenMeyer 创建于 2026-04-02
S
SvenMeyercommented
## Description First, thanks for fixing #758 — `code-complexity` no longer crashes for me in 6.2.x. However, upgrading this project from `solhint@5.2.0` to `solhint@6.2.1` still turns a previously clean `solhint:recommended` setup into a hard failure. With the exact same `.solhint.json`, `5.2.0` passes, but `6.2.1` reports `697` warnings, mostly from `use-natspec` plus some gas-related rules, which makes the run fail because this repo uses `--max-warnings 0`. I am not sure whether this is a regression in the `solhint:recommended` preset, a rule severity/default change, or an intended breaking change that needs migration guidance. ## Environment - `solhint`: `5.2.0` -> `6.2.1` - Node.js: `v22.20.0` - Bun: `1.3.1` - OS: Linux (Manjaro) ## .solhint.json ```json { "extends": "solhint:recommended", "plugins": ["prettier"], "rules": { "code-complexity": ["error", 8], "compiler-version": ["error", ">=0.8.4"], "func-visibility": ["error", { "ignoreConstructors": true }], "max-line-length": "off", "named-parameters-mapping": "warn", "no-console": "off", "not-rely-on-time": "off", "prettier/prettier": ["error", { "endOfLine": "auto" }] } } ``` ## Reproduction ### 5.2.0 ```sh bun run lint:sol ``` Output: ```text $ solhint --max-warnings 0 "contracts/**/*.sol" A new version of Solhint is available: 6.2.1 Please consider updating your Solhint package. ``` Exit code: `0` ### 6.2.1 ```sh npx -y solhint@6.2.1 --max-warnings 0 "contracts/**/*.sol" ``` Output ends with: ```text ✖ 697 problems (0 errors, 697 warnings) Solhint found more warnings than the maximum specified (maximum: 0, found: 697) ``` Representative warnings: ```text contracts/ProjectTokenWhitelistFactory.sol 14:1 warning Missing @title tag in contract 'ProjectTokenWhitelistFactory' use-natspec 14:1 warning Missing @author tag in contract 'ProjectTokenWhitelistFactory' use-natspec 14:1 warning Missing @notice tag in contract 'ProjectTokenWhitelistFactory' use-natspec 23:5 warning GC: [implementation] on Event [InstanceCreated] could be Indexed gas-indexed-events contracts/RetirementInfo.sol 4:1 warning GC: For [ RetirementInfo ] struct, packing seems inefficient. Try rearranging to achieve 32bytes slots gas-struct-packing ``` ## Expected behavior Upgrading from `5.2.0` to `6.2.1` with the same `solhint:recommended`-based config should not suddenly enable hundreds of additional warnings without clear migration guidance. If this preset expansion is intentional, could you document the breaking change and the recommended opt-out path? If not, this looks like a regression in the default recommended ruleset/rule severities.
关闭于 2026-04-15 1 条评论