-
-
Notifications
You must be signed in to change notification settings - Fork 579
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 new rule - using wildcard for similar headers #1842
Comments
@krutztq eventually license detection use a full diff, and does not use regex or globs so there are no wild cards (there used to be more or less something like wild cards in early versions, but that was not really useful nor efficient) so it was dropped quickly). That said in your example, I would assume that what you want to capture/not capture may be:
In this case you want a rule with this: ``For further information see LICENSE file.` as a text in a xxx.RULE fle and this data and an xxx.yml file:
|
Thanks for the quick reply. |
In the general case, This:
could make this more specific, if this were always pointing to a specific license. This could work if this is private code and a private detection rule. (From what I can see in public it comes with MIT or LGPL https://www.google.com/search?q="For further information see LICENSE file." and this exact wording is not common https://github.com/search?utf8=%E2%9C%93&q=%22For+further+information+see+LICENSE+file%22&type=Code )
You sure can use |
Note that its perfectly OK to have proprietary licenses in the public scancode-toolkit too... |
I am using your proposal with private detection rules, this works fine for my use case. I see the advantage of a license notice and will it discuss in my team. Thanks for the declaration! |
Description
Is it possible to create a rule with some kind of wildcard to handle license references?
Let's say we have a lot of files which all have a similar header, like:
/*
* <various comments>
* Copyright (c) 1999, Company XYZ
* All rights reserved. For further information see LICENSE file.
* <various authors>
*/
REST_OF_FILE
Is is possible to add one rule for the use case?
How should the RULE and yml files look like?
System configuration
For bug reports, it really helps us to know:
Ubuntu 18.04
3.1.1
download
The text was updated successfully, but these errors were encountered: