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:
@@ -20,7 +20,7 @@ namespace Emby.Naming.Video
|
||||
{
|
||||
if (string.IsNullOrEmpty(name))
|
||||
{
|
||||
this.newName = string.Empty;
|
||||
newName = string.Empty;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -30,12 +30,12 @@ namespace Emby.Naming.Video
|
||||
{
|
||||
if (TryClean(name, expressions[i], out newName))
|
||||
{
|
||||
this.cleaned = true;
|
||||
this.name = newName;
|
||||
cleaned = true;
|
||||
name = newName;
|
||||
}
|
||||
}
|
||||
|
||||
this.newName = cleaned ? name : string.Empty;
|
||||
newName = cleaned ? name : string.Empty;
|
||||
return cleaned;
|
||||
}
|
||||
|
||||
@@ -44,11 +44,11 @@ namespace Emby.Naming.Video
|
||||
var match = expression.Match(name);
|
||||
if (match.Success && match.Groups.TryGetValue("cleaned", out var cleaned))
|
||||
{
|
||||
this.newName = cleaned.Value;
|
||||
newName = cleaned.Value;
|
||||
return true;
|
||||
}
|
||||
|
||||
this.newName = string.Empty;
|
||||
newName = string.Empty;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user