Skip to content

[dmt] fix: accept third-party SPDX MPL-2.0/Apache-2.0/MIT/BSD license headers - #488

Merged
trublast merged 4 commits into
mainfrom
fix/license-spdx-third-party
Oct 12, 2026
Merged

trublast merged 4 commits into
mainfrom
fix/license-spdx-third-party

Conversation

@trublast

@trublast trublast commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

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

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.
@trublast trublast changed the title [dmt] fix: accept third-party SPDX MPL-2.0/Apache-2.0 license headers [dmt] fix: accept third-party SPDX MPL-2.0/Apache-2.0/MIT/BSD license headers Oct 12, 2026
@trublast
trublast merged commit 596283f into main Oct 12, 2026
11 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant