Skip to content

Fix some style issues in engine code - #7246

Merged
Travis Plunk (TravisEz13) merged 9 commits into
PowerShell:masterfrom
iSazonov:style-fixes-for-exp
Aug 14, 2018
Merged

Travis Plunk (TravisEz13) merged 9 commits into
PowerShell:masterfrom
iSazonov:style-fixes-for-exp

Conversation

@iSazonov

@iSazonov Ilya (iSazonov) commented Jul 9, 2018 •

Copy link
Copy Markdown
Collaborator

PR Summary

The PR resolves some style issues in engine code. (Moved from PR #7242. )

PR Checklist


This change is Reviewable

@BrucePay Bruce Payette (BrucePay) left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are a couple of things I think you should fix.

/// <summary>
/// The FormatData specified with constructor. This can be null if
/// FileName or FormatTable constructor is used
/// FileName or FormatTable constructor is used.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably should be: "This can be null if the FileName or FormatTable constructors are used"

/// Define an alias entry to add to the initial session state
/// Define an alias entry to add to the initial session state.
/// </summary>
/// <param name="name">Name of the alias</param>

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be "The name of the alias entry to add."

/// Define an alias entry to add to the initial session state
/// Define an alias entry to add to the initial session state.
/// </summary>
/// <param name="name">Name of the alias</param>

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be "The name of the alias entry to add."

/// Define an alias entry to add to the initial session state
/// Define an alias entry to add to the initial session state.
/// </summary>
/// <param name="name">Name of the alias</param>

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be "The name of the alias entry to add."

/// Clone this collection.
/// </summary>
/// <returns>The cloned object</returns>
/// <returns>The cloned object.</returns>

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"The cloned collection."


/// <summary>
/// Need to have SnapIn support till we move to modules
/// Need to have SnapIn support till we move to modules.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't support snapins in PSCore so maybe we should be removing these entries?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR is only style issues - please open new tracking Issue.

false))
if (SessionStateUtilities.MatchesAnyWildcardPattern(element.Name,
exportedVariables,
defaultValue: false))

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would suggest lining up all three parameters but with less indentation.

           if (SessionStateUtilities.MatchesAnyWildcardPattern(
                   element.Name,
                   exportedVariables,
                   defaultValue: false))

/// <param name="moduleManifestPath">The manifest that generated the hashtable.</param>
/// <param name="key">the table key to use.</param>
/// <param name="manifestProcessingFlags">Specifies how to treat errors and whether to load elements.am>
/// <param name="result">Value from the manifest converted to the right type.</param>

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the "am" here?

/// <param name="module">module to remove</param>
/// <param name="moduleNameInRemoveModuleCmdlet">module name specified in the cmdlet</param>
/// <param name="module">module to remove.</param>
/// <param name="moduleNameInRemoveModuleCmdlet">module name specified in the cmdlet.</param>

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extra space before "<param" ?

@@ -1053,9 +1059,14 @@ private static void SortAndRemoveDuplicates<T>(List<T> input, Func<T, string> ke
/// <param name="variablePatterns">Patterns describing the variables to export</param>
/// <param name="doNotExportCmdlets">List of Cmdlets that will not be exported,
/// even if they match in cmdletPatterns.</param>

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extra spaces before 'even'

@iSazonov

Copy link
Copy Markdown
Collaborator Author

Bruce Payette (@BrucePay) Your feedback was addressed.

@iSazonov

Copy link
Copy Markdown
Collaborator Author

Bruce Payette (@BrucePay) Please update your review.

@TravisEz13

Copy link
Copy Markdown
Member

Bruce Payette (@BrucePay) Can you update your review?

@iSazonov

Copy link
Copy Markdown
Collaborator Author

@daxian-dbw Dongbo Wang (daxian-dbw) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a few comments

//If used on command collection entry, then for the same name, one can have multiple output
// To find the entries based on name.
// Why collection - Different SnapIn/modules and same entity names.
// If used on command collection entry, then for the same name, one can have multiple output

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These comments are duplicate with the ones below in

. They can be removed.

//This one is for module. Can take only one module, and not collection
//public static InitialSessionState Create(Module);
// This one is for module. Can take only one module, and not collection
// public static InitialSessionState Create(Module);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems to be these two can be removed.

/// <param name="data">The hashtable to look for the key in.</param>
/// <param name="moduleManifestPath">The manifest that generated the hashtable.</param>
/// <param name="key">the table key to use.</param>
/// <param name="manifestProcessingFlags">Specifies how to treat errors and whether to load elements.>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

</param> is missing

@daxian-dbw Dongbo Wang (daxian-dbw) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ilya (@iSazonov) Can you please update the PR title and summary to be more related to the changes?

@daxian-dbw
Dongbo Wang (daxian-dbw) dismissed Bruce Payette (BrucePay)’s stale review August 10, 2018 17:16

new commits were pushed to address the original comments.

@iSazonov Ilya (iSazonov) changed the title Fix some style issues for PR #7242 Fix some style issues in engine code Aug 10, 2018
@iSazonov

Copy link
Copy Markdown
Collaborator Author

Dongbo Wang (@daxian-dbw) Title and summary was updated.

@TravisEz13 Travis Plunk (TravisEz13) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 2 of 12 files at r1, 9 of 11 files at r3, 7 of 11 files at r4, 2 of 2 files at r5.
Reviewable status: :shipit: complete! all files reviewed

@TravisEz13
Travis Plunk (TravisEz13) merged commit 4ee1973 into PowerShell:master Aug 14, 2018
@iSazonov
Ilya (iSazonov) deleted the style-fixes-for-exp branch August 14, 2018 05:31
Thatgfsj (Thatgfsj) pushed a commit to Thatgfsj-contribs/PowerShell that referenced this pull request Aug 6, 2026
The PR resolves some style issues in engine code. (Moved from PR PowerShell#7242. )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants