-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
User/ryanbod/shell plugin fxcop #6043
User/ryanbod/shell plugin fxcop #6043
Conversation
… part with the namespace name 'Microsoft.PowerToys.Settings'. Change either name to eliminate the conflict. Microsoft.Plugin.Shell C:\repos\powertoys\src\modules\launcher\Plugins\Microsoft.Plugin.Shell\Settings.cs 9 Active
Error CA1724 The type name Settings conflicts in whole or in part with the namespace name 'Microsoft.PowerToys.Settings'. Change either name to eliminate the conflict. Microsoft.Plugin.Shell C:\repos\powertoys\src\modules\launcher\Plugins\Microsoft.Plugin.Shell\Settings.cs 9 Active
…ception type, or rethrow the exception'
|
||
// not overriding Win+R | ||
// crutkas we need to earn the right for Win+R override | ||
public bool ReplaceWinR { get; set; } = false; | ||
public bool ReplaceWinR { get; set; } |
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.
Was the false initialisation removed because we are planning to override Win+R?
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.
@alekhyareddy28 . Nope this was to fix CA1805. It is redundant to initialize a field to its default value.
Rule description
The .NET runtime initializes all fields of reference types to their default values before running the constructor. In most cases, explicitly initializing a field to its default value in a constructor is redundant, adding maintenance costs and potentially degrading performance (such as with increased assembly size), and the explicit initialization can be removed.
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
Summary of the Pull Request
Turns on FX cop and fixes all errors for the shell plugin.
PR Checklist
Info on Pull Request
What does this include?
Validation Steps Performed
Ran shell plugin manually.