CMU-313 / NodeBB

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

Refactor src/notifications.js to reduce cognitive complexity from 16 to 15 #578

Open ay0503 opened 2 months ago

ay0503 commented 2 months ago

Reduced the cognitive complexity of notification.js by reducing the nesting level within the ForEach callback of the notifications list. As a result, the code is a bit more modular and easier to read through the division of multiple helpers.

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

coveralls commented 2 months ago

Pull Request Test Coverage Report for Build 10730576039

Details


Changes Missing Coverage Covered Lines Changed/Added Lines %
src/notifications.js 7 8 87.5%
<!-- Total: 7 8 87.5% -->
Totals Coverage Status
Change from base Build 10607818019: 0.0%
Covered Lines: 22324
Relevant Lines: 25583

💛 - Coveralls