-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Fix broken license check script #61868
Conversation
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Size Change: 0 B Total Size: 1.75 MB ℹ️ View Unchanged
|
Flaky tests detected in 0b3ee7d. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/9193443596
|
For reference: gutenberg/packages/scripts/scripts/check-licenses.js Lines 68 to 73 in 8c3a688
Looking at the reported errors and the packages based on
The following ones need more clarification:
|
Maybe they are dependencies of the React Native-related CLI tools that are listed as production dependencies and, therefore, explicitly ignored. |
|
|
@gziolo This seems to be good to go now |
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.
It isn't ideal to keep growing the list of ignored libraries, but it's all very difficult to find a good middle-ground with React Native dependencies used during the development that are at the same part of the platform that produces production code 🤷🏻
Co-authored-by: swissspidy <swissspidy@git.wordpress.org> Co-authored-by: gziolo <gziolo@git.wordpress.org>
What?
While working on another PR I realized that the license check script isn't working correctly.
This fixes it.
Why?
Due to early
return
statements in thefor
loops, numerous dependencies were not actually checked, which led to the false assumption that all licenses are compatible when they are in fact not.How?
Replace early returns with
continue
insteadAlso fixes some incorrect output when
dep
is an empty object for instance.Testing Instructions
Run license check, see failing status.
Testing Instructions for Keyboard
Screenshots or screencast