Skip to content

Contribution Guideline

janie_shao edited this page Sep 15, 2018 · 3 revisions

Thank you for considering contributing to go-dappley. Any contribution from bug-fixing to design ideas is appreciated. This document is for developers who would like to participate developing this project. Please read it carefully to make your contribution accepted quickly and smoothly.

Setup Development Environment

go-dappley uses dep as the dependency management tool. Please see the Installation Instruction to install the tool and Go environment.

Make changes to the code

Checkout go-dappley source code in your $GOPATH.

cd /path/to/go/workspace/src/github.com/dappley/go-dappley

Make sure your changes are based on master branch

git checkout master
git pull

You can create your own branch or fork the repository afterwards.

Use logrus as logger with Log levels:

  • Info: General information
  • Warn: Warning information
  • Debug: Prgram running milestone
  • Error: Errors not blocking the program
  • Panic: Program-exitting errors

Testing

  1. Write unit tests and integration tests for your code.
  2. Add build tag integration to integration test files. (Append line // +build integration to the top followed by an empty line)
  3. Run unit tests with make test; run unit tests and integration tests with make testall under /path/to/go-dappley

Commit and push

Make your commit message short but clear so other developers understand the commit better using the following form:

Summary

Description

Bug/issue #

Pull Request

Please follow Create a Pull Request in Github page. You can create a new Pull request from Github. Your pull request will usually be reviewed within 3 days by maintainers. Once approved, your changes will be merged to the main code base.

Code review

Follow Go Code Review Comments to make maintainers review your code more efficiently.

Please chat with our maintainers regarding any questions at our Gitter or Slack channel.

Clone this wiki locally