Skip to content

[Repo Assist] eng: add src/Directory.Build.props with analyzer and NuGet audit settings - #211

Closed
github-actions[bot] wants to merge 1 commit into
masterfrom
repo-assist/eng-src-directory-build-props-2026-04-25-5f0e668784ef2e01
Closed

[Repo Assist] eng: add src/Directory.Build.props with analyzer and NuGet audit settings#211
github-actions[bot] wants to merge 1 commit into
masterfrom
repo-assist/eng-src-directory-build-props-2026-04-25-5f0e668784ef2e01

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

🤖 This is an automated PR from Repo Assist.

Adds src/Directory.Build.props to give OpenClaw.Shared, OpenClaw.Tray.WinUI, and OpenClaw.Cli a consistent quality baseline that already exists in OpenClaw.CommandPalette/Directory.Build.props.

What changed

New file: src/Directory.Build.props

Setting Value Why
EnableNETAnalyzers true Makes the intent explicit (already the SDK default for .NET 5+)
AnalysisMode Recommended Enables a broader rule set than Default — catches common bugs, anti-patterns, and style issues. Matches the CommandPalette project's existing setting.
NuGetAuditMode all Audits direct and transitive dependencies for known CVEs during restore (SDK default is direct only).

What's NOT affected

OpenClaw.CommandPalette has its own Directory.Build.props one directory level deeper (src/OpenClaw.CommandPalette/Directory.Build.props). MSBuild stops walking up when it finds the nearest Directory.Build.props, so this file does not apply to CommandPalette at all — CommandPalette already has its own equivalent settings.

Trade-offs

  • AnalysisMode=Recommended may surface new warnings (not errors) in the Tray app build (WinUI) and future code. Source projects don't have TreatWarningsAsErrors, so CI will not break. Any new warnings will be visible and actionable.
  • NuGetAuditMode=all may produce restore-time warnings if a transitive dependency has a known CVE. This is intentional — surfacing the issue is the point.

Test Status

  • dotnet test OpenClaw.Shared.Tests652 passed, 20 skipped (unchanged from baseline)
  • dotnet test OpenClaw.Tray.Tests — not runnable in this environment (WinUI); no src changes, no expected impact
  • ./build.ps1 — not runnable on Linux; no logic changes to source files

Generated by 🌈 Repo Assist, see workflow run. Learn more.

Generated by 🌈 Repo Assist, see workflow run. Learn more.

To install this agentic workflow, run

gh aw add githubnext/agentics/workflows/repo-assist.md@97143ac59cb3a13ef2a77581f929f06719c7402a

…ings

Adds a Directory.Build.props for OpenClaw.Shared, OpenClaw.Tray.WinUI,
and OpenClaw.Cli that aligns them with the quality baseline already
present in OpenClaw.CommandPalette/Directory.Build.props.

Changes:
- EnableNETAnalyzers=true: explicit (already the SDK default for .NET 5+)
- AnalysisMode=Recommended: enables the Recommended rule set (superset of
  Default), matching CommandPalette's existing setting
- NuGetAuditMode=all: audit direct AND transitive packages for known CVEs
  during restore (default is 'direct')

OpenClaw.CommandPalette is NOT affected — MSBuild stops at its own
Directory.Build.props one directory level deeper and does not walk up
to this file.

Test status: 652 passed, 20 skipped (unchanged from baseline).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@shanselman

Copy link
Copy Markdown
Collaborator

Superseded by #219, which carries this Directory.Build.props analyzer/audit baseline in a human-reviewed branch.

@shanselman shanselman closed this Apr 27, 2026
@shanselman
shanselman deleted the repo-assist/eng-src-directory-build-props-2026-04-25-5f0e668784ef2e01 branch April 27, 2026 03:04
codemonkeychris pushed a commit to codemonkeychris/openclaw-windows-node that referenced this pull request Apr 27, 2026
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 openclaw#211

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant