Skip to content

Cleanup style issues in Compiler.cs#10368

Merged
iSazonov merged 14 commits intoPowerShell:masterfrom
iSazonov:cleanup-style-compiler-1
Oct 22, 2019
Merged

Cleanup style issues in Compiler.cs#10368
iSazonov merged 14 commits intoPowerShell:masterfrom
iSazonov:cleanup-style-compiler-1

Conversation

@iSazonov
Copy link
Copy Markdown
Collaborator

PR Summary

Fix style issue in Compiler.cs file.

Please review commit by commit. There is a lot of commits but everyone is small and simple.

PR Context

CodeFactor has two nice metrics:

  • how many a file was changed
  • how many a file has style issues

If we take a file with this two metrics being large there is a high probability that we will get a PR with a large number of style errors.

So make sense proactively fix style issues in such files and save a time of code reviewers later.

PR Checklist

@iSazonov iSazonov added the CL-CodeCleanup Indicates that a PR should be marked as a Code Cleanup change in the Change Log label Aug 16, 2019
@iSazonov iSazonov added this to the 7.0.0-preview.3 milestone Aug 16, 2019
@iSazonov iSazonov force-pushed the cleanup-style-compiler-1 branch from 00859a3 to fa5c25c Compare August 20, 2019 05:58
@iSazonov iSazonov self-assigned this Aug 20, 2019
@iSazonov iSazonov marked this pull request as ready for review August 20, 2019 06:19
@iSazonov iSazonov requested a review from daxian-dbw as a code owner August 20, 2019 06:19
@iSazonov iSazonov force-pushed the cleanup-style-compiler-1 branch from fa5c25c to c5f1f5a Compare September 16, 2019 12:46
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.

per https://github.com/dotnet/corefx/blob/master/Documentation/coding-guidelines/coding-style.md it seems the current style is correct? Also, I believe only public fields have Pascal Casing otherwise it would be camelCasing

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 properties is used in other classes and files.
It seems it is bad if we see a code like follow in another file:

  functionContext._scriptBlock.Ast.Extent

I believe the properties should be public in the internal class. Thoughts?

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.

I removed all extra changes and refactor commits.

@ghost ghost added Waiting on Author The PR was reviewed and requires changes or comments from the author before being accept and removed Waiting on Author The PR was reviewed and requires changes or comments from the author before being accept labels Sep 18, 2019
@iSazonov iSazonov force-pushed the cleanup-style-compiler-1 branch from efe9c63 to 224256c Compare October 21, 2019 14:47
@iSazonov iSazonov force-pushed the cleanup-style-compiler-1 branch 2 times, most recently from 1344fdc to 4038e0a Compare October 21, 2019 15:17
@iSazonov iSazonov force-pushed the cleanup-style-compiler-1 branch from 4038e0a to 7b125f4 Compare October 21, 2019 15:24
@iSazonov iSazonov merged commit 89c6603 into PowerShell:master Oct 22, 2019
@iSazonov iSazonov deleted the cleanup-style-compiler-1 branch October 22, 2019 08:46
kilasuit pushed a commit to kilasuit/PowerShell that referenced this pull request Nov 9, 2019
@ghost
Copy link
Copy Markdown

ghost commented Nov 21, 2019

🎉v7.0.0-preview.6 has been released which incorporates this pull request.:tada:

Handy links:

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

Labels

CL-CodeCleanup Indicates that a PR should be marked as a Code Cleanup change in the Change Log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants