You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 24, 2021. It is now read-only.
Repository navigation
This repository was archived by the owner on Feb 24, 2021. It is now read-only.
In SharePointDsc we have a discussion on how to use comparison operators in the most readable way. Unfortunately the current coding style guidelines do not say anything about this.
Which is better, option 1:
if (($urlAam.PublicUrl-eq$aamForUrl.PublicUrl) `-and ($urlAam.Zone-eq$aamForUrl.Zone))
{}
Better readability on the used operator.
or option 2:
if (($urlAam.PublicUrl-eq$aamForUrl.PublicUrl) -and`
($urlAam.Zone-eq$aamForUrl.Zone))
{}
Better readability on the used conditions, because they are aligned at the beginning of the line. Especially when these contain multiple, longer conditions. I personally prefer this option.
I think we should decide on a method and document that in the DSC style guideline.
With option 1 I like the fact that I can see more quickly which operands apply to the following condition.
With option 2 it's easier to see what's the condition.
I would go for option 1 as knowing operand and condition seems more adequate.
I'm fine with both, but I actually personally prefer Option 2 because it keeps the operator on the left which is good for longer expressions. But I'm happy enough with either.
In SharePointDsc we have a discussion on how to use comparison operators in the most readable way. Unfortunately the current coding style guidelines do not say anything about this.
Which is better, option 1:
Better readability on the used operator.
or option 2:
Better readability on the used conditions, because they are aligned at the beginning of the line. Especially when these contain multiple, longer conditions. I personally prefer this option.
I think we should decide on a method and document that in the DSC style guideline.