You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@yunikorn.apache.org by "SHIAO SZU CHEN (Jira)" <ji...@apache.org> on 2024/04/21 05:47:00 UTC

[jira] [Commented] (YUNIKORN-2181) remove named returns in checkQueueHierarchyForPlacement

    [ https://issues.apache.org/jira/browse/YUNIKORN-2181?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17839322#comment-17839322 ] 

SHIAO SZU CHEN commented on YUNIKORN-2181:
------------------------------------------

Hi [~chia7712], I would like to do this ticket. Could you assign to me ?

> remove named returns in checkQueueHierarchyForPlacement
> -------------------------------------------------------
>
>                 Key: YUNIKORN-2181
>                 URL: https://issues.apache.org/jira/browse/YUNIKORN-2181
>             Project: Apache YuniKorn
>          Issue Type: Improvement
>          Components: core - common
>            Reporter: Wilfred Spiegelenburg
>            Assignee: Chen, Kai-Chun
>            Priority: Minor
>              Labels: newbie
>
> In the {{pkg/common/configs/configvalidator.go}} the {{checkQueueHierarchyForPlacement}} function uses named return values. This can easily lead to difficult to diagnose bugs specially with the number of naked returns and the length of the function.
> We should remove the named return values and the naked returns.
> Note the linter "nakedret" complains about this when you run a simple {{./tools/golangci-lint run}}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@yunikorn.apache.org
For additional commands, e-mail: issues-help@yunikorn.apache.org