New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix Critical Sonar Issues #1833
Conversation
…is literal 'Space rocket <' 4 times.
…cating this literal 'Error connecting to MongoDB' 4 times.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the duplication. I raised a different PR for every sonar fix that I did. All the three PRs have a different fix. |
@ohbus Fixed the checkstyle violation. |
hello @ohbus please review the PRs as I would like to make more contributions once these get approved. Thanks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you so much for our efforts and your interest in our project.
Please provide the links to the sonar issues to get this PR approved.
You may bring the change from #1832 to here as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sims-keshri As you have changed the files, there seems to be a problem of not meeting code coverage.
Please implement test cases with a minimum of 80% coverage, whoever these minor changes should make you cover with a cent percent.
Looking forward to your contribution.
Thanks.
…cating this literal 'LITERAL 0' 4 times.
Hello @ohbus The coverage issue is not entirely due to the lines added by me. There are no tests for the file DbManager.java. Please see the coverage report here: https://sonarcloud.io/component_measures?id=iluwatar_java-design-patterns&metric=new_coverage&pullRequest=1833&selected=iluwatar_java-design-patterns%3Acaching%2Fsrc%2Fmain%2Fjava%2Fcom%2Filuwatar%2Fcaching%2FDbManager.java&view=list However after adding the changes from #1832 and #1831 the coverage is now 80%. |
Kudos, SonarCloud Quality Gate passed! |
Hello @ohbus can you please review this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🎉
Thank you so much for improving the code quality of our repository.
@all-contributors please add @sims-keshri for code |
I've put up a pull request to add @sims-keshri! 🎉 |
Thank you so much @ohbus. I would like to contribute more to this repository. Will hopefully add another PR soon to fix other sonar issues. |
Great @sims-keshri We are looking forward to your wonderful contributions. 🎉 |
* Resolve Sonar Code Smell: Define a constant instead of duplicating this literal 'Space rocket <' 4 times. * Resolve Sonar Critical Code Smell: Define a constant instead of duplicating this literal 'Error connecting to MongoDB' 4 times. * Fix checkstyle violation. * Resolve Sonar Critical Code Smell: Define a constant instead of duplicating this literal 'LITERAL 0' 4 times. Co-authored-by: Subhrodip Mohanta <hello@subho.xyz>
Resolve Sonar Critical Code Smell: Define a constant instead of duplicating this literal 'Error connecting to MongoDB' 4 times.
Links to the sonar issues that have been fixed as a part of this: