From d71ef323179555b9a47e739ae4b515682905e871 Mon Sep 17 00:00:00 2001 From: Lucas Date: Thu, 28 Mar 2024 09:43:42 -0300 Subject: [PATCH] Inform user if parallelization is disabled at runtime and why --- src/Runner.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Runner.php b/src/Runner.php index 2f21edf482..db6a0ab5d7 100644 --- a/src/Runner.php +++ b/src/Runner.php @@ -410,11 +410,17 @@ private function run() // If verbosity is too high, turn off parallelism so the // debug output is clean. if (PHP_CODESNIFFER_VERBOSITY > 1) { + if ($this->config->parallel > 1) { + echo "Parallel processing disabled for clearer output at higher verbosity levels."; + } $this->config->parallel = 1; } // If the PCNTL extension isn't installed, we can't fork. if (function_exists('pcntl_fork') === false) { + if ($this->config->parallel > 1) { + echo "Parallel processing requires the 'pcntl' PHP extension. Falling back to single-thread execution."; + } $this->config->parallel = 1; }