[STYLE] Simplify RegisterModel
Function in App
#16
Labels
style
Applies to issues or pull requests focusing on code style
RegisterModel
Function in App
#16
Description
The
RegisterModel
function ininternal/adminpanel/app.go
has a cyclomatic complexity of 84, far exceeding the recommended standard.Location
internal/adminpanel/app.go
Expected Style
Adherence to a cyclomatic complexity of 15 or below according to project standards.
Current Style
The current complexity of 84 suggests excessive decision-making processes embedded in the function.
Additional Context
High complexity indicates a potential need for significant design change.
Suggestions for Improvement
Refactoring could involve splitting the logic across multiple functions, simplifying loops, or using early returns to reduce nesting.
Environment
All development environments
Checklist
The text was updated successfully, but these errors were encountered: