Skip to content

Simplify redundant conditional in create_instrumented_span#8

Merged
johngallagher merged 1 commit into
claude/fix-code-smells-o11wKfrom
claude/fix-create-span-conditional-o11wK
Mar 9, 2026
Merged

Simplify redundant conditional in create_instrumented_span#8
johngallagher merged 1 commit into
claude/fix-code-smells-o11wKfrom
claude/fix-create-span-conditional-o11wK

Conversation

@johngallagher

Copy link
Copy Markdown
Contributor

Removes the redundant if/else branch in create_instrumented_span that produced identical results for both conditions. The method name splitting and qualified name construction is the same regardless of separator, so the branch was eliminated.

The if/else block assigned the same expression to span_name, function_name,
and method_name_only, calling split(/[#.]/).last twice in the true branch.
Replaced with two clear variables: method_name_only and qualified_name.

https://claude.ai/code/session_01KWZUse79XR68i6nGa8VgTu
@johngallagher johngallagher merged commit a93f312 into claude/fix-code-smells-o11wK Mar 9, 2026
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants