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
Steve Lee (@SteveL-MSFT)Travis Plunk (@TravisEz13) The next phase of this cleanup is to sort and order the web cmdlet code. I looked at the coding guidlines, but I don't see any guidance for the order of fields, properties, constructors, methods, etc other than "fields at the top unless they are backing properties". The web cmdlets are a mess with code of varying types and access all over the place.
Mark Kraus (@markekraus) I would be fine starting with stylecop. Since the codebase is a decade old and produced by various engineers over time, it's inherently inconsistent and something that we should only address over time.
FYI, this type of null check (null on the LHS) is a C++ idiom that is unnecessary in C# because if/while/do conditions in C# must evaluate to a Boolean. Therefore a mistaken assignment e.g. if (formData = null) would fail to compile because the type of formData can't be a Boolean (not if you're assigning null to it). In fact, the only time you need to put the literal on the LHS is when the variable type is a Boolean e.g. if (false == aBooleanVariable).
My team's internal coding guidelines suggest not using == or != in the Boolean variable case but use if (!aBooleanVariable) or if (aBooleanVariable) instead. Consequently, we never put the literal value on the LHS in C# code. And IMO this approach reads easier e.g. if (formData == null).
microsoft-github-policy-service commented on Nov 16, 2023
This issue has not had any activity in 6 months, if this is a bug please try to reproduce on the latest version of PowerShell and reopen a new issue and reference this issue if this is still a blocker for you.
microsoft-github-policy-service commented on Nov 16, 2023
This issue has not had any activity in 6 months, if this is a bug please try to reproduce on the latest version of PowerShell and reopen a new issue and reference this issue if this is still a blocker for you.
This issue has not had any activity in 6 months, if this is a bug please try to reproduce on the latest version of PowerShell and reopen a new issue and reference this issue if this is still a blocker for you.
microsoft-github-policy-service commented on Nov 23, 2023
Activity
Combine Web Cmdlet Partial Class Files (#5612)
markekraus commentedon Dec 6, 2017
Steve Lee (@SteveL-MSFT) Travis Plunk (@TravisEz13) The next phase of this cleanup is to sort and order the web cmdlet code. I looked at the coding guidlines, but I don't see any guidance for the order of fields, properties, constructors, methods, etc other than "fields at the top unless they are backing properties". The web cmdlets are a mess with code of varying types and access all over the place.
I was looking at this http://stylecop.soyuz5.com/Ordering%20Rules.html and wondering if that would be a good reference or if this project had its own guidance that hasn't been published yet.
SteveL-MSFT commentedon Dec 6, 2017
Mark Kraus (@markekraus) I would be fine starting with stylecop. Since the codebase is a decade old and produced by various engineers over time, it's inherently inconsistent and something that we should only address over time.
iSazonov commentedon Jan 22, 2018
See comment
(null should be on first place).
See rkeithhill's comment
microsoft-github-policy-service commentedon Nov 16, 2023
This issue has not had any activity in 6 months, if this is a bug please try to reproduce on the latest version of PowerShell and reopen a new issue and reference this issue if this is still a blocker for you.
microsoft-github-policy-service commentedon Nov 16, 2023
This issue has not had any activity in 6 months, if this is a bug please try to reproduce on the latest version of PowerShell and reopen a new issue and reference this issue if this is still a blocker for you.
microsoft-github-policy-service commentedon Nov 16, 2023
This issue has not had any activity in 6 months, if this is a bug please try to reproduce on the latest version of PowerShell and reopen a new issue and reference this issue if this is still a blocker for you.
microsoft-github-policy-service commentedon Nov 23, 2023
This issue has been marked as "No Activity" as there has been no activity for 6 months. It has been closed for housekeeping purposes.
Combine Web Cmdlet Partial Class Files (PowerShell#5612)