Skip to content

Conversation

omursahin
Copy link
Collaborator

No description provided.

@omursahin omursahin requested a review from arcuri82 October 12, 2025 16:51

fun getDisabledOracleCodesList(): List<FaultCategory> {
if (disabledOracleCodesList == null) {
val definedCategories = DefinedFaultCategory.values().asList()
Copy link
Collaborator

Choose a reason for hiding this comment

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

this is a long if statement, where the else is just a return. to avoid unnecessary nesting (which reduce code readability), the condition should be negated (eg if(disabledOracleCodeList != null)), and return immediately if so

disabledOracleCodesList = (disabledOracleCodesList!! + experimentalCategories).distinct()
}
}
return disabledOracleCodesList!!
Copy link
Collaborator

Choose a reason for hiding this comment

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

so, if user specifies some codes to skip, then the content of useExperimentalOracles is ignored? i don't think that would be correct. I think here a better approach is to change this function, to do not return a list of codes, but a boolean, something like isFaultCodeActive(fault): Boolean, so the logic has to be implemted only once

@omursahin omursahin requested a review from arcuri82 October 17, 2025 08:09
@arcuri82
Copy link
Collaborator

@omursahin thx, but this not what I meant. maybe it is easier if I fix it directly, ie, i ll take over this branch

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.

2 participants