diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-05-04 14:48:25 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-05-04 15:44:11 +0900 |
| commit | d4309521f10b6f0090ef2548fb8f241949074e1f (patch) | |
| tree | 3c7fa9049b34e73e9a73e21bf19f8a3674c54c57 /crates/mozart/src/commands/validate.rs | |
| parent | a24d6e2f148417b32188cd1e643439a2858f4eac (diff) | |
| download | php-mozart-d4309521f10b6f0090ef2548fb8f241949074e1f.tar.gz php-mozart-d4309521f10b6f0090ef2548fb8f241949074e1f.tar.zst php-mozart-d4309521f10b6f0090ef2548fb8f241949074e1f.zip | |
feat(show): expand license output with name, OSI flag, and URL
Mirror Composer's Command\ShowCommand::printLicenses(): emit one line
per license identifier, expanded to "<full name> (<id>) [(OSI
approved)] <url>" when the id is in the SPDX database, or just the id
otherwise. The URL is built by mozart-spdx-licenses' new
LicenseInfo::url() so the construction lives in the SPDX crate, like
Composer's SpdxLicenses::getLicenseByIdentifier().
Diffstat (limited to 'crates/mozart/src/commands/validate.rs')
| -rw-r--r-- | crates/mozart/src/commands/validate.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/mozart/src/commands/validate.rs b/crates/mozart/src/commands/validate.rs index fd7a534..e6778a4 100644 --- a/crates/mozart/src/commands/validate.rs +++ b/crates/mozart/src/commands/validate.rs @@ -440,8 +440,8 @@ fn parse_iso_time_to_unix(s: &str) -> Option<i64> { tz_offset_seconds = 0; } else { let body = suffix - .strip_prefix('+') - .or_else(|| suffix.strip_prefix('-'))?; + .strip_prefix('+') + .or_else(|| suffix.strip_prefix('-'))?; let sign = if suffix.starts_with('+') { 1 } else { -1 }; let body: String = body.chars().filter(|c| *c != ':').collect(); if body.len() < 4 { |
