Skip to content

P1B: Refactor (src/user/search.js:52): Deeply nested control flow (level 5) #191

@EnzoDing-rgb

Description

@EnzoDing-rgb

Uniqueness check

  • I have searched open issues and confirmed this file + smell is not already taken.

Full path to the JavaScript file

src/user/search.js

Function(s)/scope targeted

Deeply nested control flow reported at line 52 (Qlty: nesting level 5). Target the control-flow structure around that region (reduce nesting via early returns / extracted helpers as appropriate).

Relevant Qlty output

qlty smells --no-snippets src/user/search.js


src/user/search.js
  13  Function with many returns (count = 12): exports
  52  Deeply nested control flow (level = 5)
   2  High total complexity (count = 68)
  13  Function with high complexity (count = 68): exports
  29  Function with high complexity (count = 47): search
 136  Function with high complexity (count = 11): filterAndSortUids

node ➜ /workspaces/NodeBB (main) $

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions