Skip to content

Move C#-specific shared code style options to CSharpCodeStyleOptions#39251

Merged
JoeRobich merged 6 commits intodotnet:masterfrom
castholm:move-code-style-options
Oct 15, 2019
Merged

Move C#-specific shared code style options to CSharpCodeStyleOptions#39251
JoeRobich merged 6 commits intodotnet:masterfrom
castholm:move-code-style-options

Conversation

@castholm
Copy link
Contributor

Fixes #30042.

Most changes are fairly straightfoward, but one significant change is GenerateConstructorFromMembersCodeRefactoringProvider being made abstract and split into language-specific implementations.

To get around the issues of certain shared features depending on the now inaccessible PreferThrowExpression option, I added abstract methods for retrieving the value of the option that are overridden by the language-specific implementations. I'm not sure if it's the best way of handling it, but it minimizes the impact of the option being moved and was the solution I felt the most comfortable going with.

@castholm castholm requested a review from a team as a code owner October 12, 2019 15:44
@dnfclas
Copy link

dnfclas commented Oct 12, 2019

CLA assistant check
All CLA requirements met.

End Property


Public Property Style_PreferThrowExpression As String
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure what the consequences of removing these properties are. Are they okay to remove or should they be left but marked as obsolete?

Copy link
Contributor

Choose a reason for hiding this comment

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

Good question. @jasonmalinowski what's the story with these automation objects. If we remove them, that may break things right? like with settins sync?

Copy link
Member

Choose a reason for hiding this comment

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

What these are used for is importing/exporting from .vssettings files (amongst a few other obscure things.) It doesn't impact setting sync, but removing it would mean a .vssettings file with this contained will not apply the user's setting correctly. I don't know if it'll visibly say that it can't apply or whether it'll just do it silently and leave the user confused.

I also don't know how many people actually use .vssettings files...

Copy link
Member

Choose a reason for hiding this comment

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

We do still read and write these in the C# AutomationObject where they apply though.

@jinujoseph jinujoseph added Area-IDE Community The pull request was submitted by a contributor who is not a Microsoft employee. labels Oct 14, 2019
Copy link
Member

@JoeRobich JoeRobich left a comment

Choose a reason for hiding this comment

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

Changes look good to me. Thanks!

@JoeRobich JoeRobich merged commit 74802db into dotnet:master Oct 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area-IDE Community The pull request was submitted by a contributor who is not a Microsoft employee.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Certain C# code style options are defined in the core/shared code style options

7 participants