Skip to content

Fixing complexity issues in bookmarks (src/topics/bookmarks.js)#38

Open
nniknam1 wants to merge 5 commits into
CMU-17313Q:mainfrom
nniknam1:fixing-complexity-issues-in-bookmarks
Open

Fixing complexity issues in bookmarks (src/topics/bookmarks.js)#38
nniknam1 wants to merge 5 commits into
CMU-17313Q:mainfrom
nniknam1:fixing-complexity-issues-in-bookmarks

Conversation

@nniknam1
Copy link
Copy Markdown

@nniknam1 nniknam1 commented Sep 4, 2025

I resolved this issue: (9 Function with many returns (count = 8): exports) by refactoring the bookmarks.js module by moving inner functions out of the module.exports wrapper into standalone async functions. This eliminated the “function with many returns” Qlty smell and made the code cleaner and easier to maintain. I then verified the changes by running Qlty, lint/tests, and manually triggering the functions in a live NodeBB instance. Resolves #23

@coveralls
Copy link
Copy Markdown

coveralls commented Sep 6, 2025

Pull Request Test Coverage Report for Build 17518873924

Details

  • 35 of 38 (92.11%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.002%) to 78.531%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/topics/bookmarks.js 35 38 92.11%
Totals Coverage Status
Change from base Build 17514140671: 0.002%
Covered Lines: 24695
Relevant Lines: 29609

💛 - Coveralls

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.

P1B: Refactor (src/topics/bookmarks.js line 9 ):

2 participants