8000 Removed double spaces from .cs and .ps1 files by SteveL-MSFT · Pull Request #4743 · PowerShell/PowerShell · GitHub
[go: up one dir, main page]

Skip to content

Removed double spaces from .cs and .ps1 files #4743

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Sep 5, 2017

Conversation

SteveL-MSFT
Copy link
Member

Did a regular expression search "\b \b" in VSCode while checking if https://github.com/PowerShell/PowerShell/pull/4741/files missed any, so fixing the ones in .cs and .ps1 files.

A few left in that help align comments making them easier to read.

Removed one commented out code that doesn't provide value.

The file SessionStateDriveAPIs.cs has a section that I didn't change, but git complained it had LF line endings and resaving as CRLF, so maybe only that section had mixed line endings.

@@ -3122,7 +3122,7 @@ internal static bool DisallowPrivateReflection(TypeInfo typeInfo)
}

var productAttribute = assembly.GetCustomAttribute<AssemblyProductAttribute>();
if (productAttribute != null && string.Equals(productAttribute.Product, "Microsoft� .NET Framework", StringComparison.OrdinalIgnoreCase))
if (productAttribute != null && string.Equals(productAttribute.Product, "Microsoft� .NET Framework", StringComparison.OrdinalIgnoreCase))
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please revert the change.

Copy link
Member Author

Choose a reason for hiding this comment

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

Will revert this

if (result == null)
{
result = AutomountBuiltInDrive(name); // internally this calls GetDrive(name, 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 wonder what is changed here? EOL?

Copy link
Member Author

Choose a reason for hiding this comment

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

Git gave some warnings about line endings (and performing some LF<->CRLF conversions on my behalf since I was doing this on Windows), so I think that's what this is.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Thanks for clarify.
Closed.

Copy link
Contributor

Choose a reason for hiding this comment

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

The original file had inconsistent line endings, LF everywhere but this region. Your script changed the file to have consistent line endings, so git sees this region differently I guess.

@@ -525,7 +525,7 @@ protected override void StopProcessing()
private CustomSerialization _serializer;

/// <summary>
///Memory Stream used for serialization
///Memory Stream used for serialization
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please add space before Memory.
It seems we should set final point.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ok

Copy link
Collaborator
@iSazonov iSazonov left a comment

Choose a reason for hiding this comment

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

So many files - we need an approvement from someone else.

if (result == null)
{
result = AutomountBuiltInDrive(name); // internally this calls GetDrive(name, false)
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Thanks for clarify.
Closed.

@@ -95,7 +95,7 @@ private static string PSObjectTypeName(PSObject so)
FormattingCommandLineParameters parameters)
{
ViewDefinition view = null;
const string findViewType = "FINDING VIEW TYPE: {0}";
const string findViewType = "FINDING VIEW TYPE: {0}";
const string findViewShapeType = "FINDING VIEW {0} TYPE: {1}";
const string findViewNameType = "FINDING VIEW NAME: {0} TYPE: {1}";
Copy link
Contributor

Choose a reason for hiding this comment

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

You missed one.

Copy link
Member Author

Choose a reason for hiding this comment

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

will fix

@@ -3122,7 +3122,7 @@ internal static bool DisallowPrivateReflection(TypeInfo typeInfo)
}

var productAttribute = assembly.GetCustomAttribute<AssemblyProductAttribute>();
if (productAttribute != null && string.Equals(productAttribute.Product, "Microsoft .NET Framework", StringComparison.OrdinalIgnoreCase))
if (productAttribute != null && string.Equals(productAttribute.Product, "Microsoft® .NET Framework", StringComparison.OrdinalIgnoreCase))
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we change this to Microsoft\u00a9 (assuming that is the correct character). When we run automated tools, they always mess this character up.

Copy link
Collaborator

Choose a reason for hiding this comment

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

We have the character in some files - maybe fix this all in follow PR?

Copy link
Member Author

Choose a reason for hiding this comment

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

Created issue #4752 as we should just fix that (and potentially Trademark as well)

@lzybkr lzybkr merged commit fb286e6 into PowerShell:master Sep 5, 2017
@SteveL-MSFT SteveL-MSFT deleted the double-space branch September 5, 2017 04:54
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
0