diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-05-05 17:29:12 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-05-05 17:29:12 +0900 |
| commit | 49b0884701a84731652fc934d428932ff6029bd4 (patch) | |
| tree | 7477029b8ed686b9b3b06d960cab2b54ba87b579 /crates/mozart/src/commands/run_script.rs | |
| parent | 4623874d1c95414dcd5ae194d2561f2d98b40982 (diff) | |
| download | php-mozart-49b0884701a84731652fc934d428932ff6029bd4.tar.gz php-mozart-49b0884701a84731652fc934d428932ff6029bd4.tar.zst php-mozart-49b0884701a84731652fc934d428932ff6029bd4.zip | |
chore: remove redundant comments
Diffstat (limited to 'crates/mozart/src/commands/run_script.rs')
| -rw-r--r-- | crates/mozart/src/commands/run_script.rs | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/crates/mozart/src/commands/run_script.rs b/crates/mozart/src/commands/run_script.rs index ab07b84..4292809 100644 --- a/crates/mozart/src/commands/run_script.rs +++ b/crates/mozart/src/commands/run_script.rs @@ -29,8 +29,6 @@ pub struct RunScriptArgs { pub list: bool, } -// ─── Constants ──────────────────────────────────────────────────────────────── - const ALLOWED_SCRIPT_EVENTS: &[&str] = &[ "pre-install-cmd", "post-install-cmd", @@ -72,8 +70,6 @@ const ALL_SCRIPT_EVENTS: &[&str] = &[ "pre-file-download", ]; -// ─── Main entry point ──────────────────────────────────────────────────────── - pub async fn execute( args: &RunScriptArgs, cli: &super::Cli, @@ -152,8 +148,6 @@ pub async fn execute( Ok(()) } -// ─── Script loading ─────────────────────────────────────────────────────────── - #[allow(clippy::type_complexity)] fn load_scripts( working_dir: &Path, @@ -197,8 +191,6 @@ fn load_scripts( Ok((scripts, descriptions)) } -// ─── List scripts ───────────────────────────────────────────────────────────── - fn list_scripts( scripts: &BTreeMap<String, Vec<String>>, descriptions: &BTreeMap<String, String>, @@ -214,8 +206,6 @@ fn list_scripts( Ok(()) } -// ─── Script execution ───────────────────────────────────────────────────────── - #[allow(clippy::too_many_arguments)] fn run_script( script_name: &str, @@ -453,8 +443,6 @@ fn wait_with_timeout( } } -// ─── Bin dir resolution ─────────────────────────────────────────────────────── - fn resolve_bin_dir(working_dir: &Path, composer: &mozart_core::composer::Composer) -> PathBuf { // bin-dir's `{$vendor-dir}` placeholder is already resolved by Composer::load. let bin_dir = composer @@ -465,8 +453,6 @@ fn resolve_bin_dir(working_dir: &Path, composer: &mozart_core::composer::Compose working_dir.join(bin_dir) } -// ─── Classifier functions ───────────────────────────────────────────────────── - fn is_php_callback(entry: &str) -> bool { let trimmed = entry.trim(); if trimmed.contains(' ') { @@ -500,8 +486,6 @@ fn is_putenv(entry: &str) -> bool { entry.starts_with("@putenv ") } -// ─── Tests ─────────────────────────────────────────────────────────────────── - #[cfg(test)] mod tests { use super::*; @@ -515,8 +499,6 @@ mod tests { } } - // ── Classifier tests ────────────────────────────────────────────────────── - #[test] fn test_is_php_callback_static_method() { assert!(is_php_callback("MyClass::myMethod")); @@ -566,8 +548,6 @@ mod tests { assert!(is_composer_prefix("@composer install")); } - // ── load_scripts tests ──────────────────────────────────────────────────── - #[test] fn test_load_scripts_array_form() { let dir = tempfile::tempdir().unwrap(); @@ -641,8 +621,6 @@ mod tests { assert_eq!(post_entries.len(), 2); } - // ── list_scripts tests ──────────────────────────────────────────────────── - #[test] fn test_list_scripts_output() { let mut scripts = BTreeMap::new(); @@ -657,8 +635,6 @@ mod tests { assert!(result.is_ok()); } - // ── run_shell_command tests ─────────────────────────────────────────────── - #[test] fn test_run_shell_command_success() { let dir = tempfile::tempdir().unwrap(); |
