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

Refactor notification to reduce complexity #579

Open
wants to merge 4 commits into
base: f24
Choose a base branch
from

Conversation

AliceeLe
Copy link

@AliceeLe AliceeLe commented Sep 6, 2024

In the SonarCloud warning, the code complexity for the function Notifications.getMultiple is 16, which exceeds the threshold 15. Hence, to reduce code complexity, I modularize a segment of the code and move it into a separate function called cleanPath(notification). In doing so, I reduce the responsibility of Notifications.getMultiple, making it easier to maintain in the future.

@coveralls
Copy link

coveralls commented Sep 6, 2024

Pull Request Test Coverage Report for Build 10730923402

Details

  • 16 of 17 (94.12%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.002%) to 82.673%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/notifications.js 16 17 94.12%
Totals Coverage Status
Change from base Build 10607818019: 0.002%
Covered Lines: 22328
Relevant Lines: 25587

💛 - Coveralls

Copy link

sonarcloud bot commented Sep 6, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
1 Security Hotspot

See analysis details on SonarCloud

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.

2 participants