if not sorted_results:
return Lint(exit_code=0)
linter_to_reports = defaultdict(list)
for result in sorted_results:
if result.report:
linter_to_reports[result.linter_name].append(result.report)
if linter_to_reports:
// TODO(/): Tolerate when a linter has multiple reports.
linters_with_multiple_reports = [
linter for linter, reports in linter_to_reports.items() if len(reports) > 1
]
if linters_with_multiple_reports:
if lint_subsystem.per_target_caching:
After Change
all_results = tuple(sorted(all_results, key=lambda results: results.linter_name))
reports = list(itertools.chain.from_iterable(results.reports for results in all_results))
if reports:
// TODO(/): Tolerate when a linter has multiple reports.
linters_with_multiple_reports = [
results.linter_name for results in all_results if len(results.reports) > 1