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 support for multiple licenses in the header config section #118
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. |
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.
Thank you @dave-tucker , can you by the way share which repository will use this feature 😄 ?
|
This allows for multiple
license
configurations 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.