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 code in src/groups/update.js #81

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

Conversation

mohamed-elzeni
Copy link
Member

@mohamed-elzeni mohamed-elzeni commented Sep 4, 2024

Issue: The function Groups.update in file src/groups/update.js has a complex control flow, causing its Cognitive Complexity on SonarCloud to reach 27, which is higher than the allowed 15. resolves #43

Fix: This reduces the Cognitive Complexity of Groups.update by refactoring it into smaller, easier-to-manage pieces. This was tested by the linting and testing suite and SonarCloud.

@mohamed-elzeni mohamed-elzeni changed the title Refactor src/groups/update.js Refactor code in src/groups/update.js Sep 4, 2024
@coveralls
Copy link

coveralls commented Sep 4, 2024

Pull Request Test Coverage Report for Build 10725703641

Details

  • 19 of 19 (100.0%) changed or added relevant lines in 1 file are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage increased (+0.01%) to 82.681%

Files with Coverage Reduction New Missed Lines %
src/meta/errors.js 1 76.74%
Totals Coverage Status
Change from base Build 10550029021: 0.01%
Covered Lines: 22326
Relevant Lines: 25585

💛 - Coveralls

Copy link

sonarqubecloud bot commented Sep 5, 2024

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.

Refactoring code in src/groups/update.js
2 participants