예제 #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'],
        ))
예제 #2
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'],
            )
        )

    if not is_regex_valid(hook_config.get('exclude', '')):
        raise InvalidManifestError(
            'Invalid exclude regex at {0}: {1}'.format(
                hook_config['id'], hook_config['exclude'],
            )
        )
예제 #3
0
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,
            )
        )
예제 #4
0
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,
            )
        )
예제 #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'],
            )
        )
예제 #6
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"]))