From 632c9793927a30c4bca3c91888e66b369d732dfe Mon Sep 17 00:00:00 2001 From: nsfisis Date: Mon, 8 Jun 2026 04:22:49 +0900 Subject: feat(phase-c): resolve PhpMixed-conversion phase-b TODOs Implement the foundational PhpMixed conversion infrastructure (From, order-sensitive PartialEq matching PHP ===) and resolve the category-G phase-b TODOs that depend on it: - Fix VCS driver cache paths that discarded parsed JSON or diverged on null caches (svn/forgejo/gitlab/git-bitbucket/github). - Wire up real conversions previously stubbed or dropped: suggests platform config, audit ignore-severities, composer_repository search and ProviderInfo, class_loader prefix/classmap merges, locker lock diff comparison, advisory JSON serialization, SPDX license fields. - Make GenericRule take a typed ReasonData; populate RULE_ROOT_REQUIRE with the constraint and convert PhpMixed at the call sites. --- crates/shirabe/src/command/audit_command.rs | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) (limited to 'crates/shirabe/src/command/audit_command.rs') diff --git a/crates/shirabe/src/command/audit_command.rs b/crates/shirabe/src/command/audit_command.rs index 2d25052..20532f1 100644 --- a/crates/shirabe/src/command/audit_command.rs +++ b/crates/shirabe/src/command/audit_command.rs @@ -113,10 +113,19 @@ impl AuditCommand { let abandoned = abandoned.unwrap_or_else(|| audit_config.audit_abandoned.clone()); - let ignore_severities = array_merge( - array_fill_keys(input.borrow().get_option("ignore-severity"), PhpMixed::Null), - PhpMixed::from(audit_config.ignore_severity_for_audit.clone()), - ); + let mut ignore_severities: indexmap::IndexMap> = + indexmap::IndexMap::new(); + let cli_severities = input.borrow().get_option("ignore-severity"); + if let Some(list) = cli_severities.as_list() { + for sev in list { + if let Some(s) = sev.as_string() { + ignore_severities.insert(s.to_string(), None); + } + } + } + for (k, v) in audit_config.ignore_severity_for_audit.clone() { + ignore_severities.insert(k, v); + } let ignore_unreachable = input .borrow() .get_option("ignore-unreachable") @@ -125,8 +134,6 @@ impl AuditCommand { || audit_config.ignore_unreachable; let audit_format = self.get_audit_format(input, "format")?; - // TODO(phase-b): ignore_severities is PhpMixed; need conversion to IndexMap> - let _ = ignore_severities; Ok(auditor .audit( &mut *self.get_io().borrow_mut(), @@ -136,7 +143,7 @@ impl AuditCommand { false, audit_config.ignore_list_for_audit.clone(), &abandoned, - indexmap::IndexMap::new(), + ignore_severities, ignore_unreachable, audit_config.ignore_abandoned_for_audit.clone(), )? -- cgit v1.3.1