protected function validateModules(array $modules) : int
    {
        $result = 0;

        foreach ($modules as $module) {
            $this->info("Checking module $module", 2);

            $moduleResult = $this->runModuleChecks($module);

            $result += count($moduleResult['errors']);
            if (!$this->skipWarnings) {
                $this->printMessages('warn', $moduleResult['warnings']);
            }

            $this->printMessages('err', $moduleResult['errors']);
            $this->hr();
        }

        return $result;
    }