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.
|
# Unified code style for OpenNest.
|
||||||
# Canonical formatter: CSharpier (see .config/dotnet-tools.json).
|
# Canonical formatter: dotnet format.
|
||||||
# dotnet tool restore
|
# Format only the files or directories being changed:
|
||||||
# dotnet csharpier check . # verify before committing
|
# dotnet format OpenNest.sln --include path/to/changed-file.cs
|
||||||
# dotnet csharpier format . # fix
|
# dotnet format OpenNest.sln --include path/to/changed-file.cs --verify-no-changes
|
||||||
# These settings match CSharpier's conventions so IDE auto-formatting
|
# These settings are used by dotnet format and IDE auto-formatting
|
||||||
# (VS / Rider / VS Code) stays consistent with the formatter.
|
# (VS / Rider / VS Code).
|
||||||
|
|
||||||
root = true
|
root = true
|
||||||
|
|
||||||
@@ -25,8 +25,8 @@ indent_size = 2
|
|||||||
[*.{cs,csx}]
|
[*.{cs,csx}]
|
||||||
indent_style = space
|
indent_style = space
|
||||||
indent_size = 4
|
indent_size = 4
|
||||||
# CSharpier wraps code at 100 columns; dotnet format cannot re-wrap, but
|
# dotnet format cannot re-wrap source to this limit, but IDEs can surface it
|
||||||
# IDEs surface a visual guide and analyzers can flag hard violations.
|
# as a visual guide and analyzers can flag hard violations.
|
||||||
max_line_length = 100
|
max_line_length = 100
|
||||||
|
|
||||||
# --- Using directives (System first, outside the namespace) ---
|
# --- Using directives (System first, outside the namespace) ---
|
||||||
|
|||||||
@@ -67,11 +67,11 @@ dotnet build OpenNest.sln
|
|||||||
|
|
||||||
### Code formatting
|
### 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
|
```bash
|
||||||
dotnet tool restore
|
dotnet format OpenNest.sln --include path/to/changed-file.cs # apply
|
||||||
dotnet csharpier format . # apply; use `check` instead of `format` to verify only
|
dotnet format OpenNest.sln --include path/to/changed-file.cs --verify-no-changes # verify only
|
||||||
```
|
```
|
||||||
|
|
||||||
### Cross-platform engine contract tests
|
### Cross-platform engine contract tests
|
||||||
|
|||||||
Reference in New Issue
Block a user