Repository navigation
[dmt] fix: accept third-party SPDX MPL-2.0/Apache-2.0/MIT/BSD license headers - #488
Merged
Merged
Conversation
The license rule only accepted SPDX headers with Flant JSC as the copyright holder, so vendored code like "Copyright (c) HashiCorp, Inc. / SPDX-License-Identifier: MPL-2.0" was reported as invalid. Accept any copyright holder with MPL-2.0 or Apache-2.0; other identifiers (e.g. BUSL-1.1) are still rejected.
Third-party code under BSD-2-Clause/BSD-3-Clause (e.g. gogo/protobuf) was reported as having an unknown license. BSD headers vary in wording, holder names and line wrapping, so match them by required phrases ignoring whitespace instead of a strict template. Also increase the header read size to 4096 bytes to fit full BSD headers with a preamble.
Third-party code under the MIT license (e.g. ThalesIgnite/crypto11) was reported as having an unknown license. Match MIT headers by required phrases ignoring whitespace, like BSD.
Accept SPDX headers with MIT, BSD-2-Clause and BSD-3-Clause identifiers from any copyright holder, in addition to Apache-2.0 and MPL-2.0.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The license rule only accepted SPDX headers with Flant JSC as the copyright holder, so vendored code like "Copyright (c) HashiCorp, Inc. / SPDX-License-Identifier: MPL-2.0" was reported as invalid. Accept any copyright holder with MPL-2.0 or Apache-2.0; other identifiers (e.g. BUSL-1.1) are still rejected.
Also support MIT and BSD