You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(adt-mcp): extract resolveObjectUri helper to eliminate code duplication
Sonar Quality Gate was failing with 8.8% duplication (threshold 3%) due to
the identical quickSearch+exactMatch object URI resolution block repeated in
get-source, update-source, check-syntax, and run-unit-tests.
Extract into async resolveObjectUri() in utils.ts which:
- tries type-based resolveObjectUriFromType() first (zero network round-trip)
- falls back to quickSearch + exact-name match when type is unknown/unmapped
- returns undefined when the object cannot be found (caller handles error response)
Refactor all four tools to call resolveObjectUri() and remove the duplicated
inline quickSearch blocks. Unused extractObjectReferences / resolveObjectUriFromType
imports removed from the four tool files.
Agent-Logs-Url: https://github.com/abapify/adt-cli/sessions/4fdc9c4f-9d74-44f4-9dda-1f68dd2eb2c5
Co-authored-by: ThePlenkov <6381507+ThePlenkov@users.noreply.github.com>
0 commit comments