Enforce rule IDE0005 on build

(cherry picked from commit 6b1e4ef81938d264a2ddc8b626b0502f799aa640)

Closes #2555
pull/2572/head
Bogdan 1 year ago
parent 0a43481aed
commit c98f4512df

@ -30,6 +30,13 @@
<!-- A test project gets the test sdk packages automatically added --> <!-- A test project gets the test sdk packages automatically added -->
<TestProject>false</TestProject> <TestProject>false</TestProject>
<TestProject Condition="$(MSBuildProjectName.EndsWith('.Test'))">true</TestProject> <TestProject Condition="$(MSBuildProjectName.EndsWith('.Test'))">true</TestProject>
<!-- XML documentation comments are needed to enforce rule IDE0005 on build -->
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<!--
CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member'
-->
<NoWarn>$(NoWarn);CS1591</NoWarn>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>

@ -356,34 +356,34 @@ namespace NzbDrone.Common.Extensions
} }
/** /**
* Computes the highest row in which the distance {@code p} appears * Computes the highest row in which the distance {@code p} appears
* in diagonal {@code k} of the edit distance computation for * in diagonal {@code k} of the edit distance computation for
* strings {@code a} and {@code b}. The diagonal number is * strings {@code a} and {@code b}. The diagonal number is
* represented by the difference in the indices for the two strings; * represented by the difference in the indices for the two strings;
* it can range from {@code -b.length()} through {@code a.length()}. * it can range from {@code -b.length()} through {@code a.length()}.
* *
* More precisely, this computes the highest value x such that * More precisely, this computes the highest value x such that
* <pre> * <pre>
* p = edit-distance(a[0:(x+k)), b[0:x)). * p = edit-distance(a[0:(x+k)), b[0:x)).
* </pre> * </pre>
* *
* This is the "f" function described by Ukkonen. * This is the "f" function described by Ukkonen.
* *
* The caller must assure that abs(k) &le; p, the only values for * The caller must assure that abs(k) &#x2264; p, the only values for
* which this is well-defined. * which this is well-defined.
* *
* The implementation depends on the cached results of prior * The implementation depends on the cached results of prior
* computeRow calls for diagonals k-1, k, and k+1 for distance p-1. * computeRow calls for diagonals k-1, k, and k+1 for distance p-1.
* These must be supplied in {@code knownLeft}, {@code knownAbove}, * These must be supplied in {@code knownLeft}, {@code knownAbove},
* and {@code knownRight}, respectively. * and {@code knownRight}, respectively.
* @param k diagonal number * @param k diagonal number
* @param p edit distance * @param p edit distance
* @param a one string to be compared * @param a one string to be compared
* @param b other string to be compared * @param b other string to be compared
* @param knownLeft value of {@code computeRow(k-1, p-1, ...)} * @param knownLeft value of {@code computeRow(k-1, p-1, ...)}
* @param knownAbove value of {@code computeRow(k, p-1, ...)} * @param knownAbove value of {@code computeRow(k, p-1, ...)}
* @param knownRight value of {@code computeRow(k+1, p-1, ...)} * @param knownRight value of {@code computeRow(k+1, p-1, ...)}
*/ */
private static int ComputeRow(int k, private static int ComputeRow(int k,
int p, int p,
char[] a, char[] a,

@ -29,7 +29,7 @@ namespace NzbDrone.Common.OAuth
public virtual string Version { get; set; } public virtual string Version { get; set; }
public virtual string SessionHandle { get; set; } public virtual string SessionHandle { get; set; }
/// <seealso cref="http://oauth.net/core/1.0#request_urls"/> /// <seealso href="http://oauth.net/core/1.0#request_urls"/>
public virtual string RequestUrl { get; set; } public virtual string RequestUrl { get; set; }
public virtual Dictionary<string, string> Parameters { get; set; } public virtual Dictionary<string, string> Parameters { get; set; }

@ -35,13 +35,13 @@ namespace NzbDrone.Core.Indexers.TorrentRss
/// </summary> /// </summary>
/// <param name="settings">Indexer Settings to use for Parser</param> /// <param name="settings">Indexer Settings to use for Parser</param>
/// <returns>Parsed Settings or <c>null</c></returns> /// <returns>Parsed Settings or <c>null</c></returns>
public TorrentRssIndexerParserSettings Detect(TorrentRssIndexerSettings indexerSettings) public TorrentRssIndexerParserSettings Detect(TorrentRssIndexerSettings settings)
{ {
_logger.Debug("Evaluating TorrentRss feed '{0}'", indexerSettings.BaseUrl); _logger.Debug("Evaluating TorrentRss feed '{0}'", settings.BaseUrl);
try try
{ {
var requestGenerator = new TorrentRssIndexerRequestGenerator { Settings = indexerSettings }; var requestGenerator = new TorrentRssIndexerRequestGenerator { Settings = settings };
var request = requestGenerator.GetRecentRequests().GetAllTiers().First().First(); var request = requestGenerator.GetRecentRequests().GetAllTiers().First().First();
HttpResponse httpResponse = null; HttpResponse httpResponse = null;
@ -56,11 +56,11 @@ namespace NzbDrone.Core.Indexers.TorrentRss
} }
var indexerResponse = new IndexerResponse(request, httpResponse); var indexerResponse = new IndexerResponse(request, httpResponse);
return GetParserSettings(indexerResponse, indexerSettings); return GetParserSettings(indexerResponse, settings);
} }
catch (Exception ex) catch (Exception ex)
{ {
ex.WithData("FeedUrl", indexerSettings.BaseUrl); ex.WithData("FeedUrl", settings.BaseUrl);
throw; throw;
} }
} }

@ -40,9 +40,9 @@ namespace NzbDrone.Core.MetadataSource.Goodreads
/// </summary> /// </summary>
public string SpoilersState { get; protected set; } public string SpoilersState { get; protected set; }
/// <summary> // /// <summary>
/// The shelves the user has added this review to. // /// The shelves the user has added this review to.
/// </summary> // /// </summary>
// public IReadOnlyList<ReviewShelf> Shelves { get; protected set; } // public IReadOnlyList<ReviewShelf> Shelves { get; protected set; }
/// <summary> /// <summary>

@ -41,9 +41,9 @@ namespace NzbDrone.Core.MetadataSource.Goodreads
/// </summary> /// </summary>
public string Sort { get; private set; } public string Sort { get; private set; }
/// <summary> // /// <summary>
/// Determines the default sort order of this user shelf. // /// Determines the default sort order of this user shelf.
/// </summary> // /// </summary>
// public Order? Order { get; private set; } // public Order? Order { get; private set; }
/// <summary> /// <summary>

Loading…
Cancel
Save