Skip to content

Refactor code in src/groups/update.js#81

Open
mohamed-elzeni wants to merge 7 commits into
CMU-17313Q:f24from
mohamed-elzeni:refactor-src/groups/update.js
Open

Refactor code in src/groups/update.js#81
mohamed-elzeni wants to merge 7 commits into
CMU-17313Q:f24from
mohamed-elzeni:refactor-src/groups/update.js

Conversation

@mohamed-elzeni
Copy link
Copy Markdown
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
Copy Markdown

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

@sonarqubecloud
Copy link
Copy Markdown

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