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 resolve issue #111 dealing with cognitive complexity #172

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

Conversation

tjpatel04
Copy link

@tjpatel04 tjpatel04 commented Jan 24, 2025

Created multiple helper functions to reduce complexity with conditional statements in code. Created a helperand function which was called at any instance when a conditional used "&&" and caused a warning. Created a helperor function which was called at any instance when a conditional used "||" and caused a warning. Helper functions reduced overall cognitive complexity from 19 to 15.

@coveralls
Copy link

coveralls commented Jan 24, 2025

Pull Request Test Coverage Report for Build 12941502315

Details

  • 7 of 7 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.001%) to 82.672%

Totals Coverage Status
Change from base Build 12896760049: 0.001%
Covered Lines: 22325
Relevant Lines: 25584

💛 - Coveralls

@tjpatel04 tjpatel04 changed the title used helper functions to reduce cognitive complexity Adding helper functions to resolve issue #172 Jan 24, 2025
@tjpatel04 tjpatel04 changed the title Adding helper functions to resolve issue #172 Adding helper functions to resolve issue #111 Jan 24, 2025
@tjpatel04 tjpatel04 changed the title Adding helper functions to resolve issue #111 Adding helper functions to resolve issue #111 dealing with cognitive complexity Jan 24, 2025
@tjpatel04 tjpatel04 changed the title Adding helper functions to resolve issue #111 dealing with cognitive complexity Refactoring code to resolve issue #111 dealing with cognitive complexity Jan 24, 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
Development

Successfully merging this pull request may close these issues.

2 participants