-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCodeAnalysis.targets
24 lines (21 loc) · 1.15 KB
/
CodeAnalysis.targets
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<Project>
<PropertyGroup Label="Computed properties">
<PedanticMode Condition=" '$(PedanticMode)' == '' ">$([MSBuild]::ValueOrDefault('$(ContinuousIntegrationBuild)', 'false'))</PedanticMode>
<TreatWarningsAsErrors>$(PedanticMode)</TreatWarningsAsErrors>
<MSBuildTreatWarningsAsErrors>$(PedanticMode)</MSBuildTreatWarningsAsErrors>
<SquiggleCop_Enabled>$(PedanticMode)</SquiggleCop_Enabled>
</PropertyGroup>
<Target Name="SetErrorLog" BeforeTargets="CoreCompile">
<!--
ErrorLog is needed for SquiggleCop.
The value is set in a Target and not directly as a property because `$(IntermediateOutputPath)` and `$(OutputPath)`
are calculated properties and thus shouldn't be relied on during the initial property evaluation phase.
See https://github.com/dotnet/sdk/issues/41852.
We use `$(IntermediateOutputPath)` to ensure the file ends up in the `obj/` folder and not with sources to clearly
delineate inputs and outputs.
-->
<PropertyGroup Condition=" '$(ErrorLog)' == '' ">
<ErrorLog>$(IntermediateOutputPath)/$(MSBuildProjectName).sarif,version=2.1</ErrorLog>
</PropertyGroup>
</Target>
</Project>