xref: /aosp_15_r20/external/flatbuffers/CONTRIBUTING.md (revision 890232f25432b36107d06881e0a25aaa6b473652)
1*890232f2SAndroid Build Coastguard WorkerContributing    {#contributing}
2*890232f2SAndroid Build Coastguard Worker============
3*890232f2SAndroid Build Coastguard Worker
4*890232f2SAndroid Build Coastguard WorkerWant to contribute? Great! First, read this page (including the small print at
5*890232f2SAndroid Build Coastguard Workerthe end).
6*890232f2SAndroid Build Coastguard Worker
7*890232f2SAndroid Build Coastguard Worker# Before you contribute
8*890232f2SAndroid Build Coastguard WorkerBefore we can use your code, you must sign the
9*890232f2SAndroid Build Coastguard Worker[Google Individual Contributor License Agreement](https://developers.google.com/open-source/cla/individual?csw=1)
10*890232f2SAndroid Build Coastguard Worker(CLA), which you can do online. The CLA is necessary mainly because you own the
11*890232f2SAndroid Build Coastguard Workercopyright to your changes, even after your contribution becomes part of our
12*890232f2SAndroid Build Coastguard Workercodebase, so we need your permission to use and distribute your code. We also
13*890232f2SAndroid Build Coastguard Workerneed to be sure of various other things—for instance that you'll tell us if you
14*890232f2SAndroid Build Coastguard Workerknow that your code infringes on other people's patents. You don't have to sign
15*890232f2SAndroid Build Coastguard Workerthe CLA until after you've submitted your code for review and a member has
16*890232f2SAndroid Build Coastguard Workerapproved it, but you must do it before we can put your code into our codebase.
17*890232f2SAndroid Build Coastguard WorkerBefore you start working on a larger contribution, you should get in touch with
18*890232f2SAndroid Build Coastguard Workerus first through the issue tracker with your idea so that we can help out and
19*890232f2SAndroid Build Coastguard Workerpossibly guide you. Coordinating up front makes it much easier to avoid
20*890232f2SAndroid Build Coastguard Workerfrustration later on.
21*890232f2SAndroid Build Coastguard Worker
22*890232f2SAndroid Build Coastguard Worker# Code reviews
23*890232f2SAndroid Build Coastguard WorkerAll submissions, including submissions by project members, require review. We
24*890232f2SAndroid Build Coastguard Workeruse Github pull requests for this purpose.
25*890232f2SAndroid Build Coastguard Worker
26*890232f2SAndroid Build Coastguard WorkerSome tips for good pull requests:
27*890232f2SAndroid Build Coastguard Worker* Use our code
28*890232f2SAndroid Build Coastguard Worker  [style guide](https://google.github.io/styleguide/cppguide.html).
29*890232f2SAndroid Build Coastguard Worker  When in doubt, try to stay true to the existing code of the project.
30*890232f2SAndroid Build Coastguard Worker* Write a descriptive commit message. What problem are you solving and what
31*890232f2SAndroid Build Coastguard Worker  are the consequences? Where and what did you test? Some good tips:
32*890232f2SAndroid Build Coastguard Worker  [here](http://robots.thoughtbot.com/5-useful-tips-for-a-better-commit-message)
33*890232f2SAndroid Build Coastguard Worker  and [here](https://www.kernel.org/doc/Documentation/SubmittingPatches).
34*890232f2SAndroid Build Coastguard Worker* If your PR consists of multiple commits which are successive improvements /
35*890232f2SAndroid Build Coastguard Worker  fixes to your first commit, consider squashing them into a single commit
36*890232f2SAndroid Build Coastguard Worker  (`git rebase -i`) such that your PR is a single commit on top of the current
37*890232f2SAndroid Build Coastguard Worker  HEAD. This make reviewing the code so much easier, and our history more
38*890232f2SAndroid Build Coastguard Worker  readable.
39*890232f2SAndroid Build Coastguard Worker
40*890232f2SAndroid Build Coastguard Worker# The small print
41*890232f2SAndroid Build Coastguard WorkerContributions made by corporations are covered by a different agreement than
42*890232f2SAndroid Build Coastguard Workerthe one above, the Software Grant and Corporate Contributor License Agreement.
43