[Repo Assist] eng: add .editorconfig to enforce consistent C# code style#107
Draft
github-actions[bot] wants to merge 1 commit intomasterfrom
Draft
Conversation
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>
22 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 This is an automated draft PR from Repo Assist.
Summary
Adds a root-level
.editorconfigto the repository. There was no editor config previously — this captures the conventions already in use so that IDEs anddotnet formatagree with the existing codebase.What it covers
csharp_new_line_before_open_brace = all) — matches current codefile_scoped— matches codebase conventionvarpreferencevarwhen type is apparent, explicit otherwiseis null,?.,??_camelCase— matches current codereadonlyfields where possibleThe
.editorconfigis advisory (:suggestion/:silentseverities) — no existing code will be flagged as errors. It gives contributors consistent formatting from their first keystroke.Why
.editorconfig, VS Code, Visual Studio, and Rider all default to different formatting choices (tabs vs spaces, namespace styles, etc.).dotnet format --verify-no-changescan be added to CI as a future zero-cost linting gate.Test Status
✅ All 503 shared tests pass, 18 skipped.
⚠️ WinUI build requires Windows — no functional code was changed;
dotnet test tests/OpenClaw.Shared.Tests/.editorconfigis tooling metadata only.