Skip to content

Update dependency solhint to v6 #5784

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Jul 4, 2025

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
solhint (source) ^5.0.0 -> ^6.0.0 age adoption passing confidence

Release Notes

protofire/solhint (solhint)

v6.0.0

Compare Source

BREAKING CHANGE

Some rules were removed from the recommended ruleset and other were promoted. See below:
Rules revision - #​692

🟥 DEMOTED
  • payable-fallback: Outdated due to the introduction of receive(); rarely needed in modern Solidity.

✅ PROMOTED
  • interface-starts-with-i: Promotes clarity by clearly distinguishing interfaces from contracts.
  • gas-calldata-parameters: Encourages optimal memory usage for external functions.
  • gas-increment-by-one: Suggests using ++i style for gas-efficient increments.
  • gas-indexed-events: Improves event indexing for off-chain systems and reduces gas usage.
  • gas-small-strings: Recommends cheaper encoding using bytes32 for short strings.
  • gas-strict-inequalities: Helps avoid subtle off-by-one bugs in range conditions.
  • gas-struct-packing: Maximizes storage efficiency by suggesting tight struct packing.
  • duplicated-imports: Prevents redundant imports that bloat the AST and confuse code structure.
  • import-path-check: Ensures all imported files exist and resolve correctly, avoiding runtime errors.
  • function-max-lines: Encourages smaller, more readable and maintainable functions.
  • constructor-syntax: Enforces modern constructor syntax for consistency and clarity.
  • use-natspec: Promotes proper documentation with NatSpec for better audits and readability.
Fixed
  • gas-struct-packing false positives - #​690
  • gas-increment-by-one backward expression - #​691
  • Typo (thanks to @​MarkFizz77)
Added
  • use-natspec: Promote the use of natspec and make several checks to enforce it - #​689



v5.2.0

Compare Source

Fixed
  • imports-order interference with no-unused-imports - #​684
Added
  • Added cache flag allowing to skip already evaluated files if no error was thrown and file did not change - #​685
  • Added multi-directory config support by hierarchy - #​678
  • Added better error handling on invalid configs - #​683

Thanks to @​smol-ninja - @​PaulRBerg @​lechpzn, @​otc-png, @​MamunC0der, @​kks-code, @​RidaMichofi

For making the time of proposing rules, pointing out typos, broken links, unused code, copyright, small reviews, etc. We really appreciate your contributions!



v5.1.0

Compare Source

Added
Updated
BREAKING CHANGE
  • Removed code for solhint:default ruleset - #​654

Thanks to @​fanqiaojun, @​maximevtush, @​MaxweLL22-22, @​PixelPil0t1, @​wgyt, @​operagxsasha, @​Hopium21, @​leopardracer, @​omahs, @​zeevick10, @​gap-editor, @​Olexandr88, @​jirutka

For making the time of pointing out typos, license update, broken links, unused code, copyright, small reviews, etc. We really appreciate your contributions!




Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot requested a review from a team as a code owner July 4, 2025 21:16
Copy link

changeset-bot bot commented Jul 4, 2025

⚠️ No Changeset found

Latest commit: a72be0e

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

socket-security bot commented Jul 4, 2025

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatednpm/​solhint@​5.0.5 ⏵ 6.0.09810010090 +270 -30

View full report

Amxx
Amxx previously approved these changes Jul 6, 2025
@Amxx Amxx requested a review from gonzaotc July 10, 2025 21:46
Copy link
Contributor

@gonzaotc gonzaotc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@gonzaotc gonzaotc self-requested a review July 11, 2025 16:28
Copy link
Contributor

@gonzaotc gonzaotc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually wait, at first sight all the checks in the CI succeed, but upon manual execution I verified that actually solhint is not running any longer, generating a false positive therefore.

Edit: Seems like in newer versions it only automatically pickups the configuration from solhint.json, so we need to use the flag --config to use our solhint.config.js instead

Copy link
Contributor Author

renovate bot commented Jul 11, 2025

Edited/Blocked Notification

Renovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR.

You can manually request rebase by checking the rebase/retry box above.

⚠️ Warning: custom changes will be lost.

@ernestognw ernestognw force-pushed the renovate/solhint-6.x branch from bf2f1f0 to b8bb17d Compare July 11, 2025 17:51
@ernestognw
Copy link
Member

I had to force push this one since the history diverged after merging master back. I think there were some cherry picked commit or similar that made history diverge and broke the diff, suggesting there were 45 file differences here.

Should be fine now

@gonzaotc gonzaotc requested review from Amxx and gonzaotc July 11, 2025 17:54
gonzaotc and others added 3 commits July 11, 2025 15:02
Co-authored-by: Ernesto García <ernestognw@gmail.com>
Co-authored-by: Ernesto García <ernestognw@gmail.com>
@Amxx Amxx requested a review from ernestognw July 14, 2025 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants