SharpSource
SharpSource copied to clipboard
surfacing defects at compile time and preventing issues that would otherwise go unnoticed
https://docs.microsoft.com/en-us/aspnet/core/fundamentals/minimal-apis?view=aspnetcore-6.0 https://github.com/Vannevelj/SharpSource/pull/135/files#diff-68339987dc017244271e6e040b232a954792ec5d605c2b60bca724e89ff979aaR32 provides an ignored test
https://twitter.com/marcgravell/status/1023176337652109312 ```csharp static Task Bad() { lock(something) { return Task.FromCompletedTask; } } ``` ```csharp static Task Bad() { using(something) { return Task.FromCompletedTask; } } ```
Bitwise operations should only be executed on enums that have the `[Flags]` attribute. This attribute makes sure the numerical values of the enum options are single bit representations: 0, 1,...
The total size of a struct should not exceed 16 bytes. We can measure this by looking at the sizes of the types held as fields though there are some...
New in .NET 9, there's the `Lock` type. Haven't checked whether it comes with an analyzer but if not, we should suggest to change it to that if the user...