Skip to content
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

SBCQ180_Sonar_Reliability #994

Merged
merged 5 commits into from
Sep 13, 2024

Conversation

Rajandeep98
Copy link
Collaborator

Sonar: Issue: Reliability : Refactor this loop to do more than one iteration.

Description

files affecetd :

appointment-frontend/cypress/plugins/index.ts

Copy link
Collaborator

@josekudiyirippil josekudiyirippil left a comment

Choose a reason for hiding this comment

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

Sonarcloud is complaining about the while loop doing only 1 iteration. The code now does do 3 tries but we already do that through Cypress config file. Maybe it should be a if condition?

Copy link
Collaborator

@chrsamp chrsamp left a comment

Choose a reason for hiding this comment

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

That sounds good @josekudiyirippil. Since we are just catching, logging, and re-throwing the exception in the original code we don't even need an if statement, just keep the try/catch and remove the while(true) loop.

Copy link

@josekudiyirippil josekudiyirippil self-requested a review September 13, 2024 00:16
Copy link
Collaborator

@josekudiyirippil josekudiyirippil left a comment

Choose a reason for hiding this comment

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

looks good

@josekudiyirippil josekudiyirippil merged commit a4522c7 into bcgov:main Sep 13, 2024
3 of 5 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.

3 participants