CMU-17313Q / NodeBB

GNU General Public License v3.0
0 stars 50 forks source link

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

Open mohamed-elzeni opened 2 months ago

mohamed-elzeni commented 2 months ago

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.

coveralls commented 2 months ago

Pull Request Test Coverage Report for Build 10725703641

Details


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

💛 - Coveralls
sonarcloud[bot] commented 2 months ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud