|
1 |
| -Want to contribute? Great! First, read this page (including the small print at the end). |
2 |
| - |
3 |
| -## Before you contribute |
4 |
| -Before we can use your code, you must sign the |
5 |
| -[Google Individual Contributor License Agreement](https://developers.google.com/open-source/cla/individual?csw=1) |
6 |
| -(CLA), which you can do online. |
7 |
| - |
8 |
| -The CLA is necessary mainly because you own the |
9 |
| -copyright to your changes, even after your contribution becomes part of our |
10 |
| -codebase, so we need your permission to use and distribute your code. We also |
11 |
| -need to be sure of various other things—for instance that you'll tell us if you |
12 |
| -know that your code infringes on other people's patents. |
13 |
| - |
14 |
| -You don't have to sign |
15 |
| -the CLA until after you've submitted your code for review and a member has |
16 |
| -approved it, but you must do it before we can put your code into our codebase. |
17 |
| -Before you start working on a larger contribution, you should get in touch with |
18 |
| -us first through the issue tracker with your idea so that we can help out and |
19 |
| -possibly guide you. Coordinating up front makes it much easier to avoid |
20 |
| -frustration later on. |
21 |
| - |
22 |
| -## Writing a new implementation |
23 |
| - |
24 |
| -Before you start writing a new implementation, look at some of the existing ones. If you copy the |
25 |
| -code structure from them, you are more likely to have fewer bugs and an easier review cycle. |
26 |
| - |
27 |
| -If you create new algorithms to encode or decode, then your reviewer will have to spend more time |
28 |
| -trying to understand your code in a language they may not be familiar with, and the review cycle |
29 |
| -will take longer. |
30 |
| - |
31 |
| -The reason we say this is because once code is accepted into our repository, we have the responsibility |
32 |
| -to maintain and look after it. You are not writing the code for you, but for the OLC project team. |
33 |
| - |
34 |
| -## Code reviews |
35 |
| -All submissions, including submissions by project members, require review. We |
36 |
| -use Github pull requests for this purpose. |
37 |
| - |
38 |
| -## Code Style |
39 |
| -Programs written in Go must be formatted with `gofmt`. For other languages, we use the |
40 |
| -[Google style guides](https://google.github.io/styleguide/) for code styling. Specifically, this means: |
41 |
| - |
42 |
| -* Line length: 80 chars (Java 100) |
43 |
| -* No extra whitespace around arguments `(code)` not `( code )` |
44 |
| -* K & R style braces: |
45 |
| -```java |
46 |
| -if (condition()) { |
47 |
| - something(); |
48 |
| -} else { |
49 |
| - somethingElse(); |
50 |
| -} |
51 |
| -``` |
52 |
| - |
53 |
| -## The small print |
54 |
| -Contributions made by corporations are covered by a different agreement than |
55 |
| -the one above, the Software Grant and Corporate Contributor License Agreement. |
| 1 | +# Contributing to Open Location Code |
| 2 | + |
| 3 | +The Open Location Code project strongly encourages technical contributions. |
| 4 | + |
| 5 | +We hope you'll become an ongoing participant in our open source community but we also welcome one-off contributions for the issues you're particularly passionate about. |
| 6 | + |
| 7 | +- [Filing issues](#filing-issues) |
| 8 | + * [Bugs](#bugs) |
| 9 | + * [Suggestions](#suggestions) |
| 10 | +- [Contributing code](#contributing-code) |
| 11 | +- [Contributing a new implementation](#contributing-a-new-implementation) |
| 12 | +- [Contributor License Agreement](#contributor-license-agreement) |
| 13 | +- [Ongoing participation](#ongoing-participation) |
| 14 | + * [Discussion channels](#discussion-channels) |
| 15 | + |
| 16 | +## Filing issues |
| 17 | + |
| 18 | +### Bugs |
| 19 | + |
| 20 | +If you find a bug in an Open Location Code library, please [file an issue](https://github.com/google/open-location-code/issues/new). Members of the community are regularly monitoring issues and will try to fix open bugs quickly. |
| 21 | + |
| 22 | +The best bug reports provide a detailed description of the issue, step-by-step instructions for predictably reproducing the issue, and possibly even a working example that demonstrates the issue. |
| 23 | + |
| 24 | +Please note that questions about how to use Open Location Code or other general questions should be asked on the [Open Location Code Google Group](https://groups.google.com/forum/#!forum/open-location-code)<!-- Uncomment if this becomes sensible --><!-- or [Stack Overflow under the Open Location Code tag](http://stackoverflow.com/questions/tagged/open-location-code) --> |
| 25 | +instead of filing an issue here. |
| 26 | + |
| 27 | +### Suggestions |
| 28 | + |
| 29 | +The Open Location Code project is meant to evolve with feedback. The project and its users appreciate your thoughts on ways to improve the design or features or creative ways to use the codes. |
| 30 | + |
| 31 | +To make a suggestion [file an issue](https://github.com/google/open-location-code/issues/new). |
| 32 | + |
| 33 | +If you are intending to implement, please see the [Contributing code](#contributing-code) section below for next steps. |
| 34 | + |
| 35 | +If you are adding Open Location Codes to your project, please contact the [Open Location Code Google Group](https://groups.google.com/forum/#!forum/open-location-code) so we can suggest how you can make the most of the codes. |
| 36 | + |
| 37 | +## Contributing code |
| 38 | + |
| 39 | +The Open Location Code project accepts and greatly appreciates code contributions! |
| 40 | + |
| 41 | +If you are contributing code to the project consider [joining the Open Location Code project on GitHub](https://goo.gl/forms/T65peVtfQfEoDWeD3). |
| 42 | + |
| 43 | +A few things to note: |
| 44 | + |
| 45 | +* The Open Location Code project follows the [fork & pull](https://help.github.com/articles/using-pull-requests/#fork--pull) model for accepting contributions. |
| 46 | +* We follow [Google's JavaScript Style Guide](https://google.github.io/styleguide/jsguide.html). More generally make sure to follow the same comment and coding style as the rest of the project. |
| 47 | +* Include [tests](TESTING.md) when contributing code. There are tests that you can use as examples. |
| 48 | + |
| 49 | +## Contributing a new implementation |
| 50 | + |
| 51 | +Follow this process for contributing a new implementation: |
| 52 | + |
| 53 | +* Look at the existing implementations, to get an idea of the usage and how much work is involved. |
| 54 | +* If you copy the code structure and algorithms from an existing implementation, you'll have a much shorter review cycle. |
| 55 | +* [Create a new GitHub issue](https://github.com/google/open-location-code/issues/new) to start discussion of the new feature. |
| 56 | +* Follow the guidelines for [Contributing code](#contributing-code) described above. |
| 57 | + |
| 58 | +## Contributor License Agreement |
| 59 | + |
| 60 | +The Open Location Code project hosted at GitHub requires all contributors to sign a Contributor License Agreement ([individual](https://developers.google.com/open-source/cla/individual) or [corporation](https://developers.google.com/open-source/cla/corporate)) in order to protect contributors, users and Google in issues of intellectual property. |
| 61 | + |
| 62 | +When you create a Pull Request a check will be run to ensure that you have signed the CLA. Make sure that you sign the CLA with the same email address you associate with your commits (likely via the `user.email` Git config as described on GitHub's [Set up Git](https://help.github.com/articles/set-up-git/) page). |
| 63 | + |
| 64 | +## Ongoing participation |
| 65 | + |
| 66 | +We actively encourage ongoing participation by community members. |
| 67 | + |
| 68 | +### Discussion channels |
| 69 | + |
| 70 | +Technical issues, designs, etc. are discussed on [GitHub issues](https://github.com/google/open-location-code/issues) and [pull requests](https://github.com/google/open-location-code/pulls), |
| 71 | +or the [Open Location Code Google Group](https://groups.google.com/forum/#!forum/open-location-code)<!-- Uncomment if this becomes sensible --><!-- and [Stack Overflow under the Open Location Code tag](http://stackoverflow.com/questions/tagged/open-location-code) -->. |
| 72 | + |
0 commit comments