Skip to content
This repository has been archived by the owner on Dec 18, 2024. It is now read-only.

Refactoring SPDX check #551

Merged
merged 1 commit into from
May 9, 2023

Conversation

erikbosch
Copy link
Contributor

@erikbosch erikbosch commented May 8, 2023

Make sure that defined licenses are forwarded as arguments.
Increase scope of what is considered as comments
(Do not only check one-line comments)
Make sure to support comma separated list of comments

Example output checking for Apache or MIT

Prepare all required actions
Run ./.github/actions/spdx
Run $GITHUB_ACTION_PATH//verify-spdx-headers
2 will be accepted!
Allowed license: Apache-2.0
Allowed license: MIT
OK: Apache-2.0       /home/runner/work/kuksa.val/kuksa.val/kuksa-val-server/src/main.cpp
NO SPDX /home/runner/work/kuksa.val/kuksa.val/kuksa-val-server/test/unit-test/KuksavalUnitTest.cpp
OK: Apache-2.0       /home/runner/work/kuksa.val/kuksa.val/kuksa-val-server/test/unit-test/VssDatabaseTests.cpp
OK: Apache-2.0       /home/runner/work/kuksa.val/kuksa.val/kuksa_databroker/integration_test/test_databroker.py
OK: Apache-2.0       /home/runner/work/kuksa.val/kuksa.val/test/stresstest/broker.py
Traceback (most recent call last):
  File "/home/runner/work/kuksa.val/kuksa.val/./.github/actions/spdx//verify-spdx-headers", line 146, in <module>
    raise Exception("Check the output, some files have not the right licenses!")
Exception: Check the output, some files have not the right licenses!
Error: Process completed with exit code 1.

@erikbosch erikbosch marked this pull request as ready for review May 8, 2023 12:40
@erikbosch erikbosch requested a review from lukasmittag May 8, 2023 12:40
Copy link
Contributor

@lukasmittag lukasmittag left a comment

Choose a reason for hiding this comment

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

Other than my small comment fine. Thanks for the effort!

.github/actions/spdx/verify-spdx-headers Show resolved Hide resolved
Make sure that defined licenses are forwarded as arguments
Increase scope of what is considered as comments
(Do not only check one-line comments)
Make sure to support comma separated list of comments
@erikbosch erikbosch force-pushed the erikbosch/erik_spdx branch from 3b78a71 to d28cb99 Compare May 8, 2023 13:09
@erikbosch erikbosch requested a review from lukasmittag May 8, 2023 13:52
Copy link
Contributor

@lukasmittag lukasmittag left a comment

Choose a reason for hiding this comment

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

Looks good!

@lukasmittag lukasmittag merged commit bdc99d9 into eclipse:master May 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants