in taskcat/_cfn_lint.py [0:0]
def output_results(self): # noqa: C901
"""
Prints lint results to terminal using taskcat console formatting
:return:
"""
passed = set()
issue = {"warning": {}, "error": {}}
lints = self.lints[0]
for test in lints: # pylint: disable=consider-using-dict-items
for result in lints[test]["results"]:
if not lints[test]["results"][result]:
passed.add(result)
else:
if self._is_error(lints[test]["results"][result]):
if result in issue["error"]:
continue
issue["error"][result] = lints[test]["results"][result]
else:
if result in issue["warning"]:
continue
issue["warning"][result] = lints[test]["results"][result]
for filename in passed:
LOG.info(f"Linting passed for file: {filename}")
for filename, result_data in issue["warning"].items():
LOG.warning("---")
LOG.warning(f"Linting detected issues in: {filename}")
for result_message in result_data:
self._format_message(result_message, result_data)
for filename, result_data in issue["error"].items():
LOG.error("---")
LOG.error(f"Linting detected issues in: {filename}")
for result_message in result_data:
self._format_message(result_message, result_data)