Repository navigation
Refactor ProtobufImporter & MockRequest: Reduce Sonar-reported Cognitive Complexity (Resolves #1714) - #1732
Conversation
Signed-off-by: rana-rajat <[email protected]>
…mplexity below 15 (Sonar fix) Signed-off-by: rana-rajat <[email protected]>
|
Hi @lbroudoux 👋 Thanks for your earlier feedback. I have now rebased my changes on the 1.13.x branch as suggested. Could you please review this PR and share your suggestions or feedback whenever convenient? Thanks a lot for your guidance 🙏 |
lbroudoux
left a comment
There was a problem hiding this comment.
It's looks good to me. Thanks for taking the time contributing these enhacements!
Signed-off-by: rana-rajat <[email protected]>
|
Hi @lbroudoux , thank you for the earlier approval The previous build failed due to spotless-maven-plugin formatting violations in MockRequest.java and ProtobufImporter.java. I have fixed these issues by running mvn spotless:apply and pushed the corrected changes. ✅ Could you please re-approve the PR so that the build can run again? |
|
Hi @lbroudoux, I noticed that the build is failing due to test failures in the microcks-async-minion module (maven-surefire-plugin). It doesn’t look related to my changes, since I’ve seen the same failures happening on other recent PRs as well. Could you please review this and provide suggestions on how to proceed? Thanks! |
|
Hi @lbroudoux, just following up on my earlier comment — the build is still failing due to the same test issues in the microcks-async-minion module. |
It's totally independant from your contribution. I'll check that once merged. Thanks again and thanks for your patience! |
|
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. |
Description
- Refactored
ProtobufImporterto reduce Sonar-reported Cognitive Complexity."package "with a defined constant to follow Sonar best practices.- Refactored
MockRequestconstructor to reduce Sonar-reported Cognitive Complexity (from 66 to below 15).Extracted helper methods for locale, headers, parameters, attributes, session, and user principal handling.
Simplified nested conditions and reduced method size for better readability and maintainability.
Verified functionality remains unchanged by running existing tests.
Confirmed Sonar-reported issues are resolved.
Related issue(s)
Resolves #1714
Sonar Report (before):


Sonar Report (After):

