Skip to content

Commit 1d59be0

Browse files
author
Amanda Butler
authored
Merge pull request #1235 from 0xc0170/fix_license_check
Add license PR checks + how to run it locally
2 parents 4b152f0 + 6e6478a commit 1d59be0

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

docs/contributing/guidelines/ci.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Travis configuration is located in the [.travis.yml](https://github.com/ARMmbed/
2424
- Features/netsocket.
2525
- **travis-ci/events** - Checks that Mbed OS compiles and run events tests.
2626
- **travis-ci/gitattributestest** - Checks there are no changes after clone. This checks that `.gitattributes` is used correctly.
27-
- **travis-ci/licence_check** - Checks there is no GPL license text in the code.
27+
- **travis-ci/licence_check** - Checks that there is only a permissive license in the files, including SPDX identifier.
2828
- **travis-ci/littlefs** - Tests littlefs without embedded hardware.
2929
- **travis-ci/tools-py2.7** - Runs Python tools tests with Python 2.7.
3030
- **travis-ci/psa-autogen** - Runs PSA SPM code generator.

docs/contributing/guidelines/license.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,22 @@ If you decide to use a different license for your work, follow the same pattern:
103103
104104
- If more than one license applies to the source file, use an SPDX license expression (see [SPDX Specification, Appendix IV](https://spdx.org/spdx-specification-21-web-version#h.jxpfx0ykyb60)), to reflect the presence of multiple licenses in your *LICENSE.md* file and in each source file.
105105
106+
## License check in pull requests
107+
108+
We use scancode-toolkit to enforce the license in binaries and libraries. Please see "Continuous integration (CI) testing" section for more information.
109+
110+
To scan the files in the SCANCODE folder, please use:
111+
112+
```
113+
scancode --license --json-pp mbed-os.json SCANCODE
114+
```
115+
116+
Run our script to check if files confirm to this license guide:
117+
118+
```
119+
python tools/test/travis-ci/scancode-evaluate.py -f mbed-os.json
120+
```
121+
106122
## Contributing to the Mbed OS codebase
107123
108124
### Mbed OS principles

0 commit comments

Comments
 (0)