Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactoring code in src/topics/tools.js to reduce Cognitive Complexity #78

Open
QGRRK opened this issue Jan 22, 2025 · 2 comments · May be fixed by #82
Open

Refactoring code in src/topics/tools.js to reduce Cognitive Complexity #78

QGRRK opened this issue Jan 22, 2025 · 2 comments · May be fixed by #82
Assignees

Comments

@QGRRK
Copy link

QGRRK commented Jan 22, 2025

The current Cognitive Complexity of the function "toggleDelete" in src/topics/tools.js is 17, which exceeds the allowed limit of 15. The problem should be solved after moving some if statements out of the function by adding helper functions.

SonarCloud Warning: Refactor this function to reduce its Cognitive Complexity.
Approach: Use helper functions to reduce complexity

@QGRRK
Copy link
Author

QGRRK commented Jan 22, 2025

I would like to work on this please!

Copy link

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

@QGRRK QGRRK changed the title Refactoring code in src/topics/tools.js Refactoring code in src/topics/tools.js to reduce Cognitive Complexity Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant