Skip to content

Latest commit

 

History

History
116 lines (86 loc) · 3.75 KB

CONTRIBUTING.md

File metadata and controls

116 lines (86 loc) · 3.75 KB

#Contributing to the Key Transparency Server

We'd love for you to contribute to our source code! Here are the guidelines we'd like you to follow:

Found an Issue?

If you find a bug in the source code, you can help us by submitting an issue to our GitHub Repository. Even better you can submit a Pull Request with a fix.

Submission Prerequisites

Run the following commands to install the prerequisites needed to complete your pull request submission:

go get -u github.com/golang/lint/golint
go get -u github.com/kisielk/errcheck
go get -u github.com/fzipp/gocyclo
go get -u github.com/gordonklaus/ineffassign
go get -u github.com/client9/misspell/cmd/misspell

Submission Guidelines

Before you submit your pull request consider the following guidelines:

  • Search GitHub for an open or closed Pull Request that relates to your submission. You don't want to duplicate effort.

  • Please sign our Contributor License Agreement (CLA) before sending pull requests. We cannot accept code without this.

  • Please be succinct. Create separate pull requests for separate bug fixes/features.

  • Make your changes in a new git branch:

    git checkout -b my-fix-branch master
  • Create your patch, including appropriate test cases.

  • Follow our Coding Rules.

  • Run make to build your changes and ensure the build is not broken.

  • Run go fmt to correct any styling errors in the code

  • Run go test to run the full test suite.

  • Run make presubmit to ensure the patch includes healthy go code.

  • Push your branch to GitHub:

    git push origin my-fix-branch
  • In GitHub, send a pull request to google:master.

  • If we suggest changes then

    • Make the required updates.

    • Re-run the test suite and build to ensure the code is still healthy.

    • Rebase your branch and force push to your GitHub repository (this will update your Pull Request):

      git rebase master -i
      git push -f

That's it! Thank you for your contribution!

After your pull request is merged

After your pull request is merged, you can safely delete your branch and pull the changes from the main (upstream) repository:

  • Delete the remote branch on GitHub either through the GitHub web UI or your local shell as follows:

    git push origin --delete my-fix-branch
  • Check out the master branch:

    git checkout master -f
  • Delete the local branch:

    git branch -D my-fix-branch
  • Update your master with the latest upstream version:

    git pull --ff upstream master

Coding Rules

To ensure consistency throughout the source code, keep these rules in mind as you are working:

  • All features or bug fixes must be tested.
  • All public API methods must be documented.

Signing the CLA

Please sign our Contributor License Agreement (CLA) before sending pull requests. For any code changes to be accepted, the CLA must be signed. It's a quick process, we promise!