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

Add coding guidelines #917

Merged
merged 8 commits into from
Aug 9, 2018
Merged

Add coding guidelines #917

merged 8 commits into from
Aug 9, 2018

Conversation

garious
Copy link
Contributor

@garious garious commented Aug 9, 2018

Add Rust coding guidelines and update the codebase to reflect those guidelines.

I've asked all active contributors to review these guidelines. If you don't agree, please speak up! This only works when everyone's on board!

Noteworthy changes:

  • Acknowledge keypair and pubkey as words.
  • Do not acknowledge sig as a word.
  • Boot the "first letter of each word" variable naming convention, which is not widely used and does not appear to improve readability anywhere except arguably one-liner closures.

Fixes #803

garious added 7 commits August 9, 2018 10:16
Recognize pubkey as a noun meaning the public key of a keypair.
We'll avoid introducing three-letter terms to free up the namespace
for three-letter acronyms.

But recognize the term "sigverify", a verb, to verify a digital
signature.
@@ -149,7 +149,7 @@ mod tests {
}
}

fn gen_n_pubkeys(seed: [u8; 32], n: i64) -> HashSet<PublicKey> {
fn gen_n_pubkeys(seed: [u8; 32], n: i64) -> HashSet<Pubkey> {
Copy link
Contributor

Choose a reason for hiding this comment

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

generate? We use gen_ a few ways, not all of our making. But we use generate_ too...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@CriesofCarrots, I missed this comment. Yes, I can fix that up in a separate PR. I can also rename GenKeys to KeyGenerator while I'm in the neighborhood.

@garious garious removed the request for review from rajgokal August 9, 2018 18:16
@garious garious merged commit bca2294 into solana-labs:master Aug 9, 2018
vkomenda pushed a commit to vkomenda/solana that referenced this pull request Aug 29, 2021
Bumps [rollup](https://github.com/rollup/rollup) from 2.34.0 to 2.34.1.
- [Release notes](https://github.com/rollup/rollup/releases)
- [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md)
- [Commits](rollup/rollup@v2.34.0...v2.34.1)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
jeffwashington added a commit to jeffwashington/solana that referenced this pull request Apr 19, 2024
jeffwashington added a commit to jeffwashington/solana that referenced this pull request Apr 19, 2024
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.

7 participants