...
1## Contribution Guidelines
2
3### Security issues
4
5If you are reporting a security issue, do not create an issue or file a pull
6request on GitHub. Instead, disclose the issue responsibly by sending an email
7to security@opencontainers.org (which is inhabited only by the maintainers of
8the various OCI projects).
9
10### Pull requests are always welcome
11
12We are always thrilled to receive pull requests, and do our best to
13process them as fast as possible. Not sure if that typo is worth a pull
14request? Do it! We will appreciate it.
15
16If your pull request is not accepted on the first try, don't be
17discouraged! If there's a problem with the implementation, hopefully you
18received feedback on what to improve.
19
20We're trying very hard to keep runc lean and focused. We don't want it
21to do everything for everybody. This means that we might decide against
22incorporating a new feature. However, there might be a way to implement
23that feature *on top of* runc.
24
25
26### Conventions
27
28Fork the repo and make changes on your fork in a feature branch:
29
30- If it's a bugfix branch, name it XXX-something where XXX is the number of the
31 issue
32- If it's a feature branch, create an enhancement issue to announce your
33 intentions, and name it XXX-something where XXX is the number of the issue.
34
35Submit unit tests for your changes. Go has a great test framework built in; use
36it! Take a look at existing tests for inspiration. Run the full test suite on
37your branch before submitting a pull request.
38
39Update the documentation when creating or modifying features. Test
40your documentation changes for clarity, concision, and correctness, as
41well as a clean documentation build. See ``docs/README.md`` for more
42information on building the docs and how docs get released.
43
44Write clean code. Universally formatted code promotes ease of writing, reading,
45and maintenance. Always run `gofmt -s -w file.go` on each changed file before
46committing your changes. Most editors have plugins that do this automatically.
47
48Pull requests descriptions should be as clear as possible and include a
49reference to all the issues that they address.
50
51Pull requests must not contain commits from other users or branches.
52
53Commit messages must start with a capitalized and short summary (max. 50
54chars) written in the imperative, followed by an optional, more detailed
55explanatory text which is separated from the summary by an empty line.
56
57Code review comments may be added to your pull request. Discuss, then make the
58suggested modifications and push additional commits to your feature branch. Be
59sure to post a comment after pushing. The new commits will show up in the pull
60request automatically, but the reviewers will not be notified unless you
61comment.
62
63Before the pull request is merged, make sure that you squash your commits into
64logical units of work using `git rebase -i` and `git push -f`. After every
65commit the test suite should be passing. Include documentation changes in the
66same commit so that a revert would remove all traces of the feature or fix.
67
68Commits that fix or close an issue should include a reference like `Closes #XXX`
69or `Fixes #XXX`, which will automatically close the issue when merged.
70
71### Sign your work
72
73The sign-off is a simple line at the end of the explanation for the
74patch, which certifies that you wrote it or otherwise have the right to
75pass it on as an open-source patch. The rules are pretty simple: if you
76can certify the below (from
77[developercertificate.org](http://developercertificate.org/)):
78
79```
80Developer Certificate of Origin
81Version 1.1
82
83Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
84660 York Street, Suite 102,
85San Francisco, CA 94110 USA
86
87Everyone is permitted to copy and distribute verbatim copies of this
88license document, but changing it is not allowed.
89
90
91Developer's Certificate of Origin 1.1
92
93By making a contribution to this project, I certify that:
94
95(a) The contribution was created in whole or in part by me and I
96 have the right to submit it under the open source license
97 indicated in the file; or
98
99(b) The contribution is based upon previous work that, to the best
100 of my knowledge, is covered under an appropriate open source
101 license and I have the right under that license to submit that
102 work with modifications, whether created in whole or in part
103 by me, under the same open source license (unless I am
104 permitted to submit under a different license), as indicated
105 in the file; or
106
107(c) The contribution was provided directly to me by some other
108 person who certified (a), (b) or (c) and I have not modified
109 it.
110
111(d) I understand and agree that this project and the contribution
112 are public and that a record of the contribution (including all
113 personal information I submit with it, including my sign-off) is
114 maintained indefinitely and may be redistributed consistent with
115 this project or the open source license(s) involved.
116```
117
118then you just add a line to every git commit message:
119
120 Signed-off-by: Joe Smith <joe@gmail.com>
121
122using your real name (sorry, no pseudonyms or anonymous contributions.)
123
124You can add the sign off when creating the git commit via `git commit -s`.
View as plain text