Close #3651
@ -44,6 +44,9 @@ csharp_style_var_for_built_in_types = true:suggestion
csharp_style_var_when_type_is_apparent = true:suggestion
csharp_style_var_elsewhere = true:suggestion
# Using directive is unnecessary.
dotnet_diagnostic.IDE0005.severity = error
# Stylecop Rules
dotnet_diagnostic.SA0001.severity = none
dotnet_diagnostic.SA1025.severity = none
@ -2,7 +2,6 @@ using System.Collections.Generic;
using System.Linq;
using Lidarr.Api.V1.Artist;
using Lidarr.Http.REST;
using NzbDrone.Common.Extensions;
using NzbDrone.Core.ArtistStats;
using NzbDrone.Core.DecisionEngine.Specifications;
using NzbDrone.Core.MediaCover;
@ -7,7 +7,6 @@ using Lidarr.Http.REST;
using Lidarr.Http.REST.Attributes;
using Lidarr.Http.Validation;
using Microsoft.AspNetCore.Mvc;
using NzbDrone.Common;
using NzbDrone.Common.Composition;
using NzbDrone.Common.Serializer;
using NzbDrone.Common.TPL;
@ -1,6 +1,5 @@
using System.Collections.Generic;
using System.Threading;
using FluentValidation;
using FluentValidation.Results;
using Lidarr.Http;
@ -1,9 +1,7 @@
using Lidarr.Api.V1.Albums;
using Lidarr.Api.V1.Tracks;
using NzbDrone.Core.DecisionEngine;
using NzbDrone.Core.Languages;
using NzbDrone.Core.Qualities;
namespace Lidarr.Api.V1.ManualImport
@ -1,5 +1,4 @@
@ -3,7 +3,6 @@ using System.Linq;
using NzbDrone.Common.EnvironmentInfo;
using NzbDrone.Core.Update;
using NzbDrone.Core.Update.History;
@ -1,8 +1,4 @@
using System;
using System.Text;
using System.Threading.Tasks;
namespace Lidarr.Http
{
using NzbDrone.Core.Annotations;
namespace Lidarr.Http.ClientSchema
@ -1,10 +1,8 @@
using System.Net;
using Microsoft.AspNetCore.Http;
using NzbDrone.Core.Datastore;
using NzbDrone.Core.Exceptions;
@ -6,8 +6,6 @@ using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Cors;
using NLog;
using NzbDrone.Core.Configuration;
namespace Lidarr.Http.Frontend
@ -1,4 +1,3 @@
using System.IO;
using System.IO.Abstractions;
using System.Globalization;
using FluentAssertions;
using NUnit.Framework;
@ -1,9 +1,8 @@
using System;
using System.Collections.Concurrent;
using NzbDrone.Common.EnsureThat;
namespace NzbDrone.Common.Cache
@ -5,8 +5,6 @@ using System.Linq;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Runtime.Loader;
namespace NzbDrone.Common.Composition
@ -2,8 +2,6 @@ using System;
using System.Security.AccessControl;
using System.Security.Principal;
namespace NzbDrone.Common.Disk
@ -1,7 +1,5 @@
using NzbDrone.Common.Disk;
using NzbDrone.Common.Exceptions;
@ -1,9 +1,3 @@
namespace NzbDrone.Common.Http
public static class UserAgentParser
using System.Text.RegularExpressions;
@ -1,7 +1,6 @@
namespace NzbDrone.Common.Instrumentation
using Sentry;
using Sentry.Protocol;
namespace NzbDrone.Common.Instrumentation.Sentry
@ -9,9 +9,7 @@ using NLog;
using NLog.Common;
using NLog.Targets;
using System.Diagnostics;
using System.ServiceProcess;
using System.Net.Sockets;
using Microsoft.AspNetCore.Connections;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Hosting;
using Dapper;
using FizzWare.NBuilder;
using System.Text.Json;
@ -5,7 +5,6 @@ using FluentAssertions;
using Moq;
using NzbDrone.Core.CustomFormats;
using NzbDrone.Core.MediaFiles;
using NzbDrone.Core.Music;
using DryIoc.ImTools;
@ -11,7 +11,6 @@ using NzbDrone.Core.Music;
using NzbDrone.Core.Organizer;
using NzbDrone.Core.Test.Framework;
using TagLib;
namespace NzbDrone.Core.Test.OrganizerTests.FileNameBuilderTests
@ -1,11 +1,7 @@
using System.Xml.Linq;
using NzbDrone.Core.Lifecycle;
using NzbDrone.Core.Messaging.Events;
namespace NzbDrone.Core.Authentication
@ -1,5 +1,3 @@
using NzbDrone.Core.Parser.Model;
@ -1,8 +1,7 @@
using System.Collections.Generic;
using NzbDrone.Common.Cache;
using NzbDrone.Core.CustomFormats.Events;
namespace NzbDrone.Core.CustomFormats
using NzbDrone.Core.Validation;
@ -1,6 +1,3 @@
using System.Data;
using FluentMigrator;
using NzbDrone.Core.Datastore.Migration.Framework;
using Dapper;
namespace NzbDrone.Core.Datastore
@ -8,7 +8,6 @@ using NzbDrone.Core.IndexerSearch.Definitions;
using NzbDrone.Core.Profiles.Releases;
namespace NzbDrone.Core.DecisionEngine.Specifications
@ -5,7 +5,6 @@ using NzbDrone.Core.CustomFormats;
using NzbDrone.Core.Download.TrackedDownloads;
using NzbDrone.Core.IndexerSearch.Definitions;
using NzbDrone.Core.Queue;
@ -7,7 +7,6 @@ using NzbDrone.Core.CustomFormats;
using NzbDrone.Core.History;
namespace NzbDrone.Core.DecisionEngine.Specifications.RssSync
@ -1,8 +1,3 @@
using Newtonsoft.Json;
namespace NzbDrone.Core.Download.Clients.Deluge
@ -1,7 +1,3 @@
namespace NzbDrone.Core.Download.Clients.DownloadStation
public class DownloadStation2Task
using NzbDrone.Common.Http;
namespace NzbDrone.Core.Download.Clients.DownloadStation.Proxies
@ -4,8 +4,6 @@ using System.Collections.Generic;
namespace NzbDrone.Core.Download.Clients.QBittorrent
public interface IQBittorrentProxy
using System.Xml.XPath;
using System.Xml;
@ -5,7 +5,6 @@ using System.Linq;
using NzbDrone.Core.Extras.Files;
@ -2,7 +2,6 @@ using System;
using NzbDrone.Core.ThingiProvider;
using NzbDrone.Common.Messaging;
namespace NzbDrone.Core.HealthCheck
@ -3,7 +3,6 @@ using System.Collections.Generic;
using NzbDrone.Core.Parser;
@ -8,7 +8,6 @@ using NzbDrone.Common.Http;
using NzbDrone.Core.Indexers.Newznab;
namespace NzbDrone.Core.Indexers.Torznab
@ -4,7 +4,6 @@ using System.IO.Abstractions;
using NzbDrone.Core.Datastore.Events;
using NzbDrone.Core.MediaFiles.Events;
@ -4,7 +4,6 @@ using System.IO;
using NzbDrone.Core.MediaFiles.TrackImport;
using TagLib.Riff;
namespace NzbDrone.Core.Music
using NzbDrone.Common.Instrumentation.Extensions;
namespace NzbDrone.Core.Notifications
@ -8,7 +8,6 @@ using MimeKit;
using NzbDrone.Common.Http.Dispatchers;
using NzbDrone.Core.Security;
namespace NzbDrone.Core.Notifications.Email
using System.Net.Http;
namespace NzbDrone.Core.Notifications.Webhook
public class WebhookDownloadFailurePayload : WebhookPayload
namespace NzbDrone.Core.Notifications.Xbmc.Model
public class KodiSource
@ -11,7 +11,6 @@ using NzbDrone.Common.Extensions;
namespace NzbDrone.Core.Organizer
using NzbDrone.Core.MediaFiles.TrackImport.Identification;
@ -1,8 +1,6 @@
using NzbDrone.Common.Instrumentation;
@ -4,7 +4,6 @@ using System.Linq;
using Microsoft.Extensions.DependencyInjection;
using NzbDrone.Core.ThingiProvider.Events;
namespace NzbDrone.Core.Update
using FluentValidation.Validators;
using NzbDrone.Common.Cloud;
using System.Data.SQLite;
@ -27,7 +27,6 @@ using NzbDrone.Core.Datastore;
using NzbDrone.Core.Instrumentation;
using NzbDrone.Host;
using NzbDrone.Host.AccessControl;
using NzbDrone.Http.Authentication;
using NzbDrone.SignalR;
@ -3,7 +3,6 @@ using FluentAssertions;
using Lidarr.Api.V1.RootFolders;
namespace NzbDrone.Integration.Test.ApiTests.WantedTests
@ -1,6 +1,4 @@
using System.Net.Http.Headers;
@ -1,9 +1,6 @@
using Lidarr.Http.ClientSchema;
using Microsoft.Extensions.Configuration;
using Npgsql;
namespace NzbDrone.Windows.Disk