Skip to content
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

chore: fully enable solhint linter #261

Merged
merged 4 commits into from
Jul 22, 2024
Merged

chore: fully enable solhint linter #261

merged 4 commits into from
Jul 22, 2024

Conversation

shaspitz
Copy link
Contributor

@shaspitz shaspitz commented Jul 20, 2024

Closes #246

Enables all solhint rules that were deemed useful for us from https://protofire.github.io/solhint/docs/rules.html, and refactors contracts as needed to abide by new error rules.

This PR should effectively be a refactor, but small differences in behavior exist like shorter error messages.

Devnet tested in https://github.com/primev/mev-commit/actions/runs/10016705210

Note https://github.com/primev/mev-commit/tree/fully-enable-solhint has individual commits of this PR but I had to squash merge due to commit linting ci..

"imports-on-top": "error",
"visibility-modifier-order": "error",
"reason-string": "error",
"gas-custom-errors": "off"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Mikelle I turned this one off due to ethereum/go-ethereum#26823

commit 946c209
Author: Shawn <[email protected]>
Date:   Fri Jul 19 18:47:56 2024 -0700

    chore: update abis + bindings

commit 6e74e2b
Author: Shawn <[email protected]>
Date:   Fri Jul 19 18:43:35 2024 -0700

    fix: smaller require msges

commit 5f206ec
Author: Shawn <[email protected]>
Date:   Fri Jul 19 18:16:26 2024 -0700

    chore: go back to require statements due to ethereum/go-ethereum#26823

commit a6a076e
Author: Mikhail Wall <[email protected]>
Date:   Sat Jul 20 00:57:26 2024 +0200

    feat: Fully enable solhint merge (#258)

    * fix: fixed bidder registry linter

    * fix: fixed blockTracker

    * fix: fixing oracle and fixed interfaces

    * fix: merged with Shawn branch

    * fix: added more custom errors

commit 0bc368c
Author: Shawn <[email protected]>
Date:   Fri Jul 19 14:56:58 2024 -0700

    fix: missed a disable line

commit 0b1f929
Author: Shawn <[email protected]>
Date:   Fri Jul 19 14:55:29 2024 -0700

    refactor: address unused imports point

commit 3327469
Author: Shawn <[email protected]>
Date:   Fri Jul 19 14:54:36 2024 -0700

    refactor: correct style related points

commit ce642d8
Author: Shawn <[email protected]>
Date:   Fri Jul 19 14:25:35 2024 -0700

    fix: proper use of solhint disable for empty blocks check

commit 9971497
Author: Shawn <[email protected]>
Date:   Fri Jul 19 14:12:04 2024 -0700

    refactor: correct all instances of gas-length-in-loops infractions

commit 33f603d
Author: Shawn <[email protected]>
Date:   Fri Jul 19 14:02:14 2024 -0700

    refactor: correct all instances of private-vars-leading-underscore infractions

commit ba33b03
Author: Shawn <[email protected]>
Date:   Fri Jul 19 13:28:24 2024 -0700

    refactor: refactor contracts for all instances of ordering infractions

Co-Authored-By: Mikhail Wall <[email protected]>
@shaspitz shaspitz marked this pull request as ready for review July 20, 2024 02:45
contracts/contracts/Whitelist.sol Outdated Show resolved Hide resolved
@shaspitz shaspitz merged commit fb28440 into main Jul 22, 2024
7 checks passed
@shaspitz shaspitz deleted the solhint-final branch July 22, 2024 17:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Follow all useful solhint linting rules
3 participants