1*ba677afaSXin LiSPDX-License-Identifier: CC-BY-4.0 2*ba677afaSXin Li 3*ba677afaSXin Li# Contributing 4*ba677afaSXin Li 5*ba677afaSXin LiAll contributions must include a "Signed-off-by" line in the commit message. 6*ba677afaSXin Li 7*ba677afaSXin LiThis indicates that the contribution is made pursuant to the [Developer Certificate of Origin (DCO)](https://developercertificate.org/), a copy of which is included below. 8*ba677afaSXin Li 9*ba677afaSXin Li## Test coverage 10*ba677afaSXin Li 11*ba677afaSXin LiSince this library is intended to be relied upon by other tools to work with SPDX data, we are aiming to ensure that it is and remains well-tested. 12*ba677afaSXin Li 13*ba677afaSXin LiPRs with new code should include corresponding test files, and should continue to pass existing tests. Unit tests for `foo.go` should be placed in `foo_test.go`. Test data files and folders should be placed in the top-level `testdata/` folder. 14*ba677afaSXin Li 15*ba677afaSXin LiTo run the test suite, from the top-level directory run: `go test ./...` 16*ba677afaSXin Li 17*ba677afaSXin Li## License information 18*ba677afaSXin Li 19*ba677afaSXin LiNew **code files** should include a [short-form SPDX ID](https://spdx.org/ids) at the top, indicating the project license for code, which is Apache-2.0 OR GPL-2.0-or-later. This should look like the following: 20*ba677afaSXin Li 21*ba677afaSXin Li``` 22*ba677afaSXin Li// SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later 23*ba677afaSXin Li``` 24*ba677afaSXin Li 25*ba677afaSXin LiNew **documentation files** should include a [short-form SPDX ID](https://spdx.org/ids) at the top, indicating the project license for documentation, which is CC-BY-4.0. This should look like the following: 26*ba677afaSXin Li 27*ba677afaSXin Li``` 28*ba677afaSXin LiSPDX-License-Identifier: CC-BY-4.0 29*ba677afaSXin Li``` 30*ba677afaSXin Li 31*ba677afaSXin Li## Developer Certificate of Origin (DCO) 32*ba677afaSXin Li 33*ba677afaSXin Li``` 34*ba677afaSXin LiDeveloper Certificate of Origin 35*ba677afaSXin LiVersion 1.1 36*ba677afaSXin Li 37*ba677afaSXin LiCopyright (C) 2004, 2006 The Linux Foundation and its contributors. 38*ba677afaSXin Li1 Letterman Drive 39*ba677afaSXin LiSuite D4700 40*ba677afaSXin LiSan Francisco, CA, 94129 41*ba677afaSXin Li 42*ba677afaSXin LiEveryone is permitted to copy and distribute verbatim copies of this 43*ba677afaSXin Lilicense document, but changing it is not allowed. 44*ba677afaSXin Li 45*ba677afaSXin Li 46*ba677afaSXin LiDeveloper's Certificate of Origin 1.1 47*ba677afaSXin Li 48*ba677afaSXin LiBy making a contribution to this project, I certify that: 49*ba677afaSXin Li 50*ba677afaSXin Li(a) The contribution was created in whole or in part by me and I 51*ba677afaSXin Li have the right to submit it under the open source license 52*ba677afaSXin Li indicated in the file; or 53*ba677afaSXin Li 54*ba677afaSXin Li(b) The contribution is based upon previous work that, to the best 55*ba677afaSXin Li of my knowledge, is covered under an appropriate open source 56*ba677afaSXin Li license and I have the right under that license to submit that 57*ba677afaSXin Li work with modifications, whether created in whole or in part 58*ba677afaSXin Li by me, under the same open source license (unless I am 59*ba677afaSXin Li permitted to submit under a different license), as indicated 60*ba677afaSXin Li in the file; or 61*ba677afaSXin Li 62*ba677afaSXin Li(c) The contribution was provided directly to me by some other 63*ba677afaSXin Li person who certified (a), (b) or (c) and I have not modified 64*ba677afaSXin Li it. 65*ba677afaSXin Li 66*ba677afaSXin Li(d) I understand and agree that this project and the contribution 67*ba677afaSXin Li are public and that a record of the contribution (including all 68*ba677afaSXin Li personal information I submit with it, including my sign-off) is 69*ba677afaSXin Li maintained indefinitely and may be redistributed consistent with 70*ba677afaSXin Li this project or the open source license(s) involved. 71*ba677afaSXin Li``` 72