Skip to content

refactor: reduce cognitive complexity and simplify control flow in SpanFilterUtil for sonarqube errors - #1840

Merged
lbroudoux merged 2 commits into
microcks:1.13.xfrom
Caesarsage:fix/reduce-span-filter-util-complexity
Dec 5, 2025
Merged

lbroudoux merged 2 commits into
microcks:1.13.xfrom
Caesarsage:fix/reduce-span-filter-util-complexity

Conversation

@Caesarsage

Copy link
Copy Markdown
Contributor

Description

  • Reduces cognitive complexity from 18 to below 15 (fixes java:S3776)
  • Eliminates continue statement, using only one break (fixes java:S135)
  • Extract function for readability

Related issue(s)

part of #1714

@github-actions

Copy link
Copy Markdown

👋 @Caesarsage

Welcome to the Microcks community! 💖

Thanks and congrats 🎉 for opening your first pull request here! Be sure to follow the pull request template or please update it accordingly.

Hope you have a great time there!

🌟 ~~~~~~~~~ 🌟

📢 If you like Microcks, please ⭐ star ⭐ our repo to support it!

🙏 It really helps the project to gain momentum and credibility. It's a small contribution back to the project with a big impact.

@Caesarsage
Caesarsage force-pushed the fix/reduce-span-filter-util-complexity branch from 0febad8 to 9208118 Compare November 30, 2025 00:53
@Caesarsage

Copy link
Copy Markdown
Contributor Author

Hello @lbroudoux

Help review

@lbroudoux lbroudoux left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please check the comment. I doubt you started from a fresh 1.13.x fork.

@Caesarsage
Caesarsage force-pushed the fix/reduce-span-filter-util-complexity branch from 9208118 to 8535f01 Compare December 1, 2025 09:51
@Caesarsage
Caesarsage force-pushed the fix/reduce-span-filter-util-complexity branch from 8535f01 to c92c115 Compare December 1, 2025 10:17

@lbroudoux lbroudoux left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks all good to me! Thank you very much!

@lbroudoux lbroudoux added this to the 1.13.1 milestone Dec 4, 2025
@lbroudoux lbroudoux added kind/task java Pull requests that update Java code labels Dec 4, 2025
@lbroudoux
lbroudoux merged commit da4f89f into microcks:1.13.x Dec 5, 2025
@github-actions

github-actions Bot commented Dec 5, 2025

Copy link
Copy Markdown

🎉 @Caesarsage

You are now a Microcks community contributor! 💖

Thanks and congrats 🚀 on merging your first pull request! We are delighted and very proud of you! 👏

📢 If you're using Microcks in your organization, please add your company name to this list. 🙏 It really helps the project to gain momentum and credibility. It's a small contribution back to the project with a big impact.

If you need to know why and how to add yourself to the list, please read the blog post "Join the Microcks Adopters list and Empower the vibrant open source Community 🙌"

Kudos and please keep going, we need you 🙌

🌟 ~~~~~~~~~ 🌟

📢 If you like Microcks, please ⭐ star ⭐ our repo to support it!

🙏 It really helps the project to gain momentum and credibility. It's a small contribution back to the project with a big impact.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

java Pull requests that update Java code kind/task

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants