GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||
GeezerVison is showing github.com — Cleanup CodeFactor issues with empty strings by iSazonov · Pull Request #6950 · PowerShell/PowerShell Conversation
|
|
Mark Kraus (@markekraus) Many thanks for fast review! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
dca7c3f to
84ea832
Compare
|
I don't see the point. Why not just disable the warning and skip the code churn? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
It is readability issue. If we use advanced editor with code highlighting we haven't problems to see "". If we use a simple editor the string.Empty visibility is much better. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I find |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Overall the results look good. All the changes seem fine.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Could migrate all of the ", " strings into a constant.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Constant or static?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Is there any reason it shouldn't be constant?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
We already have a lot of static variables for such strings.
I found 4487 hits in 581 file for ", ". So static may be useful.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
As long as we don't need to change the string, I prefer constant. But that should be in a separate PR.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
If this is an autogen'ed file should you be changing it or the generator?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
The files is not regenerated and already was changed manually. Seems we should rename the files and remove "autogen" from file names.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
And remove the comments saying "this is an autogen'ed file, don't edit"
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Tracking issue #6974
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Steve Lee (@SteveL-MSFT) Can we merge? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Ilya (@iSazonov) What does indicate as the reasoning for this change? Is this a readability or programmatic warning? My understanding of "" is that it is interned and you will have one instance per assembly. In all other regards, String.Empty is synonymous with "". |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
This should be reverted.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Good catch!
Fixed.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
missing replacing an instance of ""
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Here too.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Dan Travison (@dantraMSFT) I think the purpose is to enable the style checking about empty string (favor Ilya (@iSazonov) Thanks for spending efforts on driving the style consistency. I ran I quickly go through the changes and didn't notice any replacements in PowerShell scripts in |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Dan Travison (@dantraMSFT) The PR has a purpose to turn CodeFactor into a more useful tool. Currently we see over 100000 issues most of which are style issues. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
18ed825 to
3ef9ef0
Compare
3ef9ef0 to
dec9f0c
Compare
There was an error while loading. Please reload this page.
|
Dongbo Wang (@daxian-dbw) I re-check - no scripts was changed. Rebased to remove PSReadline. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.