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

Reduce cognitive complexity in src/controllers/helpers.js #66

Open
wants to merge 1 commit into
base: f24
Choose a base branch
from

Conversation

aattiyah
Copy link

@aattiyah aattiyah commented Sep 3, 2024

I refactored the code in this file to reduce its cognitive complexity from 20 to the 15 allowed. I did this by adding a helper function handleSuccessfulResponse.

Resolves issue #34

Copy link

sonarcloud bot commented Sep 3, 2024

@coveralls
Copy link

Pull Request Test Coverage Report for Build 10677270369

Details

  • 14 of 14 (100.0%) changed or added relevant lines in 1 file are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage increased (+0.003%) to 82.674%

Files with Coverage Reduction New Missed Lines %
src/meta/errors.js 1 83.72%
Totals Coverage Status
Change from base Build 10550029021: 0.003%
Covered Lines: 22325
Relevant Lines: 25584

💛 - Coveralls

@aattiyah aattiyah changed the title reduce cognitive complexity Reduce cognitive complexity in src/controllers/helpers.js Sep 4, 2024
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