Beispiel #1
0
def validate_files(hook_config):
    if not is_regex_valid(hook_config['files']):
        raise InvalidManifestError('Invalid files regex at {}: {}'.format(
            hook_config['id'],
            hook_config['files'],
        ))

    if not is_regex_valid(hook_config.get('exclude', '')):
        raise InvalidManifestError('Invalid exclude regex at {}: {}'.format(
            hook_config['id'],
            hook_config['exclude'],
        ))
def validate_files(hook_config):
    if not is_regex_valid(hook_config['files']):
        raise InvalidManifestError(
            'Invalid files regex at {0}: {1}'.format(
                hook_config['id'], hook_config['files'],
            )
        )

    if not is_regex_valid(hook_config.get('exclude', '')):
        raise InvalidManifestError(
            'Invalid exclude regex at {0}: {1}'.format(
                hook_config['id'], hook_config['exclude'],
            )
        )
def try_regex(repo, hook, value, field_name):
    if not is_regex_valid(value):
        raise InvalidConfigError(
            'Invalid {0} regex at {1}, {2}: {3}'.format(
                field_name, repo, hook, value,
            )
        )
def try_regex(repo, hook, value, field_name):
    if not is_regex_valid(value):
        raise InvalidConfigError(
            'Invalid {} regex at {}, {}: {}'.format(
                field_name, repo, hook, value,
            )
        )
Beispiel #5
0
def validate_files(hook_config):
    if not is_regex_valid(hook_config['files']):
        raise InvalidManifestError(
            'Invalid files regex at {0}: {1}'.format(
                hook_config['id'],
                hook_config['files'],
            )
        )
def validate_files(hook_config):
    if not is_regex_valid(hook_config["files"]):
        raise InvalidManifestError("Invalid files regex at {0}: {1}".format(hook_config["id"], hook_config["files"]))