Skip to content

Refactoring file in src/batch.js #77

Open
Hakaabi wants to merge 13 commits into
CMU-17313Q:f24from
Hakaabi:fixref
Open

Refactoring file in src/batch.js #77
Hakaabi wants to merge 13 commits into
CMU-17313Q:f24from
Hakaabi:fixref

Conversation

@Hakaabi
Copy link
Copy Markdown

@Hakaabi Hakaabi commented Sep 3, 2024

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

@coveralls
Copy link
Copy Markdown

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

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Sep 5, 2024

@Hakaabi
Copy link
Copy Markdown
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
Copy Markdown
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