Skip to content

[Repo Assist] eng: add .editorconfig to enforce consistent C# code style#107

Draft
github-actions[bot] wants to merge 1 commit intomasterfrom
repo-assist/eng-add-editorconfig-20260325-a7b0fff72df51ceb
Draft

[Repo Assist] eng: add .editorconfig to enforce consistent C# code style#107
github-actions[bot] wants to merge 1 commit intomasterfrom
repo-assist/eng-add-editorconfig-20260325-a7b0fff72df51ceb

Conversation

@github-actions
Copy link
Contributor

🤖 This is an automated draft PR from Repo Assist.

Summary

Adds a root-level .editorconfig to the repository. There was no editor config previously — this captures the conventions already in use so that IDEs and dotnet format agree with the existing codebase.

What it covers

Area Setting
Encoding / line endings UTF-8, CRLF (Windows project)
Indentation 4-space for C#; 2-space for YAML, JSON, XML
Brace style Allman (csharp_new_line_before_open_brace = all) — matches current code
Namespace declarations file_scoped — matches codebase convention
var preference var when type is apparent, explicit otherwise
Null / pattern matching prefer is null, ?., ??
Private field naming _camelCase — matches current code
Readonly prefer readonly fields where possible
Trailing whitespace / final newline trimmed / enforced

The .editorconfig is advisory (:suggestion/:silent severities) — no existing code will be flagged as errors. It gives contributors consistent formatting from their first keystroke.

Why

  • Without a .editorconfig, VS Code, Visual Studio, and Rider all default to different formatting choices (tabs vs spaces, namespace styles, etc.).
  • Once in place, dotnet format --verify-no-changes can be added to CI as a future zero-cost linting gate.

Test Status

✅ All 503 shared tests pass, 18 skipped. dotnet test tests/OpenClaw.Shared.Tests/
⚠️ WinUI build requires Windows — no functional code was changed; .editorconfig is tooling metadata only.

Generated by Repo Assist ·

To install this agentic workflow, run

gh aw add githubnext/agentics/workflows/repo-assist.md@cbb46ab386962aa371045839fc9998ee4e97ca64 
Adds a root-level .editorconfig covering: - UTF-8, CRLF line endings, 4-space indent for C# - 2-space indent for YAML, JSON, XML project files - Allman brace style (matches existing codebase) - File-scoped namespace declarations (matches codebase convention) - 'var' style preferences - Null-check and pattern-matching preferences - Naming convention: _camelCase for private instance fields No code changes — documentation/tooling only. 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

0 participants