-
Notifications
You must be signed in to change notification settings - Fork 78
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
docs: code style updates #2797
docs: code style updates #2797
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very good, thanks for working on this.
|
||
### P30 tx vs txn naming | ||
|
||
Use "txn", "txns" abbreviations for Ethereum transactions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a comment, not complain: evmone uses tx
for Ethereum transactions because it don't have db :). I think tx
is uniformly used in all EVM work.
|
||
Accepted styles: | ||
|
||
ValidationResult execute_block( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does clang-format is happy with both variants?
I think you can configure clang-format to have desired formatting but this likely requires putting the line length limit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this is the status quo.
I wanted to be stricter here, but we ended up fixating the status quo, because nobody was sure how to reconfigure clang-format. And in particular, people wanted to have a clear separation of the function signature from the body. E.g. in Go/Swift/Rust style it is possible to have the closing ) {
on a separate line, and even have a comma after the last argument.
|
||
### P25 license boilerplate | ||
|
||
Use SPDX short form like in evmone: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did we confirm we are OK to use the short form?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updates with decisions discussed and voted at the workshop meeting.
Andrew confirmed P25 changing to the SPDX short form Apache boilerplate (as in Linux kernel and evmone).