Thank you for your interest in contributing to the clio
project 🙏
To contribute, please:
- Fork the repository under your own user.
- Create a new branch on which to write your changes.
- Write and test your code.
- Ensure that your code compiles with the provided build engine and update the provided build engine as part of your PR where needed and where appropriate.
- Where applicable, write test cases for your code and include those in
unittests
. - Ensure your code passes automated checks (e.g. clang-format)
- Squash your commits (i.e. rebase) into as few commits as is reasonable to describe your changes at a high level (typically a single commit for a small change.). See below for more details.
- Open a PR to the main repository onto the develop branch, and follow the provided template.
Note: Please make sure you read the Style guide.
This sections offers a detailed look at the git commands you will need to use to get your PR submitted. Please note that there are more than one way to do this and these commands are only provided for your convenience. At this point it's assumed that you have already finished working on your feature/bug.
Important: Before you issue any of the commands below, please hit the
Sync fork
button and make sure your fork'sdevelop
branch is up to date with the mainclio
repository.
# Create a backup of your branch
git branch <your feature branch>_bk
# Rebase and squash commits into one
git checkout develop
git pull origin develop
git checkout <your feature branch>
git rebase -i develop
For each commit in the list other than the first one please select s
to squash.
After this is done you will have the opportunity to write a message for the squashed commit.
Hint: Please use imperative mood commit message capitalizing the first word of the subject.
# You should now have a single commit on top of a commit in `develop`
git log
Todo: In case there are merge conflicts, please resolve them now
# Use the same commit message as you did above
git commit -m 'Your message'
git rebase --continue
Important: If you have no GPG keys setup please follow this tutorial
# Sign the commit with your GPG key and finally push your changes to the repo
git commit --amend -S
git push --force
While your code is in review it's possible that some changes will be requested by the reviewer. This section describes the process of adding your fixes.
We assume that you already made the required changes on your feature branch.
# Add the changed code
git add <paths to add>
# Add a folded commit message (so you can squash them later)
# while also signing it with your GPG key
git commit -S -m "[FOLD] Your commit message"
# And finally push your changes
git push
Last but not least, when your PR is approved you still have to Squash and merge
your code.
Luckily there is a button for that towards the bottom of the PR's page on github.
Important: Please leave the automatically generated link to PR in the subject line and in the description field please add
"Fixes #ISSUE_ID"
(replacingISSUE_ID
with yours). Note: See issues to find theISSUE_ID
for the feature/bug you were working on.
This is a non-exhaustive list of recommended style guidelines. These are not always strictly enforced and serve as a way to keep the codebase coherent rather than a set of thou shalt not commandments.
All code must conform to clang-format
version 10, unless the result would be unreasonably difficult to read or maintain.
To change your code to conform use clang-format -i <your changed files>
.
- Proliferation of nearly identical code.
- Proliferation of new files and classes unless it improves readability or/and compilation time.
- Unmanaged memory allocation and raw pointers.
- Macros (unless they add significant value.)
- Lambda patterns (unless these add significant value.)
- CPU or architecture-specific code unless there is a good reason to include it, and where it is used guard it with macros and provide explanatory comments.
- Importing new libraries unless there is a very good reason to do so.
- Extend functionality of existing code rather than creating new code.
- Prefer readability over terseness where important logic is concerned.
- Inline functions that are not used or are not likely to be used elsewhere in the codebase.
- Use clear and self-explanatory names for functions, variables, structs and classes.
- Use TitleCase for classes, structs and filenames, camelCase for function and variable names, lower case for namespaces and folders.
- Provide as many comments as you feel that a competent programmer would need to understand what your code does.
Maintainers are ecosystem participants with elevated access to the repository. They are able to push new code, make decisions on when a release should be made, etc.
PRs must be reviewed by at least one of the maintainers.
New maintainers can be proposed by two existing maintainers, subject to a vote by a quorum of the existing maintainers. A minimum of 50% support and a 50% participation is required. In the event of a tie vote, the addition of the new maintainer will be rejected.
Existing maintainers can resign, or be subject to a vote for removal at the behest of two existing maintainers. A minimum of 60% agreement and 50% participation are required. The XRP Ledger Foundation will have the ability, for cause, to remove an existing maintainer without a vote.
- cjcobb23 (Ripple)
- natenichols (Ripple)
- legleux (Ripple)
- undertome (Ripple)
- godexsoft (Ripple)