Repository navigation
Expand file tree
/
Copy pathDirectory.Build.props
More file actions
70 lines (66 loc) · 4.88 KB
/
Copy pathDirectory.Build.props
File metadata and controls
70 lines (66 loc) · 4.88 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<?xml version="1.0" encoding="utf-8"?>
<Project>
<PropertyGroup>
<TargetFrameworks Condition="'$(TargetFrameworks)' == ''">net10.0</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<LangVersion>preview</LangVersion>
</PropertyGroup>
<PropertyGroup>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageReadmeFile>README.md</PackageReadmeFile>
<Authors>Tom Longhurst</Authors>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
</PropertyGroup>
<PropertyGroup>
<!-- The dedicated analyzer job opts back in while other CI builds stay lean. -->
<EnableCiAnalyzers Condition="'$(EnableCiAnalyzers)' == ''">false</EnableCiAnalyzers>
</PropertyGroup>
<PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true' and '$(EnableCiAnalyzers)' != 'true'">
<RunAnalyzers>false</RunAnalyzers>
<RunAnalyzersDuringBuild>false</RunAnalyzersDuringBuild>
</PropertyGroup>
<PropertyGroup>
<CodeAnalysisRuleSet>$(MSBuildThisFileDirectory).ruleset</CodeAnalysisRuleSet>
<StyleCopTreatErrorsAsWarnings>false</StyleCopTreatErrorsAsWarnings>
<AnalysisLevel>preview</AnalysisLevel>
</PropertyGroup>
<ItemGroup>
<None Include="$(MSBuildThisFileDirectory)README.md" Pack="true" PackagePath="\" />
<AdditionalFiles Include="$(MSBuildThisFileDirectory)stylecop.json" Link="stylecop.json" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
<PackageReference Include="StyleCop.Analyzers" PrivateAssets="All" Condition="$(MSBuildProjectFile.Contains('Test')) == false and ('$(GITHUB_ACTIONS)' != 'true' or '$(EnableCiAnalyzers)' == 'true')" />
</ItemGroup>
<!-- Baselines opt handwritten packages into API tracking. Generated CLI snapshots are excluded. -->
<PropertyGroup>
<_GeneratedCommandCoverageCount Condition="Exists('$(MSBuildProjectDirectory)/Generated')">$([System.IO.Directory]::GetFiles('$(MSBuildProjectDirectory)/Generated', '*.CommandCoverage.json').Length)</_GeneratedCommandCoverageCount>
<_TrackPublicApi Condition="Exists('$(MSBuildProjectDirectory)/PublicAPI.Shipped.txt') and Exists('$(MSBuildProjectDirectory)/PublicAPI.Unshipped.txt') and ('$(_GeneratedCommandCoverageCount)' == '' or '$(_GeneratedCommandCoverageCount)' == '0')">true</_TrackPublicApi>
</PropertyGroup>
<ItemGroup Condition="'$(_TrackPublicApi)' == 'true' and ('$(GITHUB_ACTIONS)' == 'true' or '$(EnableCiAnalyzers)' == 'true')">
<PackageReference Include="Microsoft.CodeAnalysis.PublicApiAnalyzers" PrivateAssets="All" />
</ItemGroup>
<PropertyGroup Condition="'$(_TrackPublicApi)' == 'true' and ('$(GITHUB_ACTIONS)' == 'true' or '$(EnableCiAnalyzers)' == 'true')">
<!-- Keep handwritten public API baselines enforced in ordinary CI builds. -->
<EnableNETAnalyzers Condition="'$(GITHUB_ACTIONS)' == 'true' and '$(EnableCiAnalyzers)' != 'true'">false</EnableNETAnalyzers>
<RunAnalyzers Condition="'$(GITHUB_ACTIONS)' == 'true'">true</RunAnalyzers>
<RunAnalyzersDuringBuild Condition="'$(GITHUB_ACTIONS)' == 'true'">true</RunAnalyzersDuringBuild>
<!-- Keep source-generated API in the baseline without promoting its advisory diagnostics. -->
<WarningsNotAsErrors Condition="'$(GITHUB_ACTIONS)' == 'true' and '$(EnableCiAnalyzers)' != 'true'">$(WarningsNotAsErrors);RS0026;MPG0005;MPG0008;MPG0011;MPG0012;MPG0013;MPG0014;MPG0015;MPG0016</WarningsNotAsErrors>
<WarningsAsErrors>$(WarningsAsErrors);RS0016;RS0017</WarningsAsErrors>
</PropertyGroup>
<!-- Development analyzers enforce generated tool APIs in every applicable build. -->
<ItemGroup Condition="'$(MSBuildProjectName)' != 'ModularPipelines.Development.Analyzers' and '$(MSBuildProjectName)' != 'ModularPipelines.Templates'">
<ProjectReference Include="$(MSBuildThisFileDirectory)src\ModularPipelines.Development.Analyzers\ModularPipelines.Development.Analyzers.csproj" ReferenceOutputAssembly="false" OutputItemType="Analyzer" SetTargetFramework="TargetFramework=netstandard2.0" />
</ItemGroup>
<ItemGroup Condition="'$(MSBuildProjectName)' != 'ModularPipelines' and '$(MSBuildProjectName)' != 'ModularPipelines.SourceGenerator' and '$(MSBuildProjectName)' != 'ModularPipelines.Development.Analyzers' and '$(MSBuildProjectName)' != 'ModularPipelines.Build' and '$(MSBuildProjectName)' != 'ModularPipelines.Templates'">
<ProjectReference Include="$(MSBuildThisFileDirectory)src\ModularPipelines.SourceGenerator\ModularPipelines.SourceGenerator.csproj" ReferenceOutputAssembly="false" OutputItemType="Analyzer" SetTargetFramework="TargetFramework=netstandard2.0" />
</ItemGroup>
</Project>