How to use the rpmlint.filter.Filter 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 / test / test_build_date.py View on Github external
def builddatecheck():
    CONFIG.info = True
    output = Filter(CONFIG)
    test = BuildDateCheck(CONFIG, output)
    return output, test
github rpm-software-management / rpmlint / test / test_readelf_parser.py View on Github external
def binariescheck():
    CONFIG.info = True
    output = Filter(CONFIG)
    test = BinariesCheck(CONFIG, output)
    return output, test
github rpm-software-management / rpmlint / test / test_pam_check.py View on Github external
def pamcheck():
    CONFIG.info = True
    output = Filter(CONFIG)
    test = PamCheck(CONFIG, output)
    return output, test
github rpm-software-management / rpmlint / test / test_doc.py View on Github external
def doccheck():
    CONFIG.info = True
    output = Filter(CONFIG)
    test = DocCheck(CONFIG, output)
    return output, test
github rpm-software-management / rpmlint / test / test_FHS.py View on Github external
def fhscheck():
    CONFIG.info = True
    output = Filter(CONFIG)
    test = FHSCheck(CONFIG, output)
    return output, test
github rpm-software-management / rpmlint / test / test_zip.py View on Github external
def zipcheck():
    CONFIG.info = True
    output = Filter(CONFIG)
    test = ZipCheck(CONFIG, output)
    return output, test
github rpm-software-management / rpmlint / test / test_ldd_parser.py View on Github external
def binariescheck():
    CONFIG.info = True
    output = Filter(CONFIG)
    test = BinariesCheck(CONFIG, output)
    return output, test
github rpm-software-management / rpmlint / test / test_binaries.py View on Github external
def test_only_non_binary_in_usr_lib_exception(tmpdir, package, binariescheck):
    CONFIG.configuration['UsrLibBinaryException'] = '^/usr/lib(64)?/python'
    output = Filter(CONFIG)
    test = BinariesCheck(CONFIG, output)
    test.check(get_tested_package(package, tmpdir))
    out = output.print_results(output.results)
    assert 'W: only-non-binary-in-usr-lib' not in out
github rpm-software-management / rpmlint / scripts / lint.py View on Github external
def main():

    # we'll try to sort with locale settings, but we don't fail if not possible
    with contextlib.suppress(locale.Error):
        locale.setlocale(locale.LC_COLLATE, '')

    output = Filter(cfg)

    # Load all checks
    for c in cfg.configuration['Checks']:
        loadCheck(c, cfg, output)

    packages_checked = 0
    specfiles_checked = 0

    try:
        # Loop over all file names given in arguments
        dirs = []
        for arg in args:
            pkgs = []
            isfile = False
            try:
                if arg == '-':