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

✨ Contribution Opportunity: Optimism Monorepo Solidity style linter #62

Open
smartcontracts opened this issue May 30, 2023 · 6 comments

Comments

@smartcontracts
Copy link
Contributor

What is a Contribution Opportunity?

A Contribution Opportunity is a concrete task that you can work on to contribute to the Optimism Collective.


Summary

The Optimism Monorepo is one of the primary places where work happens on the OP Stack, the open source software stack that powers the Optimism Collective. The Optimism Monorepo enforces a style guide for its smart contracts. Currently, this style guide is largely enforced by PR review, a process that does not scale as external contributors begin to contribute additional smart contracts.

The Optimism Monorepo is looking for a Solidity style linter that can enforce the style guide programmatically rather than via PR review. Please refer to the style guide for an exact list of conventions currently in use.

Potential Features

  • Support the Optimism Monorepo Solidity style guide
  • Throw an error when the style guide is not enforced and explain where the issue comes from
  • Create a CI task that will run the linter in CI
  • Bonus points, provide a --fix option to automatically fix style issues

Impact

Programmatically checking the style guide will significantly simplify the process of contributing to the monorepo. Engineering time will no longer have to be spent reviewing style nits, which will speed things up while also reducing headaches for external contributors. Win win!

@tynes
Copy link

tynes commented May 31, 2023

forge fmt + git diff

@smartcontracts
Copy link
Contributor Author

@tynes does forge fmt enforce our style guide? I was under the impression it did not

@smartcontracts
Copy link
Contributor Author

Moving this into "Paused" for now while we discuss what we want to do with this

@dbale-altoros
Copy link

Moving this into "Paused" for now while we discuss what we want to do with this

@smartcontracts
Hello, I'm tech lead in Solhint https://protofire.io/projects/solhint
I found this issue and thought maybe we can do this using the same core as for solhint
Do you have a doc with the style guide ? because the links take me to a repo with many contracts

@z3r086
Copy link

z3r086 commented Jun 19, 2024

What is a Contribution Opportunity?

A Contribution Opportunity is a concrete task that you can work on to contribute to the Optimism Collective.

Summary

The Optimism Monorepo is one of the primary places where work happens on the OP Stack, the open source software stack that powers the Optimism Collective. The Optimism Monorepo enforces a style guide for its smart contracts. Currently, this style guide is largely enforced by PR review, a process that does not scale as external contributors begin to contribute additional smart contracts.

The Optimism Monorepo is looking for a Solidity style linter that can enforce the style guide programmatically rather than via PR review. Please refer to the style guide for an exact list of conventions currently in use.

Potential Features

  • Support the Optimism Monorepo Solidity style guide
  • Throw an error when the style guide is not enforced and explain where the issue comes from
  • Create a CI task that will run the linter in CI
  • Bonus points, provide a --fix option to automatically fix style issues

Impact

Programmatically checking the style guide will significantly simplify the process of contributing to the monorepo. Engineering time will no longer have to be spent reviewing style nits, which will speed things up while also reducing headaches for external contributors. Win win!

@sambacha
Copy link

forge lint foundry-rs/foundry#9590

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

5 participants