How to Contribute
We'd love to accept your patches and contributions to this project. There are just a few small guidelines you need to follow.
Submissions should follow the Hafnium style guide.
All submissions, including submissions by project members, require review. We use Gerrit for this purpose.
To submit a change:
- Create an account in the Gerrit UI.
- Follow the getting started instructions to clone the Hafnium repositories and set up the necessary commit hook.
- Make your change.
- Run our autoformatter with
- Commit as usual. If you make a change in a submodule you will also need to commit a change in the main repository to update the submodule version.
- Ensure that each commit in the series has at least one
Signed-off-by: line, using your real name and email address. The names in the
Author: lines must match. If anyone else contributes to the commit, they must also add their own
Signed-off-by: line. By adding this line the contributor certifies the contribution is made under the terms of the Developer Certificate of Origin. More details may be found in the Gerrit Signed-off-by Lines guidelines.
- Run the tests and other presubmit checks with
kokoro/build.sh, ensure they all pass.
- Upload the change to Gerrit with
git push origin HEAD:refs/for/master. If you have changed submodules then you'll need to push them as well.
- If you changed submodules, then add a matching 'topic' from the Gerrit UI for all your changes (submodules and the main repository) so that they can be reviewed and submitted together.
- Wait 20-30 minutes for the presubmit tests to run, and make sure a 'Verified +1' comment shows up in Gerrit indicating that they have passed. If not, follow the links to find the errors, fix them and try again.
- From the Gerrit UI add one or more reviewers. Looking at who has modified the same files frequently recently is usually a good way to pick a reviewer. Add a maintainer listed in the maintainers page, who will perform a final review and eventually approve the change.
This project follows Google's Open Source Community Guidelines.