@cratis/pi 7.153.2 → 7.153.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -62,6 +62,16 @@ Every rule here reduces noise. `var` avoids redundant type repetition. Expressio
|
|
|
62
62
|
- Use collection expression arguments (`[with(capacity: n), .. items]`, `[with(comparer), ..]`) instead of constructor calls, and labeled `break`/`continue` instead of Boolean flags or `goto` in nested loops (IDE0410).
|
|
63
63
|
- Do not introduce `union` types, runtime-async, or the memory-safety preview features, and do not retrofit `closed` onto an existing public type — a public API change is a major version.
|
|
64
64
|
- Keep IDE style rule severities at `suggestion`, never `warning`: Release builds treat warnings as errors.
|
|
65
|
+
- Under the .NET 11 SDK, IDE0370 (unnecessary null-forgiving operator) and IDE0001/IDE0002 (simplify names and member access) surface wherever code style is enforced: `dotnet format --verify-no-changes`, or `EnforceCodeStyleInBuild` with warnings as errors and `dotnet_analyzer_diagnostic.severity = warning`. IDE0001/IDE0002 are `EnforceOnBuild=Never`, so only `dotnet format` and the IDE surface them; IDE0370 is `WhenExplicitlyEnabled`, so the build enforces it only when something enables it explicitly, such as an all-analyzers severity line. A repository that already enforces style at `warning` keeps that severity and fixes these findings in its .NET 11 change.
|
|
66
|
+
- Exception for multi-target libraries only (for example `net10.0;net11.0`): IDE0370 is analyzed per compilation and can flag a `!` another target still needs ([roslyn#81632](https://github.com/dotnet/roslyn/issues/81632), [roslyn#82003](https://github.com/dotnet/roslyn/issues/82003)). Remove every `!` that is unnecessary on all targets. If target-dependent ones remain, add this to that repository's `.editorconfig`, with a tracking issue, and verify with a build of all target frameworks:
|
|
67
|
+
|
|
68
|
+
```ini
|
|
69
|
+
# IDE0370 is analyzed per target framework and flags null-forgiving operators another target still needs.
|
|
70
|
+
# See https://github.com/dotnet/roslyn/issues/81632 and https://github.com/dotnet/roslyn/issues/82003. Tracked in <issue>.
|
|
71
|
+
dotnet_diagnostic.IDE0370.severity = suggestion
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Never `none`, never in shared or global config, and never for `net11.0`-only executables.
|
|
65
75
|
|
|
66
76
|
## Nullable Reference Types
|
|
67
77
|
|
|
@@ -61,6 +61,16 @@ Every rule here reduces noise. `var` avoids redundant type repetition. Expressio
|
|
|
61
61
|
- Use collection expression arguments (`[with(capacity: n), .. items]`, `[with(comparer), ..]`) instead of constructor calls, and labeled `break`/`continue` instead of Boolean flags or `goto` in nested loops (IDE0410).
|
|
62
62
|
- Do not introduce `union` types, runtime-async, or the memory-safety preview features, and do not retrofit `closed` onto an existing public type — a public API change is a major version.
|
|
63
63
|
- Keep IDE style rule severities at `suggestion`, never `warning`: Release builds treat warnings as errors.
|
|
64
|
+
- Under the .NET 11 SDK, IDE0370 (unnecessary null-forgiving operator) and IDE0001/IDE0002 (simplify names and member access) surface wherever code style is enforced: `dotnet format --verify-no-changes`, or `EnforceCodeStyleInBuild` with warnings as errors and `dotnet_analyzer_diagnostic.severity = warning`. IDE0001/IDE0002 are `EnforceOnBuild=Never`, so only `dotnet format` and the IDE surface them; IDE0370 is `WhenExplicitlyEnabled`, so the build enforces it only when something enables it explicitly, such as an all-analyzers severity line. A repository that already enforces style at `warning` keeps that severity and fixes these findings in its .NET 11 change.
|
|
65
|
+
- Exception for multi-target libraries only (for example `net10.0;net11.0`): IDE0370 is analyzed per compilation and can flag a `!` another target still needs ([roslyn#81632](https://github.com/dotnet/roslyn/issues/81632), [roslyn#82003](https://github.com/dotnet/roslyn/issues/82003)). Remove every `!` that is unnecessary on all targets. If target-dependent ones remain, add this to that repository's `.editorconfig`, with a tracking issue, and verify with a build of all target frameworks:
|
|
66
|
+
|
|
67
|
+
```ini
|
|
68
|
+
# IDE0370 is analyzed per target framework and flags null-forgiving operators another target still needs.
|
|
69
|
+
# See https://github.com/dotnet/roslyn/issues/81632 and https://github.com/dotnet/roslyn/issues/82003. Tracked in <issue>.
|
|
70
|
+
dotnet_diagnostic.IDE0370.severity = suggestion
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Never `none`, never in shared or global config, and never for `net11.0`-only executables.
|
|
64
74
|
|
|
65
75
|
## Nullable Reference Types
|
|
66
76
|
|