-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathDirectory.Build.props
More file actions
57 lines (53 loc) · 2.53 KB
/
Directory.Build.props
File metadata and controls
57 lines (53 loc) · 2.53 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
<Project>
<PropertyGroup>
<LangVersion>latest</LangVersion>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<PropertyGroup>
<!-- Placeholder for local builds only: CD packs with -p:Version=<tag> on release (see CD.yml),
so a local `dotnet pack` always produces 1.0.0. -->
<Version>1.0.0</Version>
<IsPackable>false</IsPackable>
</PropertyGroup>
<PropertyGroup>
<AnalysisLevel>latest-all</AnalysisLevel>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<EnableNETAnalyzers>true</EnableNETAnalyzers>
<RunAnalyzersDuringBuild>true</RunAnalyzersDuringBuild>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>
<!-- Point git at the committed hooks (.githooks/pre-push formats before pushing).
Idempotent and best-effort: skipped on CI and outside a git clone. -->
<Target Name="ConfigureGitHooks" BeforeTargets="Build"
Condition="'$(CI)' == '' AND '$(ContinuousIntegrationBuild)' != 'true' AND Exists('$(MSBuildThisFileDirectory).git')">
<Exec Command="git config core.hooksPath .githooks"
WorkingDirectory="$(MSBuildThisFileDirectory)"
ContinueOnError="true"
StandardOutputImportance="low"
StandardErrorImportance="low" />
</Target>
<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.VisualStudio.Threading.Analyzers">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Roslynator.Analyzers">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Roslynator.Formatting.Analyzers">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="SonarAnalyzer.CSharp">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
</Project>