Skip to content

Commit 645856d

Browse files
shanselmanCopilot
andcommitted
eng: add shared analyzer and audit props
Add src/Directory.Build.props to align source projects on the recommended analyzer baseline and transitive NuGet vulnerability auditing. Also allow .NET SDK feature-band roll-forward so the repo can build with installed 10.0.2xx SDKs while retaining the 10.0.100 baseline. Supersedes #211 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent c1296be commit 645856d

2 files changed

Lines changed: 31 additions & 1 deletion

File tree

global.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"sdk": {
33
"version": "10.0.100",
4-
"rollForward": "latestPatch"
4+
"rollForward": "latestFeature"
55
}
66
}

src/Directory.Build.props

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<Project>
2+
3+
<!--
4+
Shared build configuration for OpenClaw.Shared, OpenClaw.Tray.WinUI, and OpenClaw.Cli.
5+
6+
OpenClaw.CommandPalette has its own Directory.Build.props one level deeper, so MSBuild
7+
stops walking up at that file and this one does NOT apply to CommandPalette.
8+
9+
Properties here set a consistent quality baseline that matches the CommandPalette project's
10+
existing settings and are safe defaults for all src projects:
11+
- NET analyzers + Recommended rule set: catch common bugs and anti-patterns
12+
- NuGetAudit covers transitive packages so CVEs in indirect deps surface during restore
13+
-->
14+
15+
<PropertyGroup>
16+
<!-- Enable the built-in .NET source analyzers (already the SDK default for net5+,
17+
but made explicit here so the intent is clear and auditable). -->
18+
<EnableNETAnalyzers>true</EnableNETAnalyzers>
19+
20+
<!-- Recommended rule set: a superset of Default that enables additional quality rules
21+
aligned with the CommandPalette project's AnalysisMode=Recommended setting.
22+
Rules produce warnings only; src projects do not set TreatWarningsAsErrors. -->
23+
<AnalysisMode>Recommended</AnalysisMode>
24+
25+
<!-- Audit all package dependencies (direct + transitive) for known CVEs during restore.
26+
Defaults to "direct" in the SDK; "all" provides broader security coverage. -->
27+
<NuGetAuditMode>all</NuGetAuditMode>
28+
</PropertyGroup>
29+
30+
</Project>

0 commit comments

Comments
 (0)