Skip to content

Commit

Permalink
Update issue raiser function to calculate xpath onlt once
Browse files Browse the repository at this point in the history
Signed-off-by: patrickpa <[email protected]>
  • Loading branch information
patrickpa committed Nov 6, 2024
1 parent 09b8985 commit 0351ee0
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,9 @@ def _raise_lane_linkage_gap_issue(
checker_data.input_file_xml_root.getpath(previous_lane),
checker_data.input_file_xml_root.getpath(current_lane),
]
issue_xpaths = sorted(issue_xpaths)
sorted_issue_xpaths = sorted(issue_xpaths)

issue_xpaths_key = "-".join(issue_xpaths)
issue_xpaths_key = "-".join(sorted_issue_xpaths)

if issue_xpaths_key in raised_issue_xpaths:
logging.debug(
Expand All @@ -118,14 +118,14 @@ def _raise_lane_linkage_gap_issue(
checker_bundle_name=constants.BUNDLE_NAME,
checker_id=CHECKER_ID,
issue_id=issue_id,
xpath=checker_data.input_file_xml_root.getpath(previous_lane),
xpath=issue_xpaths[0],
description=f"First lane element",
)
checker_data.result.add_xml_location(
checker_bundle_name=constants.BUNDLE_NAME,
checker_id=CHECKER_ID,
issue_id=issue_id,
xpath=checker_data.input_file_xml_root.getpath(current_lane),
xpath=issue_xpaths[1],
description=f"Next lane element",
)

Expand Down

0 comments on commit 0351ee0

Please sign in to comment.