From c65c7ae9224c74f73424503123713b782ddfe73d Mon Sep 17 00:00:00 2001 From: Zoe Roux Date: Fri, 6 Aug 2021 12:45:06 +0200 Subject: [PATCH] FileSystem: Fixing SonarCloud errors --- Kyoo/Controllers/FileSystems/HttpFileSystem.cs | 10 ++++------ Kyoo/Controllers/FileSystems/LocalFileSystem.cs | 2 +- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/Kyoo/Controllers/FileSystems/HttpFileSystem.cs b/Kyoo/Controllers/FileSystems/HttpFileSystem.cs index 82409cdc..c7954db8 100644 --- a/Kyoo/Controllers/FileSystems/HttpFileSystem.cs +++ b/Kyoo/Controllers/FileSystems/HttpFileSystem.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; using System.IO; using System.Net.Http; using System.Threading.Tasks; @@ -94,6 +95,8 @@ namespace Kyoo.Controllers /// /// An to proxy an http request. /// + // TODO remove this suppress message once the class has been implemented. + [SuppressMessage("ReSharper", "NotAccessedField.Local")] public class HttpForwardResult : IActionResult { /// @@ -126,12 +129,7 @@ namespace Kyoo.Controllers public Task ExecuteResultAsync(ActionContext context) { // TODO implement that, example: https://github.com/twitchax/AspNetCore.Proxy/blob/14dd0f212d7abb43ca1bf8c890d5efb95db66acb/src/Core/Extensions/Http.cs#L15 - - // Silence unused warnings - if (_path != null || _rangeSupport || _type == null) - throw new NotImplementedException(); - else - throw new NotImplementedException(); + throw new NotImplementedException(); } } } \ No newline at end of file diff --git a/Kyoo/Controllers/FileSystems/LocalFileSystem.cs b/Kyoo/Controllers/FileSystems/LocalFileSystem.cs index 18d887a0..87575e0a 100644 --- a/Kyoo/Controllers/FileSystems/LocalFileSystem.cs +++ b/Kyoo/Controllers/FileSystems/LocalFileSystem.cs @@ -133,7 +133,7 @@ namespace Kyoo.Controllers public Task GetExtraDirectory(T resource) { if (!_options.CurrentValue.MetadataInShow) - return null; + return Task.FromResult(null); return Task.FromResult(resource switch { Show show => Combine(show.Path, "Extra"),