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

[Dogfooding] Enforce IDE0011 (Add braces) as a build warning for some… #44205

Merged
merged 1 commit into from
May 13, 2020

Conversation

mavasani
Copy link
Contributor

… IDE projects

My prior attempt to enable IDE0011: Add Braces when multiline as a build warning in #44164 did not work due to #44201. This PR actually adds the build enforcement and fixes the violations.

[src/{Analyzers,CodeStyle,Features,Workspaces}/**/*.{cs,vb}]

# IDE0011: Add braces
csharp_prefer_braces = when_multiline:warning
# NOTE: We need the below severity entry for Add Braces due to https://github.com/dotnet/roslyn/issues/44201
dotnet_diagnostic.IDE0011.severity = warning

… IDE projects

My prior attempt to enable this as a build warning in dotnet#44164 did not work due to dotnet#44201. This PR actually adds the build enforcement and fixes the violations.
@mavasani mavasani added this to the 16.7.P2 milestone May 13, 2020
@mavasani mavasani requested review from JoeRobich, CyrusNajmabadi, cston and a team May 13, 2020 02:09
@mavasani mavasani requested a review from a team as a code owner May 13, 2020 02:09
@mavasani mavasani changed the title [Dogfooding[ Enforce IDE0011 (Add braces) as a build warning for some… [Dogfooding] Enforce IDE0011 (Add braces) as a build warning for some… May 13, 2020
Copy link
Member

@cston cston left a comment

Choose a reason for hiding this comment

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

Compiler changes LGTM.

@mavasani
Copy link
Contributor Author

Thanks!

@mavasani mavasani merged commit 449b218 into dotnet:master May 13, 2020
@ghost ghost modified the milestones: 16.7.P2, Next May 13, 2020
@mavasani mavasani deleted the EnforceAddBraces branch May 13, 2020 16:48
@JoeRobich JoeRobich modified the milestones: Next, 16.7.P2 May 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants