Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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