ecosystem-contributions icon indicating copy to clipboard operation
ecosystem-contributions copied to clipboard

✨ Contribution Opportunity: Optimism Monorepo Solidity style linter

Open smartcontracts opened this issue 2 years ago • 6 comments

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!

smartcontracts avatar May 30 '23 20:05 smartcontracts

forge fmt + git diff

tynes avatar May 31 '23 19:05 tynes

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

smartcontracts avatar May 31 '23 20:05 smartcontracts

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

smartcontracts avatar Jun 01 '23 16:06 smartcontracts

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

dbale-altoros avatar Mar 20 '24 17:03 dbale-altoros

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!

z3r086 avatar Jun 19 '24 02:06 z3r086