Fix Webhook.Controllers (STJ) & harmonize with Console.Advanced #288
Annotations
10 warnings
Webhook.Controllers/Program.cs#L43
Dereference of a possibly null reference.
|
Webhook.Controllers/Services/ConfigureWebhook.cs#L41
This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread.
|
Webhook.Controllers/Services/UpdateHandler.cs#L197
Dereference of a possibly null reference.
|
Webhook.Controllers/Services/UpdateHandler.cs#L27
Forward the 'cancellationToken' parameter to the 'Delay' method or pass in 'CancellationToken.None' explicitly to indicate intentionally not propagating the token (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2016)
|
Webhook.Controllers/Services/UpdateHandler.cs#L24
For improved performance, use the LoggerMessage delegates instead of calling 'LoggerExtensions.LogInformation(ILogger, string?, params object?[])' (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1848)
|
Webhook.Controllers/Services/UpdateHandler.cs#L24
Use PascalCase for named placeholders in the logging message template (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1727)
|
Webhook.Controllers/Services/UpdateHandler.cs#L52
For improved performance, use the LoggerMessage delegates instead of calling 'LoggerExtensions.LogInformation(ILogger, string?, params object?[])' (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1848)
|
Webhook.Controllers/Services/UpdateHandler.cs#L69
For improved performance, use the LoggerMessage delegates instead of calling 'LoggerExtensions.LogInformation(ILogger, string?, params object?[])' (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1848)
|
Webhook.Controllers/Services/ConfigureWebhook.cs#L19
In externally visible method 'ConfigureWebhook.ConfigureWebhook(ILogger<ConfigureWebhook> logger, IServiceProvider serviceProvider, IOptions<BotConfiguration> botOptions)', validate parameter 'botOptions' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)
|
Webhook.Controllers/Controllers/BotController.cs#L21
Modify 'Post' to catch a more specific allowed exception type, or rethrow the exception (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1031)
|
This job succeeded
Loading