How to use the rpmlint.AbstractCheck.AbstractCheck.known_checks.get function in rpmlint

To help you get started, we’ve selected a few rpmlint examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github rpm-software-management / rpmlint / scripts / lint.py View on Github external
def runChecks(pkg):

    if verbose:
        printInfo(pkg, 'checking')

    for name in Config.allChecks():
        check = AbstractCheck.AbstractCheck.known_checks.get(name)
        if check:
            check.verbose = verbose
            check.check(pkg)
        else:
            Pkg.warn('(none): W: unknown check %s, skipping' % name)
github rpm-software-management / rpmlint / scripts / lint.py View on Github external
def runSpecChecks(pkg, fname, spec_lines=None):

    if verbose:
        printInfo(pkg, 'checking')

    for name in Config.allChecks():
        check = AbstractCheck.AbstractCheck.known_checks.get(name)
        if check:
            check.verbose = verbose
            check.check_spec(pkg, fname, spec_lines)
        else:
            Pkg.warn('(none): W: unknown check %s, skipping' % name)