|
1 |
| -## Contributing guidelines |
| 1 | +## Contributing to Mbed OS |
2 | 2 |
|
3 |
| -Consistency is an important aspect of a codebase. To ensure consistency in Mbed OS code, we have created contributing guidelines. Any contribution to Mbed OS needs to meet the following criteria: |
| 3 | +Mbed OS is an open source, device software ecosystem for the internet of things. Contributions are an important part of the ecosystem and our goal is to make it as simple as possible to become a contributor. |
4 | 4 |
|
5 |
| -- Design and coding style: Be consistent with your changes. We define software design principles and coding style in [this document](../contributing/style.html). |
6 |
| -- Contributions guidance: The process and how we review contributions is described in the [workflow](../contributing/workflow.html) document. |
7 |
| -- Licenses: Licenses should comply with the [licenses described here](../contributing/license.html). |
| 5 | +Contributions can be made to source code and documentation. Both are developed on Github. Mbed uses the same open source license for contributions (inbound) as is used for the license to the project (outbound). Our default and preferred software license is Apache License version 2.0 (Apache-2.0). |
| 6 | + |
| 7 | +To encourage frictionless collaboration, as well as robust, consistent, and maintainable code, we have built up a set of guidelines for contributing to Mbed. |
| 8 | + |
| 9 | +### Types of contributions |
| 10 | + |
| 11 | +There are a few categories a contribution may fall under. Each type has different risks and benefits. When contributing, it’s important to not mix types and instread create multiple contributions if needed. Once a contribution is accepted it will appear in the next release based on type of contribution. |
| 12 | + |
| 13 | +The type of contribution will impact how it is incorporated into Mbed OS, as explained [here](../contributing/workflow.html) |
| 14 | + |
| 15 | +### How to contribute |
| 16 | + |
| 17 | +Mbed OS has a team of people called maintainers who will help move contributions along, providing guidance and direction. This team is responsible for helping you get your changes in, as well as controlling the overall quality and consistency of the software. Contributions are accepted in the form of pull requests. Before any contributions are accepted to any Mbed OS software, there must be a review by at least one other developer experienced with the functionality. For contributions that span multiple functionalities, multiple reviewers may be necessary. Once reviewed the changes will be tested as part of a larger system. The testing includes but is not limited to: functional correctness, static analysis, integration with other parts of the system, code style or formatting and regressions such as code size increase or performance degredation. If any of the testing fails, more work will be needed before the contribution is accepted. |
| 18 | + |
| 19 | +### Licensing |
| 20 | + |
| 21 | +A license is the contract between the author permitting the use of software to others. It specifies what you can and cannot do when receiving the software. It provides protection for both the user and owner of the software. In an Mbed project, the full terms of the license can be found in a file named LICENSE. Additionally, all source files must contain the SPDX identifier as a comment at the beginning of the file. |
| 22 | + |
| 23 | +Note that one repository may contain multiple, independent codebases, each with their own license. If you are integrating two libraries with different licenses, it is important that each library retains its original license. In the case of a repository having software with multiple licenses, the contribution will be made according to the license of the file the contribution modifies. By creating a pull request on GitHub, you are agreeing to license your contributions under the same license as the original code. Is commonly reffered to as "inbound=outbound". This enables contributions to happen in a quick and effortless way and encourages collaboration. |
| 24 | + |
| 25 | +Most Mbed OS software is licensed under a permissive license. The three most common permissive licenses are: |
| 26 | +- Apache 2.0 |
| 27 | +- BSD 3-Clause |
| 28 | +- MIT |
| 29 | + |
| 30 | +For new Mbed projects, we suggest adopting the Apache 2.0 license. Note that any Mbed software release under a permissive license cannot accept any code that is licensed under a "copyleft" license. Doing so would prevent us from continuing to distribute our code under the permissive license. You are welcome to use Mbed software with copyleft licenses, as long as the rules of the copyleft license are followed. |
| 31 | + |
| 32 | +A more detailed description on licenses can be found in the [guidelines/contributing](../contributing/guidelines/license.html). |
| 33 | + |
| 34 | +### Tips |
| 35 | + |
| 36 | +- The maintainers and reviewers are your friends. At times, programming can be very personal. However, it's important to realize that we all share a common goal, and that honest feedback is constructive feedback. |
| 37 | +- Larger contributions take longer to be accepted than smaller contributions. The best contributions are small and purposeful, achieving a single goal. You may be asked to split up a contribution if it contains multiple unrelated changes. |
| 38 | +- Consistency is an important aspect of a codebase. To ensure consistency in Mbed OS code, we have created contributing guidelines. Any contribution to Mbed OS needs to meet the following criteria: |
| 39 | + - Design and coding style: Be consistent with your changes. The existing style of a codebase overrules any personal preference. We define software design principles and coding style in [this document](../contributing/style.html). |
| 40 | + - Contributions guidance: The process and how we review contributions is described in the [workflow](../contributing/workflow.html) document. |
| 41 | + - Licenses: Licenses should comply with the [licenses described here](../contributing/license.html). |
8 | 42 |
|
9 | 43 | ### Access to the ARMmbed organization on GitHub
|
10 | 44 |
|
|
0 commit comments