Skip to content

Commit

Permalink
[python] delete dead code
Browse files Browse the repository at this point in the history
Summary: It's dead.

Reviewed By: ngorogiannis

Differential Revision: D20626109

fbshipit-source-id: 7e525092a
  • Loading branch information
jvillard authored and facebook-github-bot committed Mar 26, 2020
1 parent d4a154f commit b720c2c
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions infer/lib/python/inferlib/issues.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,13 +214,6 @@ def print_and_save_errors(infer_out, project_root, json_report, bugs_out,
file_out.write(_pmd_xml_of_issues(errors))


def merge_reports_from_paths(report_paths):
json_data = []
for json_path in report_paths:
json_data.extend(utils.load_json_from_path(json_path))
return _sort_and_uniq_rows(json_data)


def _pmd_xml_of_issues(issues):
if etree is None:
print('ERROR: "lxml" Python package not found.')
Expand Down Expand Up @@ -267,14 +260,3 @@ def _pmd_xml_of_issues(issues):
file_node.append(violation)
root.append(file_node)
return etree.tostring(root, pretty_print=True, encoding=config.CODESET)


def _sort_and_uniq_rows(l):
key = operator.itemgetter(JSON_INDEX_FILENAME,
JSON_INDEX_LINE,
JSON_INDEX_HASH,
JSON_INDEX_QUALIFIER)
l.sort(key=key)
groups = itertools.groupby(l, key)
# guaranteed to be at least one element in each group
return map(lambda (keys, dups): dups.next(), groups)

0 comments on commit b720c2c

Please sign in to comment.