CMU-313 / NodeBB

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

Refactored Code in public/src/admin/extend/widgets.js #590

Open dhanya-cmu opened 2 months ago

dhanya-cmu commented 2 months ago

This PR resolves https://github.com/CMU-313/NodeBB/issues/554, with the following sonar cloud warning: https://sonarcloud.io/project/issues?open=AZHAkAeb1341_VbvRHcj&id=dhanya-cmu_NodeBB

The code was refactored to not nest functions more than 4 levels deep. This was done by splitting up the problematic function and moving it outside the body of a main function.

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 10740415697

Details


Totals Coverage Status
Change from base Build 10607818019: 0.0%
Covered Lines: 22323
Relevant Lines: 25582

💛 - Coveralls
dhanya-cmu commented 2 months ago

The existing testing framework does not test the file I have chosen. Since it does not include tests similar to what my code needs to be tested, and we are not allowed to create our own testing framework, I have manually tested out my code. I did this by using the UI to perform tasks (tasks executed by the code in the file) and printed out statements to the console.