-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Enable IDE0049: PreferBuiltInOrFrameworkType #14491
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
Conversation
|
I doubt it is necessary. These CIM, WSMan, Counter codes are specific and frozen. All other places have already been corrected earlier. I think we should only set the severity to suggestion. |
|
This pull request has been automatically marked as Review Needed because it has been there has not been any activity for 7 days. |
|
@xtqqczze Please resolve merge conflicts |
|
This pull request has been automatically marked as Review Needed because it has been there has not been any activity for 7 days. |
|
Maintainer review summary: ok to take this considering that this does not touch files that are frequently changed therefore the chance of introducing merge conflicts is low. Additionally, files that are not part of the build should be removed from this PR (@adityapatwardhan to give list of such files). |
|
The files that are not compiled and hence should be removed from PR. Files to be removed:
|
|
This pull request has been automatically marked as Review Needed because it has been there has not been any activity for 7 days. |
|
In There is still value in enabling the rule, as it will be used for live analysis in the IDE.
|
|
@adityapatwardhan The suggested changes have been made, please could you continue your review. |
src/Microsoft.PowerShell.Commands.Diagnostics/GetCounterCommand.cs
Outdated
Show resolved
Hide resolved
|
rebased |
rkeithhill
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I like the consistency even though it is a lot of code change.
|
@xtqqczze Thank you for your contribution! |
|
Contributes to #25922. |
Temporarily disable this rule until all violations are addressed. Not all rule violations were resolved in PowerShell#14491. Since the rulehas internal setting `EnforceOnBuild.Never` it doesn’t affect builds, however it still produces distracting warnings during design-time analysis. https://docs.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0049
Temporarily disable this rule until all violations are addressed. Not all rule violations were resolved in PowerShell#14491. Since the rulehas internal setting `EnforceOnBuild.Never` it doesn’t affect builds, however it still produces distracting warnings during design-time analysis. https://docs.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0049
cc: @iSazonov
https://docs.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0049
Skipped:
src\Microsoft.PowerShell.Commands.Diagnostics\CounterSample.cssrc\Microsoft.PowerShell.Commands.Diagnostics\GetCounterCommand.cssrc\Microsoft.PowerShell.Commands.Diagnostics\PdhHelper.cs