Skip to content

Conversation

@lzybkr
Copy link
Contributor

@lzybkr lzybkr commented Jan 13, 2017

I was concerned about #2725 changing file encodings and possibly other characters. If the number of changes was small, I would have just reviewed it, but there a ton of changes.

I took the script written by @powercode and modified it some to verify we only deleted spaces and tabs, the result is here.

With this extra check, I found 25 or so files where #2725 would have changed characters we might not have wanted changed. Those files are not included in the PR, I'll fix those in another PR - and at the same time fix those funny characters or fix the file encoding to be true ascii.

@PowerShellTeam PowerShellTeam added the Review - Needed The PR is being reviewed label Jan 13, 2017
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.

I was unable to check all the cs files because the browser hangs.
For ps1 files commit GitHub show: +2,324 −2,325 - we lost one line. No idea where and why.

{
// The string contains index references to other spots in the string, so we need placeholders so we can compute the offsets.
// The "<<<<<<<<1,<<<<<<<<2, etc" strings are just placeholders. We'll back-patch them actual values within the header location afterwards.
const string Header = @"Version:0.9
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please note - change in code is potentially dangerous.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You're right, there is some small risk here (not this change, it looks fine after looking at how the string is used.)

I'm fine with accepting the risk, this change will simplify reviews in the future when folks use editors that trim trailing whitespace.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ok.
May be slightly improve the script to receive a warning in this case in future?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Maybe possible with heuristics and expect false positives - but I'm not planning to spend time on it.

@lzybkr
Copy link
Contributor Author

lzybkr commented Jan 13, 2017

To review changes locally (not in a browser), I find https://hub.github.com/ very useful, e.g. I could review this PR with:

hub checkout https://github.com/PowerShell/PowerShell/pull/3001
git diff HEAD^5

or something like that.

As for the deleted line, that probably happened when I fixed a merge conflict, I think I may have deleted a blank line.

@iSazonov
Copy link
Collaborator

@lzybkr Thanks for hub. I will try to finish review the remaining cs files.

Most likely this script we will use in the future, maybe put it in the tools folder?

@iSazonov
Copy link
Collaborator

I have not found anything more.

Although one question is there. Microsoft.PowerShell.Archive module lives in a separate repository and there is no need in its correction here, isn't it?

@lzybkr
Copy link
Contributor Author

lzybkr commented Jan 16, 2017

Correct, there was no need to include Microsoft.PowerShell.Archive, but it would have been more work to exclude those files.

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

Labels

Review - Needed The PR is being reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants