CMU-313 / NodeBB

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

Refactor public/src/client/header/unread.js #419

Open VeronicaPim opened 3 months ago

VeronicaPim commented 3 months ago

Refactor public/src/client/header/unread.js to reduce Cognitive Complexity from 21 to the 15 allowed. This issue is categorized under the "Adaptability" section and involves a critical "Code Smell."

Here is the warning this refactor will fix: https://sonarcloud.io/project/issues?assigned=false&cleanCodeAttributeCategories=ADAPTABLE&directories=public%2Fsrc%2Fclient%2Fheader&issueStatuses=OPEN%2CCONFIRMED&id=CMU-313_NodeBB&open=AZFmi_z7ybYwxy-_uEQ2&tab=code

PLEASE READ: You may notice that this is similar to #350, however, I didn't see that request when I submitted this issue because the name of the file is incorrect in 350. It says src/client/header/unread.js, but should be public/src/client/header/unread.js. This prevented me from finding issue 350 when I searched to see if this issue was already claimed. I got approval from the professor that this is okay.

VeronicaPim commented 3 months ago

I would like to work on this please!

github-actions[bot] commented 3 months ago

Great! I assigned you (@VeronicaPim) to the issue. Have fun working on it!