mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-06-21 14:30:34 -04:00
CodingStlye: Fixing whitespaces
This commit is contained in:
parent
8ff2fe3965
commit
d3a03771dd
@ -7,6 +7,7 @@ trim_trailing_whitespace = true
|
|||||||
insert_final_newline = true
|
insert_final_newline = true
|
||||||
indent_style = tab
|
indent_style = tab
|
||||||
indent_size = tab
|
indent_size = tab
|
||||||
|
smart_tab = true
|
||||||
|
|
||||||
[{*.yaml,*.yml}]
|
[{*.yaml,*.yml}]
|
||||||
indent_style = space
|
indent_style = space
|
||||||
|
@ -6,12 +6,15 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.354" />
|
<PackageReference Include="SerilogAnalyzer" Version="0.15.0" PrivateAssets="All" />
|
||||||
|
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.354" PrivateAssets="All" />
|
||||||
|
|
||||||
<None Include="$(MSBuildThisFileDirectory)stylecop.json" Link="stylecop.json" Visible="false" />
|
<None Include="$(MSBuildThisFileDirectory)stylecop.json" Link="stylecop.json" Visible="false" />
|
||||||
<None Include="$(MSBuildThisFileDirectory).editorconfig" Link="stylecop.json" Visible="false" />
|
<None Include="$(MSBuildThisFileDirectory).editorconfig" Link=".editorconfig" Visible="false" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<CodeAnalysisRuleSet>$(MSBuildThisFileDirectory)Kyoo.ruleset</CodeAnalysisRuleSet>
|
<CodeAnalysisRuleSet>$(MSBuildThisFileDirectory)Kyoo.ruleset</CodeAnalysisRuleSet>
|
||||||
|
<!-- <AnalysisMode>AllEnabledByDefault</AnalysisMode>-->
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq.Expressions;
|
using System.Linq.Expressions;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
using Kyoo.Abstractions.Models;
|
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using JetBrains.Annotations;
|
using JetBrains.Annotations;
|
||||||
|
using Kyoo.Abstractions.Models;
|
||||||
|
|
||||||
namespace Kyoo.Abstractions.Controllers
|
namespace Kyoo.Abstractions.Controllers
|
||||||
{
|
{
|
||||||
|
@ -11,7 +11,7 @@ namespace Kyoo.Abstractions.Models
|
|||||||
public float StartTime { get; set; }
|
public float StartTime { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The end time of the chapter (in second from the start of the episode)&.
|
/// The end time of the chapter (in second from the start of the episode).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public float EndTime { get; set; }
|
public float EndTime { get; set; }
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
using JetBrains.Annotations;
|
using JetBrains.Annotations;
|
||||||
|
@ -14,7 +14,8 @@ namespace Kyoo.Abstractions.Models
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// The link to metadata providers that this show has. See <see cref="MetadataID"/> for more information.
|
/// The link to metadata providers that this show has. See <see cref="MetadataID"/> for more information.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[EditableRelation] [LoadableRelation]
|
[EditableRelation]
|
||||||
|
[LoadableRelation]
|
||||||
public ICollection<MetadataID> ExternalIDs { get; set; }
|
public ICollection<MetadataID> ExternalIDs { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
using JetBrains.Annotations;
|
using JetBrains.Annotations;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
@ -46,8 +46,10 @@ namespace Kyoo.Abstractions.Models
|
|||||||
@"(?<ep>[^\.]+)\.(?<lang>\w{0,3})(-(?<index>\d+))?(\.(?<forced>forced))?\.(?<type>\w+)(\.\w*)?");
|
@"(?<ep>[^\.]+)\.(?<lang>\w{0,3})(-(?<index>\d+))?(\.(?<forced>forced))?\.(?<type>\w+)(\.\w*)?");
|
||||||
|
|
||||||
if (!match.Success)
|
if (!match.Success)
|
||||||
|
{
|
||||||
throw new ArgumentException("Invalid track slug. " +
|
throw new ArgumentException("Invalid track slug. " +
|
||||||
"Format: {episodeSlug}.{language}[-{index}][.forced].{type}[.{extension}]");
|
"Format: {episodeSlug}.{language}[-{index}][.forced].{type}[.{extension}]");
|
||||||
|
}
|
||||||
|
|
||||||
EpisodeSlug = match.Groups["ep"].Value;
|
EpisodeSlug = match.Groups["ep"].Value;
|
||||||
Language = match.Groups["lang"].Value;
|
Language = match.Groups["lang"].Value;
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics.CodeAnalysis;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
@ -70,6 +71,8 @@ namespace Kyoo.Authentication
|
|||||||
/// <param name="configuration">The configuration to use</param>
|
/// <param name="configuration">The configuration to use</param>
|
||||||
/// <param name="logger">The logger used to allow IdentityServer to log things</param>
|
/// <param name="logger">The logger used to allow IdentityServer to log things</param>
|
||||||
/// <param name="environment">The environment information to check if the app runs in debug mode</param>
|
/// <param name="environment">The environment information to check if the app runs in debug mode</param>
|
||||||
|
[SuppressMessage("ReSharper", "ContextualLoggerProblem",
|
||||||
|
Justification = "The logger is used for a dependency that is not created via the container.")]
|
||||||
public AuthenticationModule(IConfiguration configuration,
|
public AuthenticationModule(IConfiguration configuration,
|
||||||
ILogger<DefaultCorsPolicyService> logger,
|
ILogger<DefaultCorsPolicyService> logger,
|
||||||
IWebHostEnvironment environment)
|
IWebHostEnvironment environment)
|
||||||
|
@ -135,7 +135,8 @@ namespace Kyoo.Authentication.Views
|
|||||||
{
|
{
|
||||||
return BadRequest(new
|
return BadRequest(new
|
||||||
{
|
{
|
||||||
code = "ExpiredOTAC", description = "The OTAC has expired. Try to login with your password."
|
code = "ExpiredOTAC",
|
||||||
|
description = "The OTAC has expired. Try to login with your password."
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net5.0</TargetFramework>
|
<TargetFramework>net5.0</TargetFramework>
|
||||||
@ -6,7 +6,6 @@
|
|||||||
<RootNamespace>Kyoo.Database</RootNamespace>
|
<RootNamespace>Kyoo.Database</RootNamespace>
|
||||||
<Authors>Zoe Roux</Authors>
|
<Authors>Zoe Roux</Authors>
|
||||||
<RepositoryUrl>https://github.com/AnonymusRaccoon/Kyoo</RepositoryUrl>
|
<RepositoryUrl>https://github.com/AnonymusRaccoon/Kyoo</RepositoryUrl>
|
||||||
<OutputType>Library</OutputType>
|
|
||||||
<LangVersion>default</LangVersion>
|
<LangVersion>default</LangVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
@ -41,9 +41,11 @@ namespace Kyoo.WebApp
|
|||||||
public WebAppModule(ILogger<WebAppModule> logger)
|
public WebAppModule(ILogger<WebAppModule> logger)
|
||||||
{
|
{
|
||||||
if (!Enabled)
|
if (!Enabled)
|
||||||
|
{
|
||||||
logger.LogError("The web app files could not be found, it will be disabled. " +
|
logger.LogError("The web app files could not be found, it will be disabled. " +
|
||||||
"If you cloned the project, you probably forgot to use the --recurse flag");
|
"If you cloned the project, you probably forgot to use the --recurse flag");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public void Configure(IServiceCollection services)
|
public void Configure(IServiceCollection services)
|
||||||
|
@ -10,10 +10,15 @@
|
|||||||
<Rules AnalyzerId="StyleCop.Analyzers" RuleNamespace="StyleCop.CSharp.ReadabilityRules">
|
<Rules AnalyzerId="StyleCop.Analyzers" RuleNamespace="StyleCop.CSharp.ReadabilityRules">
|
||||||
<Rule Id="SA1101" Action="None" /> <!-- PrefixLocalCallsWithThis -->
|
<Rule Id="SA1101" Action="None" /> <!-- PrefixLocalCallsWithThis -->
|
||||||
<Rule Id="SX1101" Action="Warning" /> <!-- DoNotPrefixLocalMembersWithThis -->
|
<Rule Id="SX1101" Action="Warning" /> <!-- DoNotPrefixLocalMembersWithThis -->
|
||||||
|
<Rule Id="SA1134" Action="None" /> <!-- AttributesMustNotShareLine -->
|
||||||
</Rules>
|
</Rules>
|
||||||
<Rules AnalyzerId="StyleCop.Analyzers" RuleNamespace="StyleCop.CSharp.SpacingRules">
|
<Rules AnalyzerId="StyleCop.Analyzers" RuleNamespace="StyleCop.CSharp.SpacingRules">
|
||||||
<Rule Id="SA1502" Action="None"/> <!-- DocumentationLinesMustBeginWithSingleSpace -->
|
<Rule Id="SA1502" Action="None"/> <!-- DocumentationLinesMustBeginWithSingleSpace -->
|
||||||
</Rules>
|
</Rules>
|
||||||
|
<Rules AnalyzerId="StyleCop.Analyzers" RuleNamespace="StyleCop.CSharp.LayoutRules">
|
||||||
|
<Rule Id="SA1503" Action="None"/> <!-- BracesMustNotBeOmitted -->
|
||||||
|
<Rule Id="SA1520" Action="None"/> <!-- UseBracesConsistently -->
|
||||||
|
</Rules>
|
||||||
<Rules AnalyzerId="StyleCop.Analyzers" RuleNamespace="StyleCop.CSharp.DocumentationRules">
|
<Rules AnalyzerId="StyleCop.Analyzers" RuleNamespace="StyleCop.CSharp.DocumentationRules">
|
||||||
<Rule Id="SA1642" Action="None" /> <!-- ConstructorSummaryDocumentationMustBeginWithStandardText -->
|
<Rule Id="SA1642" Action="None" /> <!-- ConstructorSummaryDocumentationMustBeginWithStandardText -->
|
||||||
<Rule Id="SA1643" Action="None" /> <!-- DestructorSummaryDocumentationMustBeginWithStandardText -->
|
<Rule Id="SA1643" Action="None" /> <!-- DestructorSummaryDocumentationMustBeginWithStandardText -->
|
||||||
|
@ -410,7 +410,8 @@ namespace Kyoo.Tests.Utility
|
|||||||
{
|
{
|
||||||
public Dictionary<int, int> Backing;
|
public Dictionary<int, int> Backing;
|
||||||
|
|
||||||
[UsedImplicitly] public Dictionary<int, int> Dictionary
|
[UsedImplicitly]
|
||||||
|
public Dictionary<int, int> Dictionary
|
||||||
{
|
{
|
||||||
get => Backing;
|
get => Backing;
|
||||||
set
|
set
|
||||||
|
Loading…
x
Reference in New Issue
Block a user