From 828500f984c267cd27efcf27de4e6d8a79d2dc95 Mon Sep 17 00:00:00 2001 From: AJ Isaacs Date: Tue, 22 Sep 2026 16:45:54 -0400 Subject: [PATCH] chore: replace CSharpier with dotnet format --- .config/dotnet-tools.json | 13 ------------- .csharpierignore | 4 ---- .editorconfig | 16 ++++++++-------- README.md | 6 +++--- 4 files changed, 11 insertions(+), 28 deletions(-) delete mode 100644 .config/dotnet-tools.json delete mode 100644 .csharpierignore diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json deleted file mode 100644 index 6e2e244..0000000 --- a/.config/dotnet-tools.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "version": 1, - "isRoot": true, - "tools": { - "csharpier": { - "version": "1.3.0", - "commands": [ - "csharpier" - ], - "rollForward": false - } - } -} \ No newline at end of file diff --git a/.csharpierignore b/.csharpierignore deleted file mode 100644 index 8da2f97..0000000 --- a/.csharpierignore +++ /dev/null @@ -1,4 +0,0 @@ -# CSharpier formats only C# sources; project/config XML keeps its layout. -**/*.csproj -**/*.config -**/*.xml diff --git a/.editorconfig b/.editorconfig index 8083617..d89830d 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,10 +1,10 @@ # Unified code style for OpenNest. -# Canonical formatter: CSharpier (see .config/dotnet-tools.json). -# dotnet tool restore -# dotnet csharpier check . # verify before committing -# dotnet csharpier format . # fix -# These settings match CSharpier's conventions so IDE auto-formatting -# (VS / Rider / VS Code) stays consistent with the formatter. +# Canonical formatter: dotnet format. +# Format only the files or directories being changed: +# dotnet format OpenNest.sln --include path/to/changed-file.cs +# dotnet format OpenNest.sln --include path/to/changed-file.cs --verify-no-changes +# These settings are used by dotnet format and IDE auto-formatting +# (VS / Rider / VS Code). root = true @@ -25,8 +25,8 @@ indent_size = 2 [*.{cs,csx}] indent_style = space indent_size = 4 -# CSharpier wraps code at 100 columns; dotnet format cannot re-wrap, but -# IDEs surface a visual guide and analyzers can flag hard violations. +# dotnet format cannot re-wrap source to this limit, but IDEs can surface it +# as a visual guide and analyzers can flag hard violations. max_line_length = 100 # --- Using directives (System first, outside the namespace) --- diff --git a/README.md b/README.md index 94fb72c..35c627e 100644 --- a/README.md +++ b/README.md @@ -67,11 +67,11 @@ dotnet build OpenNest.sln ### Code formatting -C# sources are formatted with [CSharpier](https://csharpier.com/), pinned in `.config/dotnet-tools.json`; the matching style (4-space indent, Allman braces, System-first usings, 100-column wraps) is mirrored in `.editorconfig` so IDE auto-format agrees. Before committing: +C# sources are formatted with [`dotnet format`](https://learn.microsoft.com/dotnet/core/tools/dotnet-format), using the repository's `.editorconfig` settings so IDE auto-formatting stays consistent. Format only the files or directories you change, rather than reformatting the full solution: ```bash -dotnet tool restore -dotnet csharpier format . # apply; use `check` instead of `format` to verify only +dotnet format OpenNest.sln --include path/to/changed-file.cs # apply +dotnet format OpenNest.sln --include path/to/changed-file.cs --verify-no-changes # verify only ``` ### Cross-platform engine contract tests