Repository navigation
Merge, Move and Clean Web Cmdlets #5610
Description
Activity
- addedIssue-Code Cleanupthe issue is for cleaning up the code with no impact on functionalitythe issue is for cleaning up the code with no impact on functionality
on Dec 2, 2017 - added a commit that references this issue
on Dec 5, 2017 markekraus commented
on Dec 6, 2017 ContributorAuthorMore actionsSteve 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.
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.
See comment
(null should be on first place).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 ContributorMore actionsThis 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 ContributorMore actionsThis 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.
- addedResolution-No ActivityIssue has had no activity for 6 months or moreIssue has had no activity for 6 months or more
on Nov 16, 2023 microsoft-github-policy-service commented
on Nov 16, 2023 ContributorMore actionsThis 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 ContributorMore actionsThis issue has been marked as "No Activity" as there has been no activity for 6 months. It has been closed for housekeeping purposes.
- addedWG-Cmdletsgeneral cmdlet issuesgeneral cmdlet issuesand removed
on Jul 17, 2026
This issue is to track work on merging, moving , and cleaning the Web Cmdlets code
partial'susings's, Properties, Methods, etcusing Microsoft.Win32;src\Microsoft.PowerShell.Commands.Utility\commands\utility\WebCmdlet\top level folder