Skip to content

Refactor high-complexity methods in parent-child merging logic #445

@oocx

Description

@oocx

Summary

Several methods in the parent-child resource grouping feature have cognitive complexity above the threshold (15), which could impact long-term maintainability.

Affected Methods

Method File Complexity Threshold
MergeParentChildRelationships ReportModelBuilder.ParentChildMerging.cs 23 15
BuildInlineRows ReportModelBuilder.ParentChildMerging.cs 24 15
AddResourceReferences ConfigurationReferenceResolver.cs 20 15

Recommendation

Extract distinct sub-operations into helper methods to reduce complexity and improve readability for future maintainers.

Priority: Low
Effort: Medium
Impact: Code maintainability improvement

Related Work

Notes

This is a code quality improvement suggestion, not a functional issue. The current implementation is well-commented and tested; complexity is manageable but could be improved for future development.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions