-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Add a lint for license files #21855
Add a lint for license files #21855
Conversation
0b85422
to
babae4d
Compare
babae4d
to
68caa62
Compare
@jgraham do you want to give this another look now that I've updated lint.ignore? It makes it a lot clearer what the current state of the repo is, at least. |
So I see the intent, but it seems like one effect might be that people add third party code without copying the license file in order to silence the lint. So instead of helping it will just cause a worse kind of problem. Can we require any If we want to specifically audit every license is acceptable and so require an explicit rule for each we could have two lint rules, one to check that the license exists and one for unaudited license. Then we should divide the allow list up into specific license types (MIT, BSD, etc.) so it's obvious what's acceptable. |
That would be bad, and does seem like a real risk.
I think that'd have to be an A problem I anticipate is that the existing
Do you mean that every LICENSE file that does exist and we should accept should still be a lint error, so that we have to list it? Like, |
This is following the directory structure used for webrtc in web-platform-tests/rfcs#46. Spotted via #21855.
Hmm, good point. I'm not sure. Might be easiest to hardcode special rules, unless you want to add a more generic mechanism.
I just meant in the ignore file having something like
So it wouldn't actually do any verification that the license is the right kind, but a human adding a dep could see what precedent exists, and a reviewer could manually verify the claim. |
LICENSE: compression/pako/LICENSE | ||
LICENSE: css/css-color/LICENSE | ||
LICENSE: css/css-ui/support/PTS/PngSuite.LICENSE | ||
LICENSE: css/CSS2/LICENSE-BSD |
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.
I've sent #23593 to remove these 3 files.
# Various license files. Do not add to this list without going through the RFC | ||
# process: https://github.com/web-platform-tests/rfcs | ||
LICENSE: compression/pako/LICENSE | ||
LICENSE: css/css-color/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.
James filed https://bugzilla.mozilla.org/show_bug.cgi?id=1637924 about this file.
|
||
# Various license files. Do not add to this list without going through the RFC | ||
# process: https://github.com/web-platform-tests/rfcs | ||
LICENSE: compression/pako/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.
I sent #23592 to move this into third_party
This is following the directory structure used for webrtc in web-platform-tests/rfcs#46. Spotted via #21855.
@@ -86,6 +86,11 @@ class AhemCopy(Rule): | |||
description = "Don't add extra copies of Ahem, use /fonts/Ahem.ttf" | |||
|
|||
|
|||
class LicenseFiles(Rule): | |||
name = "LICENSE" | |||
description = "Don't add new license files" |
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.
I think we need more context here. Maybe include "Do not add new third-party code without going through the RFC process". Otherwise, people might just add dependencies without LICENSE
.
…ty directory, a=testonly Automatic update from web-platform-tests [compression] move pako into a third_party directory (#23592) This is following the directory structure used for webrtc in web-platform-tests/rfcs#46. Spotted via web-platform-tests/wpt#21855. -- wpt-commits: 66e875b5d6bbd71ab24af9ca27d341f242f7a7cb wpt-pr: 23592
…ty directory, a=testonly Automatic update from web-platform-tests [compression] move pako into a third_party directory (#23592) This is following the directory structure used for webrtc in web-platform-tests/rfcs#46. Spotted via web-platform-tests/wpt#21855. -- wpt-commits: 66e875b5d6bbd71ab24af9ca27d341f242f7a7cb wpt-pr: 23592
I've stopped working on this, because it turned into a lint that needs to determine which directories exist and which files in them don't, which is unlike any other lint. The ignore rule would also have to be for a directory, which is also something we don't have. |
No description provided.