How to use the xiblint.xibcontext.XibContext function in xiblint

To help you get started, we’ve selected a few xiblint 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 lyft / xiblint / xiblint / __main__.py View on Github external
def process_file(file_path, config):
    from xiblint.xibcontext import XibContext
    checkers = config.checkers(file_path)
    context = XibContext(file_path)
    if context.tree:
        for rule_name, klass in checkers.items():
            context.rule_name = rule_name
            rule_config = config.config_for_rule(file_path, rule_name)
            instance = klass(rule_config)
            instance.check(context)
    return context.errors