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

Only run code style analyzers when nullable warnings are enabled #43972

Merged
merged 1 commit into from
May 6, 2020

Conversation

sharwell
Copy link
Member

@sharwell sharwell commented May 5, 2020

Closes #43969

@sharwell sharwell requested a review from a team as a code owner May 5, 2020 04:43
@sharwell sharwell marked this pull request as draft May 5, 2020 04:44
@sharwell sharwell marked this pull request as ready for review May 5, 2020 04:50
@RikkiGibson
Copy link
Contributor

Is the impact of this change measurable on a clean build?

Copy link
Member

@jaredpar jaredpar left a comment

Choose a reason for hiding this comment

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

comment

<When Condition="'$(Language)' == 'VB' and '$(RoslynCheckCodeStyle)' == 'true'">
<ItemGroup>
<When Condition="'$(Language)' == 'VB'">
<ItemGroup Condition="'$(RoslynCheckCodeStyle)' == 'true'">
Copy link
Member

Choose a reason for hiding this comment

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

The property this is conditioning on is defined in the targets file now, not the props. Think we should move this <Choose> to the targets file as well.

Copy link
Member Author

@sharwell sharwell May 5, 2020

Choose a reason for hiding this comment

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

All property groups are evaluated before all item groups. The SDK itself has many examples of cases where default properties are assigned in the targets file (allowing a project file to set values before the defaults are applied as fallback), and items in the props file (allowing a project file to Update one or more items after the item exists).

@sharwell sharwell merged commit 30f42a8 into dotnet:master May 6, 2020
@ghost ghost added this to the Next milestone May 6, 2020
@sharwell sharwell deleted the restrict-scope branch May 6, 2020 03:34
@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
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Only run analyzers in netcoreapp3.1 build
4 participants