private function validateExcludeRegex(string $path): bool
    {
        $excludeRegex = $this->config->getExcludeRegex();
        return $excludeRegex === null || Validator::regex($excludeRegex)->validate($path) !== true;
    }