Skip to content

Merge, Move and Clean Web Cmdlets #5610

Description

@markekraus

This issue is to track work on merging, moving , and cleaning the Web Cmdlets code

  • Merge partial classes into single class files
  • Clean up and organize the cmdlets code
    • Remove partial's
    • Sort usings's, Properties, Methods, etc
    • Fix comments
    • Fix Formatting
    • Convert to automatic properties where possible
    • Remove using Microsoft.Win32;
  • Move all web cmdlet code from sub folders to src\Microsoft.PowerShell.Commands.Utility\commands\utility\WebCmdlet\ top level folder
  • Move independent enums and classes out of WebRequestPSCmdlet.cs to separate files

Activity

  1. markekraus commented on Dec 6, 2017

    @markekraus
    ContributorAuthor

    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.

  2. SteveL-MSFT commented on Dec 6, 2017

    @SteveL-MSFT
    Member

    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.

  3. iSazonov commented on Jan 22, 2018

    @iSazonov
    Collaborator

    See comment
    (null should be on first place).

    See rkeithhill's comment

    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).

  4. microsoft-github-policy-service commented on Nov 16, 2023

    @microsoft-github-policy-service
    Contributor

    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.

  5. microsoft-github-policy-service commented on Nov 16, 2023

    @microsoft-github-policy-service
    Contributor

    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.

  6. microsoft-github-policy-service commented on Nov 16, 2023

    @microsoft-github-policy-service
    Contributor

    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.

  7. microsoft-github-policy-service commented on Nov 23, 2023

    @microsoft-github-policy-service
    Contributor

    This issue has been marked as "No Activity" as there has been no activity for 6 months. It has been closed for housekeeping purposes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Issue-Code Cleanupthe issue is for cleaning up the code with no impact on functionalityResolution-No ActivityIssue has had no activity for 6 months or moreWG-Cmdletsgeneral cmdlet issues

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions