Using rustfmt means we always agree on code formatting. If rustfmt allows it, then matters of code style can be left to personal preference.
However we could benefit from defining more code conventions in CONTRIBUTING.md for the sake of consistency. Just some ideas:
- Forbid
unsafe (or handle case by case)
- Use StdExternalCrate style for grouping imports
- Return as much context as possible with errors
- Refer liberally to bitcoin BIPs and relevant historical context for a piece of code
- Follow rust API guidelines for documentation and naming
- Name tests after the functional unit they're testing
- If using emoji, use them to their intended effect: code-review-emoji-guide
Approving changes:
- All comments resolved
- 2-ACK rule to merge
Use case
Facilitates code review and improves readability of the codebase
Additional context
#1221
#1203 (comment)
Using rustfmt means we always agree on code formatting. If rustfmt allows it, then matters of code style can be left to personal preference.
However we could benefit from defining more code conventions in
CONTRIBUTING.mdfor the sake of consistency. Just some ideas:unsafe(or handle case by case)Approving changes:
Use case
Facilitates code review and improves readability of the codebase
Additional context
#1221
#1203 (comment)