Skip to content
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

Update StyleCop #2162

Merged
merged 13 commits into from
Feb 6, 2024
Merged

Update StyleCop #2162

merged 13 commits into from
Feb 6, 2024

Conversation

davidegiacometti
Copy link
Contributor

@davidegiacometti davidegiacometti commented Jan 21, 2024

Summary of the pull request

Updated StyleCop to the latest version to improve compatibility with latest .NET/C# feature.

References and relevant issues

#1259

Detailed description of the pull request / Additional comments

  • Addressed StyleCop violations after the update
  • Added file header to .editorconfig to automatically add it to new .cs files.
  • Removed obsolete StyleCop suppressions in GlobalSuppressions.cs
  • Added some new StyleCop suppression in GlobalSuppressions.cs (nice to have but with high impact in changes)

Validation steps performed

  • Changes are mostly spaces and new lines and shouldn't have any impact.
  • Verified that DevHome build and run as expected.

PR checklist

Copy link
Collaborator

@krschau krschau left a comment

Choose a reason for hiding this comment

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

Blocking while I check on the copyright thing.

.editorconfig Outdated Show resolved Hide resolved
CoreWidgetProvider/WidgetProviderFactory`1.cs Outdated Show resolved Hide resolved
CoreWidgetProvider/Widgets/WidgetImplFactory`1.cs Outdated Show resolved Hide resolved
src/Helpers/NavConfig.cs Outdated Show resolved Hide resolved
@davidegiacometti
Copy link
Contributor Author

Woow! Fixed! Didn't expect those line ending changes.

The files below have been changed from LF (main) to CRLF (PR). Is it fine or does it need to be reverted too?

  • tools/SetupFlow/DevHome.SetupFlow/Controls/SetupFlowNavigation.xaml.cs
  • tools/SetupFlow/DevHome.SetupFlow/Models/IWinGetPackage.cs

@krschau krschau added the Needs-Second Pull request that needs another approval label Feb 2, 2024
@krschau
Copy link
Collaborator

krschau commented Feb 6, 2024

I'm really sorry but I had to update the headers, and this caused a bunch of conflicts for you. Hopefully they're not too painful to resolve.

@davidegiacometti
Copy link
Contributor Author

Aligned the branch with main keeping the new header and fixed StyleCop errors.
Some of the newly introduced headers were // Copyright (c) Microsoft Corporation.. instead of // Copyright (c) Microsoft Corporation.: probably caused by a replace? 🤔

@krschau
Copy link
Collaborator

krschau commented Feb 6, 2024

Some of the newly introduced headers were // Copyright (c) Microsoft Corporation.. instead of // Copyright (c) Microsoft Corporation.: probably caused by a replace? 🤔

Oh jeez🤦‍♀️Thanks for fixing those instances.

@krschau krschau removed the Needs-Second Pull request that needs another approval label Feb 6, 2024
@krschau krschau merged commit e3250fa into microsoft:main Feb 6, 2024
4 checks passed
@davidegiacometti davidegiacometti deleted the stylecop branch February 8, 2024 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade StyleCop analyzers
3 participants