Add support for multiple licenses in the header config section#118
Add support for multiple licenses in the header config section#118kezhenxu94 merged 2 commits intoapache:mainfrom
Conversation
|
Hi @dave-tucker thanks for your efforts and good finding for new use case. Comment inline.
This is a perfect example to have multiple sections for header config while it's weird to allow multiple sections for the entire .licenserc.yaml content as stated below.
Yes but So my opinion is to allow both object (HeaderConfig) and array ([]HeaderConfig) for header:
content: ...
paths: ...
# ...
dependency: # the same as before header:
- content: ...
paths: pkg1
# ...
- content: ...
paths: pkg2
# ...
dependency: # the same as before |
22f7dd0 to
79139df
Compare
|
Comments addressed and PR updated. I'm not sure it's possible to express in YAML "this field could be a dictionary, or a sequence" so instead I opted to change |
|
Hi, CI fails, please fix them first. |
bfdf58a to
fcf7b78
Compare
|
Sorry about that. I had an out-of-date |
Thanks! I will take another look soon. |
|
@dave-tucker Friendly ping. |
This allows for multiple `license` configurations to be contained within the same .licenserc.yaml file. The intended use is for a project that has multiple packages or modules with differing licenses. To do this we introduce a ConfigV2 config format since it is not valid YAML for a key to be either a dictionary or a sequence. We try to parse as V2 first, and fall back to V1. Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
fcf7b78 to
0fda7ad
Compare
|
Sorry for the delay. Review comments addressed. |
kezhenxu94
left a comment
There was a problem hiding this comment.
Thank you @dave-tucker , can you by the way share which repository will use this feature 😄 ?
|
This allows for multiple
licenseconfigurations to be containedwithin the same .licenserc.yaml file. The intended use is for a project
that has multiple packages or modules with differing licenses.
To do this we introduce a ConfigV2 config format since it is not valid
YAML for a key to be either a dictionary or a sequence.
We try to parse as V2 first, and fall back to V1.