Thanks again for your time and interest in this project!
The following document is a set of guidelines to streamline the contribution process for our contributors. Please feel free to suggest changes to this document in a pull request!
Please try to keep discussions respectful and follow the Apache Software Foundation Code of Conduct when interacting with others.
We love pull requests! We simply don't have the time or resources to add every feature, fix every bug and support every platform. If you have improvements (enhancements or bug fixes) for Traffic Control, start by creating a Github issue or a feature blueprint and discussing it with us first on the dev@trafficcontrol.apache.org mailing list. We might already be working on it, or there might be an existing way to do it.
When we need to make changes to the project, we first discuss it on the dev@trafficcontrol.apache.org mailing list. Use your best judgement here. Small changes (i.e. bug fixes or small improvements) may not warrant an email discussion. However, larger changes (i.e. new features or changes to existing functionality) should be discussed on the email list prior to development.
Some contributors may choose to create a feature blueprint to accompany their email to better articulate an idea and solicit feedback in the form of a PR. The process involves the following:
Once your issue has been approved or your feature blueprint has been merged and you're ready to start slinging code, we have a few guidelines to help maintain code quality and ensure the pull request process goes smoothly.
If you've never made a pull request, it's super-easy. Github has a great tutorial here. In a nutshell, you click the fork button to make a fork, clone it and make your change, then click the green New pull request button on your repository's Github page and follow the instructions.
That's it! We'll look at it and get back to you.
Following the project conventions will make the pull request process go faster and smoother.
Some "components" or pieces of Traffic Control have their own guidelines that don't generally apply elsewhere.
If making changes to the Traffic Ops API, please consult the Traffic Ops API Guidelines.
The contribution guidelines for the experimental Traffic Portal v2 Angular project are detailed in that project's README.
If you want to add a new feature, make a GitHub issue or feature blueprint and discuss it with us first on the dev@trafficcontrol.apache.org mailing list. We might already be working on it, or there might be an existing way to do it.
If it's a bug fix, make a GitHub issue and optionally discuss it with us first on the dev@trafficcontrol.apache.org mailing list.
If your pull request changes the user interface or API, make sure the relevant documentation is updated. Documentation source code is written using reStructuredText. Please verify any document changes by installing Sphinx and running 'make' from the root of the docs directory.
Keep functions small. Big functions are hard to read, and hard to review. Try to
make your changes look like the surrounding code, and follow language
conventions. For Go, run go fmt
and go vet
. For Perl, perltidy
. For Java,
PMD.
Like big functions, big pull requests are just hard to review. Make each pull request as small as possible. For example, if you're adding ten independent API endpoints, make each a separate pull request. If you're adding interdependent functions or endpoints to multiple components, make a pull request for each, starting at the lowest level.
Make sure all existing tests pass. If you change the way something works, be sure to update tests to reflect the change. Add unit tests for new functions, and add integration tests for new interfaces.
Tests that fail if your feature doesn't work are much more useful than tests which only validate best-case scenarios.
We're in the process of adding more tests and testing frameworks, so if a testing framework doesn't exist for the component you're changing, don't worry about it.
Try to make your commit messages follow git best practices.
This makes it easier for people to read and understand what each commit does, on both the command line interface and GitHub.
Don't let all these guidelines discourage you, we're more interested in community involvement than perfection, in general.
What are you waiting for? Get hacking!
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。