refactor: machine_type to avoid non posix function declarations #364

Open
opened 2023-03-13 20:38:25 +00:00 by pedro · 1 comment

7dd2d1025a/cdist/conf/explorer/machine_type

if you search for () ( you will find 5 results

according to this source [1], they say

Using just parentheses is highly unusual syntax and would confuse many people reading your script.

hence, a refactor would be needed in the machine_type to avoid non posix function declarations

[1] https://stackoverflow.com/questions/27801932/bash-functions-enclosing-the-body-in-braces-vs-parentheses

https://code.ungleich.ch/ungleich-public/cdist/src/commit/7dd2d1025ae3b005e5d44d11e1ca62536119f36c/cdist/conf/explorer/machine_type if you search for `() (` you will find 5 results according to this source [1], they say > Using just parentheses is highly unusual syntax and would confuse many people reading your script. hence, a refactor would be needed in the `machine_type` to avoid non posix function declarations [1] https://stackoverflow.com/questions/27801932/bash-functions-enclosing-the-body-in-braces-vs-parentheses
Owner

I suggest to reach out to Dennis, as he mixed {} and () functions, both which technically are correct due to the compound, but he might have had a motivation for potentially keeping x local or so.

I suggest to reach out to Dennis, as he mixed {} and () functions, both which technically are correct due to the compound, but he might have had a motivation for potentially keeping x local or so.
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: ungleich-public/cdist#364
No description provided.