Skip to content

Sort Overdue list based on return_score#5764

Open
siddh1004 wants to merge 5 commits intomasterfrom
siddharth-agarwal/SIMPLEMOB-25
Open

Sort Overdue list based on return_score#5764
siddh1004 wants to merge 5 commits intomasterfrom
siddharth-agarwal/SIMPLEMOB-25

Conversation

@siddh1004
Copy link
Contributor

@simple-services simple-services requested a review from a team March 26, 2026 08:44
@github-actions github-actions bot enabled auto-merge (squash) March 26, 2026 08:45
@qltysh
Copy link

qltysh bot commented Mar 26, 2026

❌ 9 blocking issues (9 total)

Tool Category Rule Count
qlty Structure Function with many parameters (count = 10): from 6
qlty Structure Function with many returns (count = 3): sort 1
qlty Structure Complex binary expression 1
qlty Structure Deeply nested control flow (level = 2) 1

addAll(mapToSorted(topRemaining, OverdueBucket.TOP_20))
addAll(mapToSorted(nextRemaining, OverdueBucket.NEXT_30))
addAll(mapToSorted(rest, OverdueBucket.REMAINING))
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function with many returns (count = 3): sort [qlty:return-statements]

returnScore: Float?,
bucket: OverdueBucket?
) {
if (returnScore != null && bucket != null) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Complex binary expression [qlty:boolean-logic]

val bucketText = when (bucket) {
OverdueBucket.TOP_20 -> "Top 20%"
OverdueBucket.NEXT_30 -> "Next 30%"
OverdueBucket.REMAINING -> "Remaining"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deeply nested control flow (level = 2) [qlty:nested-control-flow]

selectedOverdueAppointments: Set<UUID>,
isPatientReassignmentFeatureEnabled: Boolean,
showDebugValues: Boolean,
locale: Locale,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function with many parameters (count = 10): from [qlty:function-parameters]

selectedOverdueAppointments: Set<UUID>,
isPatientReassignmentFeatureEnabled: Boolean,
showDebugValues: Boolean,
locale: Locale,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function with many parameters (count = 9): pendingToCallItem [qlty:function-parameters]

isOverdueSelectAndDownloadEnabled: Boolean,
selectedOverdueAppointments: Set<UUID>,
isPatientReassignmentFeatureEnabled: Boolean,
showDebugValues: Boolean,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function with many parameters (count = 8): generatePendingAppointmentsContent [qlty:function-parameters]

selectedOverdueAppointments: Set<UUID>,
isPatientReassignmentFeatureEnabled: Boolean,
showDebugValues: Boolean = false,
debugMap: Map<UUID, Pair<Float, OverdueBucket>> = emptyMap()
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function with many parameters (count = 10): expandedOverdueAppointmentList [qlty:function-parameters]

isAppointmentSelected: Boolean,
isPatientReassignmentFeatureEnabled: Boolean,
showDebugValues: Boolean,
debugMap: Map<UUID, Pair<Float, OverdueBucket>>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function with many parameters (count = 7): from [qlty:function-parameters]

scoreValue: Float = 0f,
createdAt: Instant = Instant.now(),
updatedAt: Instant = Instant.now(),
deletedAt: Instant? = null,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function with many parameters (count = 13): returnScore [qlty:function-parameters]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant