Repository navigation
Expand file tree
/
Copy pathDirectory.Build.props
More file actions
35 lines (33 loc) · 2.16 KB
/
Copy pathDirectory.Build.props
File metadata and controls
35 lines (33 loc) · 2.16 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
<Project>
<!-- Settings every project in the repository shares. src/ and tests/ each add their own on top through a
Directory.Build.props that imports this one; tools/, benchmarks/ and samples/ use this file alone.
Project-specific settings (target frameworks, package identity) stay in the individual .csproj files. -->
<PropertyGroup>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<LangVersion>latest</LangVersion>
<!-- `latest` (default rule set). `latest-recommended` currently reports ~3,000 warnings
(mostly CA1707 underscores in test names, CA1510, CA1822, CA1861); enable it once those are addressed. -->
<AnalysisLevel>latest</AnalysisLevel>
<!-- Report .editorconfig code-style (IDExxxx) violations during build, not only in `dotnet format`. -->
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<Deterministic>true</Deterministic>
<!-- Nullable warnings are always errors (also locally): they point to real null dereferences. -->
<WarningsAsErrors>$(WarningsAsErrors);nullable</WarningsAsErrors>
<!-- packages.lock.json per project: reproducible restores and the NuGet cache key in CI. -->
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
</PropertyGroup>
<!-- CI builds (GitHub Actions): normalized source paths for reproducible builds. -->
<PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
<!-- Fail the restore if packages.lock.json is out of date (run `dotnet restore` locally and commit). -->
<RestoreLockedMode>true</RestoreLockedMode>
</PropertyGroup>
<!-- Warnings fail CI builds, but do not block local development.
NuGet vulnerability audit warnings (NU1900-NU1904) stay warnings so that a newly published
advisory does not break unrelated builds; dependency updates are handled by Dependabot. -->
<PropertyGroup Condition="'$(ContinuousIntegrationBuild)' == 'true'">
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<WarningsNotAsErrors>$(WarningsNotAsErrors);NU1900;NU1901;NU1902;NU1903;NU1904</WarningsNotAsErrors>
</PropertyGroup>
</Project>