chore: replace CSharpier with dotnet format
This commit is contained in:
@@ -1,13 +0,0 @@
|
||||
{
|
||||
"version": 1,
|
||||
"isRoot": true,
|
||||
"tools": {
|
||||
"csharpier": {
|
||||
"version": "1.3.0",
|
||||
"commands": [
|
||||
"csharpier"
|
||||
],
|
||||
"rollForward": false
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
# CSharpier formats only C# sources; project/config XML keeps its layout.
|
||||
**/*.csproj
|
||||
**/*.config
|
||||
**/*.xml
|
||||
+8
-8
@@ -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) ---
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user