Banning init props in Hawk
parent
4c416e88d7
commit
ff2a2e6dd3
|
@ -84,7 +84,7 @@ basic [function pointers](https://docs.microsoft.com/en-us/dotnet/csharp/languag
|
||||||
[pattern matching](https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/operators/patterns#logical-patterns) III | ✔️ | ✔️ | encouraged
|
[pattern matching](https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/operators/patterns#logical-patterns) III | ✔️ | ✔️ | encouraged
|
||||||
[unindented `Main`](https://docs.microsoft.com/en-us/dotnet/csharp/fundamentals/program-structure/top-level-statements) | ✔️ | N/A | N/A (neither executable uses it)
|
[unindented `Main`](https://docs.microsoft.com/en-us/dotnet/csharp/fundamentals/program-structure/top-level-statements) | ✔️ | N/A | N/A (neither executable uses it)
|
||||||
[`with` for records](https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/operators/with-expression) | ✔️ | ✔️ | encouraged when records are used
|
[`with` for records](https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/operators/with-expression) | ✔️ | ✔️ | encouraged when records are used
|
||||||
[`init`](https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/init) | ⭕ | ⭕ | discouraged
|
[`init`](https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/init) | ⭕ | ⭕ | disallowed (since such accessors can write to `readonly` fields)
|
||||||
[`record class`](https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/builtin-types/record) | ✔️ | ✔️ | discouraged
|
[`record class`](https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/builtin-types/record) | ✔️ | ✔️ | discouraged
|
||||||
^ C# 9 ^ | 🔵 `net48` | 🟢 `ns2.0` | ---
|
^ C# 9 ^ | 🔵 `net48` | 🟢 `ns2.0` | ---
|
||||||
`@$""` (instead of `$@""`) | ✔️ | ✔️ | disallowed
|
`@$""` (instead of `$@""`) | ✔️ | ✔️ | disallowed
|
||||||
|
|
Loading…
Reference in New Issue