diff --git a/Directory.Build.props b/Directory.Build.props index a3e952ff..7acf2117 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -15,7 +15,7 @@ true - CS1591;SA1601 + CS1591;SA1600;SA1601 true $(MSBuildThisFileDirectory)Kyoo.ruleset diff --git a/Kyoo.Core/Controllers/Repositories/LocalRepository.cs b/Kyoo.Core/Controllers/Repositories/LocalRepository.cs index b5b9d46e..93c8138f 100644 --- a/Kyoo.Core/Controllers/Repositories/LocalRepository.cs +++ b/Kyoo.Core/Controllers/Repositories/LocalRepository.cs @@ -24,7 +24,7 @@ namespace Kyoo.Core.Controllers /// /// The Entity Framework's Database handle. /// - protected readonly DbContext Database; + protected DbContext Database { get; } /// /// The default sort order that will be used for this resource's type. diff --git a/Kyoo.Core/Views/Helper/CrudApi.cs b/Kyoo.Core/Views/Helper/CrudApi.cs index 385ac276..b075cfb1 100644 --- a/Kyoo.Core/Views/Helper/CrudApi.cs +++ b/Kyoo.Core/Views/Helper/CrudApi.cs @@ -16,7 +16,8 @@ namespace Kyoo.Core.Api where T : class, IResource { private readonly IRepository _repository; - protected readonly Uri BaseURL; + + protected Uri BaseURL { get; } public CrudApi(IRepository repository, Uri baseURL) { diff --git a/Kyoo.Host.WindowsTrait/Kyoo.Host.WindowsTrait.csproj b/Kyoo.Host.WindowsTrait/Kyoo.Host.WindowsTrait.csproj index a1b456db..a889b6e4 100644 --- a/Kyoo.Host.WindowsTrait/Kyoo.Host.WindowsTrait.csproj +++ b/Kyoo.Host.WindowsTrait/Kyoo.Host.WindowsTrait.csproj @@ -1,8 +1,4 @@ - - true - - diff --git a/Kyoo.Host.WindowsTrait/Program.cs b/Kyoo.Host.WindowsTrait/Program.cs index 65b9a2bc..968e3c28 100644 --- a/Kyoo.Host.WindowsTrait/Program.cs +++ b/Kyoo.Host.WindowsTrait/Program.cs @@ -14,12 +14,14 @@ namespace Kyoo.Host.WindowsTrait #else private const string Environment = "Production"; #endif - + /// /// The main entry point for the application that overrides the default host. /// It adds a system trait for windows and since the host is build as a windows executable instead of a console /// app, the console is not showed. /// + /// Command line arguments + /// A representing the lifetime of the program. public static Task Main(string[] args) { Application application = new(Environment); @@ -29,4 +31,4 @@ namespace Kyoo.Host.WindowsTrait }); } } -} \ No newline at end of file +} diff --git a/Kyoo.Host.WindowsTrait/SystemTrait.cs b/Kyoo.Host.WindowsTrait/SystemTrait.cs index d46a132a..f0b2e7f1 100644 --- a/Kyoo.Host.WindowsTrait/SystemTrait.cs +++ b/Kyoo.Host.WindowsTrait/SystemTrait.cs @@ -55,7 +55,7 @@ namespace Kyoo.Host.WindowsTrait /// public void Dispose() { - System.Windows.Forms.Application.Exit(); + Application.Exit(); _thread?.Join(); _thread = null; } @@ -92,7 +92,7 @@ namespace Kyoo.Host.WindowsTrait _options = options; AppDomain.CurrentDomain.ProcessExit += (_, _) => Dispose(); - System.Windows.Forms.Application.ApplicationExit += (_, _) => Dispose(); + Application.ApplicationExit += (_, _) => Dispose(); _icon = new NotifyIcon { @@ -125,7 +125,7 @@ namespace Kyoo.Host.WindowsTrait public static void Run(IApplication application, IOptions options) { using InternalSystemTrait trait = new(application, options); - System.Windows.Forms.Application.Run(trait); + Application.Run(trait); } /// diff --git a/Kyoo.ruleset b/Kyoo.ruleset index 89b71c1b..cd55611d 100644 --- a/Kyoo.ruleset +++ b/Kyoo.ruleset @@ -41,6 +41,5 @@ - diff --git a/stylecop.json b/stylecop.json index 70dcd450..430e9e44 100644 --- a/stylecop.json +++ b/stylecop.json @@ -1,6 +1,12 @@ { "$schema": "https://raw.githubusercontent.com/DotNetAnalyzers/StyleCopAnalyzers/master/StyleCop.Analyzers/StyleCop.Analyzers/Settings/stylecop.schema.json", "settings": { - + "documentationRules": { + "copyrightText": "Copyright (c) {companyName}. All rights reserved.\nLicensed under the {licenseName} license. See {licenseFile} file in the project root for full license information.", + "variables": { + "licenseName": "GPL-3.0", + "licenseFile": "LICENSE" + } + } } }