Skip to content

Commit dc6ad9d

Browse files
committed
fix: resolve final 2 clippy uninlined_format_args in JS analysis
- Fix format string in extract_hook_dependencies method - Fix format string in lifecycle method detection - All remaining clippy warnings now resolved across entire workspace Fixed format strings: - Line 1422: format!("{}[^;]*?", hook_name) -> format!("{hook_name}[^;]*?") - Line 1461: format!("{}s*", method) -> format!("{method}s*") Full workspace clippy now passes without any warnings. Addresses CI Quality & Security check failures completely.
1 parent 08d6571 commit dc6ad9d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

crates/codeprism-lang-js/src/analysis.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1419,7 +1419,7 @@ impl JavaScriptAnalyzer {
14191419
}
14201420

14211421
fn extract_hook_dependencies(&self, content: &str, hook_name: &str) -> Vec<String> {
1422-
let pattern = format!(r"{}[^;]*?\[([^\]]*)\]", hook_name);
1422+
let pattern = format!(r"{hook_name}[^;]*?\[([^\]]*)\]");
14231423
if let Ok(regex) = Regex::new(&pattern) {
14241424
if let Some(captures) = regex.captures(content) {
14251425
let deps = captures.get(1).unwrap().as_str();
@@ -1458,7 +1458,7 @@ impl JavaScriptAnalyzer {
14581458

14591459
let mut found_methods = Vec::new();
14601460
for method in lifecycle_methods {
1461-
let pattern = format!(r"{}s*\(", method);
1461+
let pattern = format!(r"{method}s*\(");
14621462
if Regex::new(&pattern)?.is_match(content) {
14631463
found_methods.push(method.to_string());
14641464
}

0 commit comments

Comments
 (0)