Skip to content

Conversation

dwrth
Copy link
Contributor

@dwrth dwrth commented Aug 5, 2025

Summary

Changes

This PR fixes the code quality issues found by SonarCube mentioned in this ticket by refactoring the following:

Tracer.test.ts:

  • Mark the memberVariable of Lambda as readonly
  • Remove union type aliases on Subsegment instantiations

Tracer.ts:

  • Remove redundant return statement in setCaptureHTTPsRequests
  • Replace explicit return type from private method setOptions with this

Issue number: closes #4257


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@pull-request-size pull-request-size bot added the size/M PR between 30-99 LOC label Aug 5, 2025
@boring-cyborg boring-cyborg bot added tests PRs that add or change tests tracer This item relates to the Tracer Utility labels Aug 5, 2025
Copy link

boring-cyborg bot commented Aug 5, 2025

Thanks a lot for your first contribution! Please check out our contributing guidelines and don't hesitate to ask whatever you need.
In the meantime, check out the #typescript channel on our Powertools for AWS Lambda Discord: Invite link

Copy link
Contributor

@dreamorosi dreamorosi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the PR, I left only one comment - after it's addressed I'll be happy to merge it!

Copy link

sonarqubecloud bot commented Aug 5, 2025

@dreamorosi
Copy link
Contributor

Thank you for this PR and for helping making this project better!

We have a few other items similar to this in complexity and scope, if you're interested take a look here.

@dreamorosi dreamorosi merged commit 081a514 into aws-powertools:main Aug 5, 2025
34 checks passed
Copy link

boring-cyborg bot commented Aug 5, 2025

Awesome work, congrats on your first merged pull request and thank you for helping improve everyone's experience!

uttam282005 pushed a commit to uttam282005/powertools-lambda-typescript that referenced this pull request Aug 7, 2025
Co-authored-by: David <75678655+David-Werth@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/M PR between 30-99 LOC tests PRs that add or change tests tracer This item relates to the Tracer Utility
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Maintenance: Fix code quality issues in tracer package
2 participants