-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
travis: add PR license check for missing/not-valid license files #12437
Conversation
b88211f
to
aaa21ca
Compare
aaa21ca
to
02bc192
Compare
@0xc0170, thank you for your changes. |
df3182c
to
88b27f4
Compare
scancode is functional now ! We got 2 offenders in this branch and it found them. One is without license and one with non-permissive license 🎉 More testing ongoing |
What it reports if there is no license or non permissive:
|
0806e1b
to
077ecda
Compare
I cleaned up the branch (removed testing files), this is ready for review. @SeppoTakalo this one replaces gnu license check we had, we can now find out more non permissive licences in the codebase. |
I'll do one more test for changing file without SPDX identifier |
I add a reason for offenders, see:
|
5a2a6a8
to
5cc4a08
Compare
7c0c52f
to
dbd9b7a
Compare
OK, ready for review and I can squash the long history of nothing-but-fixes. It reports now the number of offenders: "Needs review, 2 license issues found". We will be monitoring this and reporting meanwhile the codebase gets cleaned up. Please review again (just the diff, not each commits, will be squashed into one) |
|
@adbridge Please review, I've just fixed printing the offenders (was skipped). I can squash this once approved and 2 files for testing removed. |
drivers/CAN.h
Outdated
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where has the license header gone here ?
drivers/internal/AsyncOp.h
Outdated
@@ -1,6 +1,5 @@ | |||
/* | |||
* Copyright (c) 2018-2019, Arm Limited and affiliates. | |||
* SPDX-License-Identifier: Apache-2.0 | |||
* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why has SPDX line gone ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
testing purpose (to see what travis reportS) as stated earlier. I'l lrevert this with rebase
Master branch contains lot of missing SPDX identifiers, we will clean them up but this will take some time. In the meantime, we should not increase the license missing files. Each PR will report if there is no license issue or positive number reported as Github status. Travis won't fail if there are issues. This will highlight the issues that anyone can fix. As soon as master is clean, we can fix set_status and revert part of this commit.
56646c3
to
a0248c1
Compare
Rebased, the test files removed, history cleaned up. |
Pull request has been modified.
CI started |
Test run: SUCCESSSummary: 11 of 11 test jobs passed |
Summary of changes
The goal: check license offenders in pull requests
This is similar to what astyle does in Travis. We get list of files being changed. Because scancode does not support list of files being scanned but rather a file or directory, we copy files to SCANCODE folder. Execute scancode license check in this folder and check for offenders.
The rules there are: code files must have a license and SDPX identifier. If they don't, we print these files with their licenses and request review (Travis fails).
There is currently no ignore list as we have for astyle. I believe all code files in our codebase should have valid license (even if they are 3rd party).
Impact of changes
Migration actions required
Documentation
Pull request type
Test results
Reviewers