Skip to content

Commit

Permalink
Include code review details in CONTRIBUTING.md
Browse files Browse the repository at this point in the history
  • Loading branch information
trotterdylan authored Jan 17, 2017
1 parent 95ee26c commit ccadc8e
Showing 1 changed file with 39 additions and 6 deletions.
45 changes: 39 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Want to contribute? Great! First, read this page (including the small print at the end).
Want to contribute? Great! First, read this page.

### Before you contribute
Before we can use your code, you must sign the
Expand All @@ -16,12 +16,45 @@ us first through the issue tracker with your idea so that we can help out and
possibly guide you. Coordinating up front makes it much easier to avoid
frustration later on.

### Code reviews
All submissions, including submissions by project members, require review. We
use GitHub pull requests for this purpose.

### The small print
Contributions made by corporations are covered by a different agreement than
the one above, the
[Software Grant and Corporate Contributor License Agreement]
(https://cla.developers.google.com/about/google-corporate).

### Code reviews
All submissions, including submissions by project members, require review. We
use GitHub pull requests for this purpose.

### Code Style
We use Google style guides for all our code. Below are the guidelines for each
language we use.

#### Go
All Go source code must be formatted using gofmt and be lint-clean according to
golint. This will be checked by Travis but can be checked manually from a local
repo via `make gofmt golint`.

Code is expected to be gofmt- and lint clean before it is submitted for review.
Code reviews can then focus on structural details and higher level style
considerations. Many common mistakes are already documented in the
[Go Code Review Comments](https://github.com/golang/go/wiki/CodeReviewComments)
doc so it's worth being familiar with these patterns.

#### Python
All Python source code must be lint-clean according to pylint. This will be
checked by Travis but can be checked manually from a local repo via
`make pylint`.

Once code is pylint-clean, it can be submitted for review. In addition to lint
cleanliness, Python code must adhere to the
[Google Python Style Guide](https://google.github.io/styleguide/pyguide.html)
which has a number of additional conventions. Please be familiar with the style
guide and ensure code satisfies its rules before submitting for review.

##### Borrowed Standard Library Code
Standard library code that is borrowed from other open source projects such as
CPython and PyPy need not be lint clean or satisfy the style guide. The goal
should be to keep the copied sources as close to the originals as possible
while still being functional. For more details about borrowing this kind of
code from other places see the
[guidelines for integration](https://github.com/google/grumpy/wiki/Standard-libraries:-guidelines-for-integration).

0 comments on commit ccadc8e

Please sign in to comment.