-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Skip executing analyzers by default on local builds for solutions in the repo #44047
Changes from 3 commits
76ee5f5
71716fd
4f70532
59f745b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,6 +34,18 @@ | |
<RoslynCheckCodeStyle Condition="'$(RoslynCheckCodeStyle)' == '' AND ('$(ContinuousIntegrationBuild)' != 'true' OR '$(RoslynEnforceCodeStyle)' == 'true')">true</RoslynCheckCodeStyle> | ||
</PropertyGroup> | ||
|
||
<!-- | ||
PERF: Set default value for 'UseRoslynAnalyzers' to determine if analyzers should be executed. | ||
Default to 'false' in all non-CI builds to improve local build time (i.e. csc/vbc invocations both inside Visual Studio and from command line prompt), except if: | ||
1. We are enforcing code style, i.e. '$(RoslynEnforceCodeStyle)' == 'true' OR | ||
2. We are explicitly running code analysis via "Run Code Analysis" command, i.e. '$(RunCodeAnalysis)' == 'true'. | ||
Otherwise, default to 'true'. | ||
--> | ||
<PropertyGroup Condition="'$(UseRoslynAnalyzers)' == ''"> | ||
<UseRoslynAnalyzers Condition="'$(DesignTimeBuild)' != 'true' AND '$(ContinuousIntegrationBuild)' != 'true' AND !('$(RoslynEnforceCodeStyle)' == 'true' OR '$(RunCodeAnalysis)' == 'true')">false</UseRoslynAnalyzers> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. When does There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This property is set to true when you execute "Run Code Analysis" context command in Visual Studio, either from top level "Analyze" menu OR from solution explorer context menu for project/solution: https://docs.microsoft.com/en-us/visualstudio/code-quality/how-to-run-code-analysis-manually-for-managed-code?view=vs-2019. Starting VS2019 16.5, this command force completes all the applicable analyzers on the selected project/solution. |
||
<UseRoslynAnalyzers Condition="'$(UseRoslynAnalyzers)' == ''">true</UseRoslynAnalyzers> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup Condition="'$(DisableNullableWarnings)' == 'true'"> | ||
<NoWarn>$(NoWarn);Nullable</NoWarn> | ||
</PropertyGroup> | ||
|
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.
Analyzer execution has been switched from opt-out mode to opt-in mode in build scripts.
skipAnalyzers
flag has been replaced withrunAnalyzers
flag, which defaults tofalse
. It is only explicitly set totrue
forbuild-correctness
test leg.