You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Allow specifying --skip-license-insertion-comment multiple times #109
Allow specifying --skip-license-insertion-comment multiple times. If any of the specified comments is found in the top n lines, license insertion is skipped.
Motivation
I work in a repo where most files should be proprietary licensed, but there is a mix of old files with MIT/BSD/Apache license.
I would like to specify multiple license types to skip such as
'--skip-license-insertion-comment=Licensed under the Apache License',
'--skip-license-insertion-comment=(BSD License 2.0)'
to skip license insertion to these files, which have usually been taken directly from open source.
The current behavior is that the second specification of the argument will override the first
Mildly tricky parts
Although I think this feature is simple/straightforward, I am unsure how this should interact with the current default license skip text (SKIP LICENSE INSERTION) as it seems difficult to do in a fully backwards compatible way. Options seem to be:
"SKIP LICENSE INSERTION" cannot be disabled. Any additional specifications of --skip-license-insertion-comment will be skipped in addition to "SKIP LICENSE INSERTION" (Breaking change if, for some reason, someone wants to have "SKIP LICENSE INSERTION" in the beginning of their files but not skip license insertion
"SKIP LICENSE INSERTION" is applied only if no instances of "--skip-license-insertion-comment" are specified (backwards compatible).
If the idea for the feature is approved I'm happy to make a PR
Activity