Skip to content

[Repo Assist] eng: add dotnet format CI check and normalize OpenClaw.Shared whitespace #431

Closed

Description

@github-actions

🤖 This PR was created by Repo Assist, an automated AI assistant.

Summary

Implements step 2 of #362 (build hygiene gaps): adds dotnet format --verify-no-changes to the CI test job and fixes the existing whitespace violations it uncovers.

Changes

.gitattributes

Added explicit eol=crlf rules for C# source and project files:

*.cs      text eol=crlf
*.csproj  text eol=crlf
*.props   text eol=crlf
*.targets text eol=crlf
*.xaml    text eol=crlf
*.slnx    text eol=crlf

This ensures dotnet format --verify-no-changes works correctly on Linux CI runners (where checkout previously produced LF). The stored content remains LF in the git object store; the eol=crlf attribute causes checkout to produce CRLF on all platforms, satisfying the .editorconfig end_of_line = crlf rule.

.github/workflows/ci.yml

Added a new step in the Windows test job, immediately after dotnet restore:

- name: Check formatting
  run: dotnet format src/OpenClaw.Shared --verify-no-changes

Only OpenClaw.Shared is checked (the cross-platform library). WinUI/Tray projects have Windows-only build dependencies not needed for whitespace checks.

src/OpenClaw.Shared/** (16 files)

Applied dotnet format to pre-fix all existing violations so the new CI gate passes immediately. All changes are whitespace-only:

  • Blank line normalization between class members
  • Brace/expression spacing alignment

No logic changes. Diff is whitespace-only.

Why

Without this gate, formatting drift accumulates silently across contributors and PRs. The .editorconfig already defines the rules; this PR just enforces them in CI.

Test Status

  • ✅ dotnet format src/OpenClaw.Shared --verify-no-changes — 0 errors after fix
  • ✅ Shared tests: 1615 passed, 7 pre-existing failures, 28 skipped
  • ✅ Tray tests: 986 passed, 8 pre-existing failures, 48 skipped

Closes #362 (partially — step 2 of 2; step 1 was the analyzers PR on branch repo-assist/eng-enable-analyzers-src-362)

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

Note

This was originally intended as a pull request, but the git push operation failed.

Workflow Run: View run details and download bundle artifact

The bundle file is available in the agent artifact in the workflow run linked above.

To create a pull request with the changes:

# Download the artifact from the workflow run
gh run download 25991045819 -n agent -D /tmp/agent-25991045819

# Fetch the bundle into a local branch
git fetch /tmp/agent-25991045819/aw-repo-assist-eng-dotnet-format-ci-2026-05-17.bundle refs/heads/repo-assist/eng-dotnet-format-ci-2026-05-17:refs/heads/repo-assist/eng-dotnet-format-ci-2026-05-17-53acc335d86ad67b
git checkout repo-assist/eng-dotnet-format-ci-2026-05-17-53acc335d86ad67b

# Push the branch to origin
git push origin repo-assist/eng-dotnet-format-ci-2026-05-17-53acc335d86ad67b

# Create the pull request
gh pr create --title '[Repo Assist] eng: add dotnet format CI check and normalize OpenClaw.Shared whitespace' --base master --head repo-assist/eng-dotnet-format-ci-2026-05-17-53acc335d86ad67b --repo openclaw/openclaw-windows-node

Activity

  1. shanselman commented on May 17, 2026

    @shanselman
    Collaborator

    Closing as not important enough to pursue right now. We can reopen later if we decide to make dotnet format/line-ending normalization part of the repo hygiene plan.

  2. locked as resolved and limited conversation to collaborators on May 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions