SharpSource icon indicating copy to clipboard operation
SharpSource copied to clipboard

surfacing defects at compile time and preventing issues that would otherwise go unnoticed

Results 35 SharpSource issues
Sort by recently updated
recently updated
newest added

Replace ```cs private Task DoThing() { return someTask; } ``` with ```cs private async Task DoThing() { return await someTask; } ```

enhancement

https://twitter.com/STeplyakov/status/1727016474211176784?t=ow01Oe6GWAZtKvE843MR6Q&s=19

enhancement
good first issue

The .NET ES/OS library does not throw an exception. Instead, it returns an object that may contain error information. This analyzer would verify that we're using the response object instead...

enhancement

https://learn.microsoft.com/en-us/dotnet/core/diagnostics/distributed-tracing-instrumentation-walkthroughs#activity Either use `activity.stop()` or `using activity`. No `using` and no `stop()` means the activity will get lost (presumably?)

enhancement

```cs file record Range(int Lower, int Upper) { public int Distance => Upper - Lower; private bool Intersects(Range other) => other.Lower = Lower; public static IEnumerable operator -(Range minuend, Range...

bug

> DO NOT pass null as the event data parameter when raising an event. You should pass EventArgs.Empty if you don’t want to pass any data to the event handling...

enhancement
good first issue

https://learn.microsoft.com/en-us/aspnet/core/web-api/?view=aspnetcore-7.0#automatic-http-400-responses

enhancement

https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.valuetask-1?view=net-7.0#remarks ```cs ValueTask Method() => ValueTask.CompletedTask; var task = Method(); await task; await task; ```

enhancement