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