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 file in src/batch.js #77

Open
wants to merge 13 commits into
base: f24
Choose a base branch
from
Open

Conversation

Hakaabi
Copy link

@Hakaabi Hakaabi commented Sep 3, 2024

Refactoring function 'processSortedSet' to reduce its Cognitive Complexity from 40 to the 15 allowed.

@coveralls
Copy link

coveralls commented Sep 3, 2024

Pull Request Test Coverage Report for Build 10716585717

Details

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

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

💛 - Coveralls

Copy link

sonarcloud bot commented Sep 5, 2024

@Hakaabi
Copy link
Author

Hakaabi commented Sep 5, 2024

Refactored the processSortedSet function to reduce cognitive complexity by breaking down parts of the code into a helper function. Resolves #9

@Hakaabi
Copy link
Author

Hakaabi commented Sep 5, 2024

I also made sure to write test cases to cover all the lines in NodeBB/src/batch.js (100% coverage)
Screenshot 2024-09-05 at 20 04 20

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