Skip to content

travis: license check for new files #13586

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

Merged
merged 1 commit into from
Sep 17, 2020

Conversation

0xc0170
Copy link
Contributor

@0xc0170 0xc0170 commented Sep 10, 2020

Summary of changes

We only warned about SPDX identifiers. We should error if new file is not properly licensed. I added travis check for new files and exclude from the current check. Thus we run 2 checks within one status. we warn for modified files (still clean up required) and error for new files.

I'll test some commits to verify this works. If this works, I can apply the same to astyle - also for new files it is mandatory to be following our style (3rd party could be added to astyleignore).

Impact of changes

Migration actions required

Documentation


Pull request type

[x] Patch update (Bug fix / Target update / Docs update / Test update / Refactor)
[] Feature update (New feature / Functionality change / New API)
[] Major update (Breaking change E.g. Return code change / API behaviour change)

Test results

[] No Tests required for this change (E.g docs only update)
[x] Covered by existing mbed-os tests (Greentea or Unittest)
[] Tests / results supplied as part of this PR

Reviewers


@ciarmcom ciarmcom added the release-type: patch Indentifies a PR as containing just a patch label Sep 10, 2020
@ciarmcom ciarmcom requested a review from a team September 10, 2020 11:30
@ciarmcom
Copy link
Member

@0xc0170, thank you for your changes.
@ARMmbed/mbed-os-maintainers please review.

@0xc0170 0xc0170 force-pushed the fix_travis_new_files branch from ebec495 to 2a03918 Compare September 10, 2020 11:41
@0xc0170 0xc0170 changed the title WIP: travis: license check for new files travis: license check for new files Sep 14, 2020
@0xc0170
Copy link
Contributor Author

0xc0170 commented Sep 14, 2020

@adbridge Please review (see the failures), it works as expected. I'll rebase and squash once reviewed to let this green.

adbridge
adbridge previously approved these changes Sep 15, 2020
Copy link
Contributor

@adbridge adbridge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks OK as far as I can tell

@mergify mergify bot added needs: CI and removed needs: review labels Sep 15, 2020
Fail if new file does not contain SPDX identifier. We only checked for changed files,
and warn if any found. This is not sufficient because new files should follow our license guide.

This fixes the problem.
@0xc0170 0xc0170 force-pushed the fix_travis_new_files branch from dfee8a2 to 36bb124 Compare September 15, 2020 11:34
@0xc0170
Copy link
Contributor Author

0xc0170 commented Sep 15, 2020

Rebased to squash the commits and remove testing commits. Ready for CI

@mergify mergify bot dismissed adbridge’s stale review September 15, 2020 11:35

Pull request has been modified.

@0xc0170
Copy link
Contributor Author

0xc0170 commented Sep 16, 2020

CI started

@0xc0170 0xc0170 requested review from a team and removed request for a team September 17, 2020 07:16
@0xc0170
Copy link
Contributor Author

0xc0170 commented Sep 17, 2020

@adbridge if approved, please merge. I'll rebase and fix the other pull request related to Travis I created yesterday.

@adbridge adbridge merged commit fdab61d into ARMmbed:master Sep 17, 2020
@mbedmain mbedmain added release-version: 6.4.0 Release-pending and removed release-type: patch Indentifies a PR as containing just a patch labels Oct 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants