INNER CODE UNIT · Python
check_files
weaveworks/kubediff · kubedifflib/_diff.py:257
def check_files(paths, printer, config):
"""Check all files in 'paths' for differences to a Kubernetes cluster.
:param printer: Where differences are reported to as they are found.
:param dict config: Contains Kubernetes parsing and access configuration.
:return: True if there are differences, False otherwise.
"""
differences = 0
for path in iter_files(paths):
_, extension = os.path.splitext(path)
if extension not in [".yaml", ".yml"]:
continue
differences += check_file(printer, path, config)
printer.finish()
return bool(differences)