Skip to content

Conversation

@iSazonov
Copy link
Collaborator

@iSazonov iSazonov commented Jul 9, 2018

PR Summary

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

PR Checklist


This change is Reviewable

Copy link
Collaborator

@BrucePay BrucePay left a comment

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
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
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
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
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
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
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
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
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
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
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" ?

/// <param name="aliasPatterns">Patterns describing the aliases to export</param>
/// <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
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
Collaborator Author

@BrucePay Your feedback was addressed.

@iSazonov
Copy link
Collaborator Author

@BrucePay Please update your review.

@TravisEz13
Copy link
Member

@BrucePay Can you update your review?

@iSazonov
Copy link
Collaborator Author

iSazonov commented Aug 9, 2018

@TravisEz13 @BrucePay @daxian-dbw Could you please review?

Copy link
Member

@daxian-dbw daxian-dbw left a comment

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
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
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
Member

Choose a reason for hiding this comment

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

</param> is missing

Copy link
Member

@daxian-dbw daxian-dbw left a comment

Choose a reason for hiding this comment

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

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

@daxian-dbw daxian-dbw dismissed BrucePay’s stale review August 10, 2018 17:16

new commits were pushed to address the original comments.

@iSazonov iSazonov changed the title Fix some style issues for PR #7242 Fix some style issues in engine code Aug 10, 2018
@iSazonov
Copy link
Collaborator Author

@daxian-dbw Title and summary was updated.

Copy link
Member

@TravisEz13 TravisEz13 left a comment

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 TravisEz13 merged commit 4ee1973 into PowerShell:master Aug 14, 2018
@iSazonov iSazonov deleted the style-fixes-for-exp branch August 14, 2018 05:31
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