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 to reduce cognitive complexity of Flags.validate function in src/flags.js #134

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

rmurugan58
Copy link

The code of the Flags.validate function within the file src/flags.js was refactored to reduce the cognitive complexity from 18 to 15. This was done by splitting up error blocks, adding helper functions, and reducing if-else statements. The refactored code is included in existing test coverage and all changed code passes the current test suite. The code has also been tested and verified through the UI using console logs. This change Resolves #52

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactoring code to reduce cognitive complexity in src/flags.js
1 participant