From c59a923669c57adbf6e5eecce7feae59afcf0aac Mon Sep 17 00:00:00 2001 From: nsfisis Date: Mon, 4 May 2026 14:30:22 +0900 Subject: feat(validate): warn on deprecated SPDX license identifiers Mirror Composer's Util\ConfigValidator::validate() license handling: treat empty string and empty array as missing, accept array form, and emit deprecation warnings (with GPL-specific -only/-or-later suggestions) for identifiers flagged deprecated in the SPDX database. --- crates/mozart-core/src/validation.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'crates/mozart-core/src') diff --git a/crates/mozart-core/src/validation.rs b/crates/mozart-core/src/validation.rs index 24f1705..7b97666 100644 --- a/crates/mozart-core/src/validation.rs +++ b/crates/mozart-core/src/validation.rs @@ -55,6 +55,10 @@ pub fn validate_license(s: &str) -> bool { mozart_spdx_licenses::spdx().validate(s) } +pub fn is_license_deprecated(s: &str) -> bool { + mozart_spdx_licenses::spdx().is_deprecated(s) +} + pub fn validate_autoload_path(s: &str) -> bool { AUTOLOAD_PATH_RE.is_match(s) } -- cgit v1.3.1