Repository navigation
Expand file tree
/
Copy pathDirectory.Build.targets
More file actions
37 lines (37 loc) · 2.61 KB
/
Copy pathDirectory.Build.targets
File metadata and controls
37 lines (37 loc) · 2.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<Project>
<PropertyGroup>
<KeyLoadCodeQualityDirectory>$(MSBuildThisFileDirectory)artifacts/code-quality/$(MSBuildProjectName)/$(Configuration)/$(TargetFramework)</KeyLoadCodeQualityDirectory>
<ErrorLog Condition="'$(ErrorLog)' == ''">$(KeyLoadCodeQualityDirectory)/diagnostics.sarif,version=2.1</ErrorLog>
</PropertyGroup>
<Target Name="EnforceKeyLoadCodeQuality" BeforeTargets="CoreCompile">
<Error Condition="'$(TreatWarningsAsErrors)' != 'true' or '$(CodeAnalysisTreatWarningsAsErrors)' != 'true'"
Text="KeyLoad requires compiler and analyzer warnings to be treated as errors." />
<Error Condition="'$(EnableNETAnalyzers)' != 'true' or '$(EnforceCodeStyleInBuild)' != 'true' or '$(RunAnalyzers)' != 'true' or '$(RunAnalyzersDuringBuild)' != 'true' or '$(RunAnalyzersDuringLiveAnalysis)' != 'true'"
Text="KeyLoad requires SDK, style, build and live analyzers in every project." />
<Error Condition="'$(AnalysisLevel)' != 'latest-all'"
Text="KeyLoad requires the latest-all SDK analysis level." />
<Error Condition="'$(GenerateDocumentationFile)' != 'true'"
Text="KeyLoad requires XML documentation generation so IDE0005 runs during builds." />
<MakeDir Directories="$(KeyLoadCodeQualityDirectory)" />
</Target>
<Import Project="$(MSBuildThisFileDirectory)tests/KeyLoad.UnitTests/Features/CodeQuality/Build/FunctionalCompilationIdentity.targets"
Condition="'$(MSBuildProjectName)' == 'KeyLoad.Abstractions' or
'$(MSBuildProjectName)' == 'KeyLoad.Analyzers' or
'$(MSBuildProjectName)' == 'KeyLoad.AppHost' or
'$(MSBuildProjectName)' == 'KeyLoad.Artifacts' or
'$(MSBuildProjectName)' == 'KeyLoad.Cli' or
'$(MSBuildProjectName)' == 'KeyLoad.Client' or
'$(MSBuildProjectName)' == 'KeyLoad.Core' or
'$(MSBuildProjectName)' == 'KeyLoad.Diagnostics' or
'$(MSBuildProjectName)' == 'KeyLoad.Orleans' or
'$(MSBuildProjectName)' == 'KeyLoad.Query' or
'$(MSBuildProjectName)' == 'KeyLoad.Replication' or
'$(MSBuildProjectName)' == 'KeyLoad.Security' or
'$(MSBuildProjectName)' == 'KeyLoad.Server' or
'$(MSBuildProjectName)' == 'KeyLoad.ServiceDefaults' or
'$(MSBuildProjectName)' == 'KeyLoad.Storage.IO' or
'$(MSBuildProjectName)' == 'KeyLoad.Storage.ZoneTree' or
'$(MSBuildProjectName)' == 'KeyLoad.UnitTests' or
'$(MSBuildProjectName)' == 'KeyLoad.RecoveryTests' or
'$(MSBuildProjectName)' == 'KeyLoad.IntegrationTests'" />
</Project>