Repository navigation
Expand file tree
/
Copy pathDirectory.Build.props
More file actions
53 lines (45 loc) · 2.35 KB
/
Copy pathDirectory.Build.props
File metadata and controls
53 lines (45 loc) · 2.35 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
<Project>
<PropertyGroup>
<MSBuildProjectExtensionsPath Condition="'$(IncludePackagingContent)' == 'true'">$(MSBuildProjectDirectory)\obj\packaging\</MSBuildProjectExtensionsPath>
</PropertyGroup>
<!--
Static analysis policy.
This repository uses only the analyzers that ship with the pinned .NET SDK.
`AnalysisMode=All` opts into the full CA rule set rather than the smaller
default, and `EnforceCodeStyleInBuild` makes the IDE style rules run during
a command-line build instead of only inside an editor.
`EnforceCodeStyleInBuild` runs the IDE rules but does not set their
severity. Severity lives in the root `.editorconfig`, which records the
per-rule policy this repository arrived at one family at a time.
`TreatWarningsAsErrors` closes the gate. The explicit per-rule `error`
entries in `.editorconfig` remain as readable policy history; this switch
is what catches warnings nobody has classified yet, including new compiler
diagnostics and new analyzers introduced by a future SDK bump. When an SDK
upgrade surfaces something new, that is a deliberate decision to make, not
a warning to scroll past.
-->
<PropertyGroup>
<EnableNETAnalyzers>true</EnableNETAnalyzers>
<AnalysisLevel>latest</AnalysisLevel>
<AnalysisMode>All</AnalysisMode>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<!--
NuGet audit diagnostics are excluded from the error gate. They are
published vulnerability advisories, so a new one can appear against an
unchanged dependency graph and would otherwise break `main` with no code
change and no way to fix it in the failing build. They stay visible as
warnings and are triaged as security work.
-->
<WarningsNotAsErrors>$(WarningsNotAsErrors);NU1901;NU1902;NU1903;NU1904</WarningsNotAsErrors>
<!--
Build-time IDE0005 (unnecessary using directives) only reports when
documentation generation is enabled. See dotnet/roslyn#41640. Generating
documentation also turns on CS1591, which would demand XML comments on
every symbol, so CS1591 is suppressed deliberately rather than satisfied
with low-value comments.
-->
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<NoWarn>$(NoWarn);CS1591</NoWarn>
</PropertyGroup>
</Project>