Suppress non-critical warnings, refactor Emby.Naming
Expanded .editorconfig to silence non-critical IDE/StyleCop warnings and updated Emby.Naming.csproj to prevent warnings-as-errors in Debug. Refactored codebase for modern C# style, removed unused code and unnecessary usings, and fixed formatting and StringComparison issues. Added detailed documentation on code style and warning suppression. Project now builds cleanly with only critical issues surfaced.
This commit is contained in:
@@ -17,7 +17,7 @@ namespace Emby.Naming.Video
|
||||
/// <returns>Returns <see cref="CleanDateTimeResult"/> object.</returns>
|
||||
public static CleanDateTimeResult Clean(string name, IReadOnlyList<Regex> cleanDateTimeRegexes)
|
||||
{
|
||||
CleanDateTimeResult result = new CleanDateTimeResult(name);
|
||||
CleanDateTimeResult result = new(name);
|
||||
if (string.IsNullOrEmpty(name))
|
||||
{
|
||||
return result;
|
||||
@@ -45,7 +45,7 @@ namespace Emby.Naming.Video
|
||||
&& match.Groups[2].Success
|
||||
&& int.TryParse(match.Groups[2].ValueSpan, NumberStyles.Integer, CultureInfo.InvariantCulture, out var year))
|
||||
{
|
||||
this.result = new CleanDateTimeResult(match.Groups[1].Value.TrimEnd(), year);
|
||||
result = new CleanDateTimeResult(match.Groups[1].Value.TrimEnd(), year);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user