From c223f5ae9a48dc23f6cbfac0d881fe620319e212 Mon Sep 17 00:00:00 2001 From: Ryan Gribble Date: Wed, 7 Mar 2018 00:17:52 +1000 Subject: [PATCH] Tidy up compiler warnings (#1779) Fix XmlDoc parameter warnings (and tidy up other build output/warnings) --- .../Clients/IObservableProjectsClient.cs | 8 ++++---- .../Clients/IObservablePullRequestReviewsClient.cs | 2 ++ .../Clients/IObservableRepositoryBranchesClient.cs | 2 ++ Octokit.Reactive/Clients/IObservableTeamsClient.cs | 5 +++-- Octokit.Reactive/Clients/ObservableProjectsClient.cs | 12 ++++++------ .../Clients/ObservablePullRequestReviewsClient.cs | 2 ++ .../Clients/ObservableRepositoryBranchesClient.cs | 2 ++ Octokit.Reactive/Clients/ObservableTeamsClient.cs | 3 ++- Octokit.Reactive/Octokit.Reactive.csproj | 4 ++++ Octokit.Tests.Conventions/ModelTests.cs | 1 + .../Octokit.Tests.Conventions.csproj | 1 - .../Clients/AssigneesClientTests.cs | 1 - Octokit/Clients/IProjectsClient.cs | 8 ++++---- Octokit/Clients/IRepositoryBranchesClient.cs | 2 ++ Octokit/Clients/ITeamsClient.cs | 5 +++-- Octokit/Clients/ProjectsClient.cs | 8 ++++---- Octokit/Clients/RepositoryBranchesClient.cs | 2 ++ Octokit/Clients/TeamsClient.cs | 3 ++- Octokit/Octokit.csproj | 4 ++++ 19 files changed, 49 insertions(+), 26 deletions(-) diff --git a/Octokit.Reactive/Clients/IObservableProjectsClient.cs b/Octokit.Reactive/Clients/IObservableProjectsClient.cs index dea4dca8..2172e086 100644 --- a/Octokit.Reactive/Clients/IObservableProjectsClient.cs +++ b/Octokit.Reactive/Clients/IObservableProjectsClient.cs @@ -18,7 +18,7 @@ namespace Octokit.Reactive /// See the API documentation for more information. /// /// The owner of the repository - /// The name of the repository + /// The name of the repository IObservable GetAllForRepository(string owner, string name); /// @@ -28,7 +28,7 @@ namespace Octokit.Reactive /// See the API documentation for more information. /// /// The owner of the repository - /// The name of the repository + /// The name of the repository /// Used to filter the list of projects returned IObservable GetAllForRepository(string owner, string name, ProjectRequest request); @@ -58,7 +58,7 @@ namespace Octokit.Reactive /// See the API documentation for more information. /// /// The owner of the repository - /// The name of the repository + /// The name of the repository /// Options for changing the API response IObservable GetAllForRepository(string owner, string name, ApiOptions options); @@ -69,7 +69,7 @@ namespace Octokit.Reactive /// See the API documentation for more information. /// /// The owner of the repository - /// The name of the repository + /// The name of the repository /// Used to filter the list of projects returned /// Options for changing the API response IObservable GetAllForRepository(string owner, string name, ProjectRequest request, ApiOptions options); diff --git a/Octokit.Reactive/Clients/IObservablePullRequestReviewsClient.cs b/Octokit.Reactive/Clients/IObservablePullRequestReviewsClient.cs index 92a2b17a..607d224f 100644 --- a/Octokit.Reactive/Clients/IObservablePullRequestReviewsClient.cs +++ b/Octokit.Reactive/Clients/IObservablePullRequestReviewsClient.cs @@ -173,6 +173,7 @@ namespace Octokit.Reactive /// The name of the repository /// The pull request number /// The pull request review number + /// Options for changing the API response IObservable GetAllComments(string owner, string name, int number, long reviewId, ApiOptions options); /// @@ -182,6 +183,7 @@ namespace Octokit.Reactive /// The Id of the repository /// The pull request number /// The pull request review number + /// Options for changing the API response IObservable GetAllComments(long repositoryId, int number, long reviewId, ApiOptions options); } } diff --git a/Octokit.Reactive/Clients/IObservableRepositoryBranchesClient.cs b/Octokit.Reactive/Clients/IObservableRepositoryBranchesClient.cs index 01e953f5..baa74d9c 100644 --- a/Octokit.Reactive/Clients/IObservableRepositoryBranchesClient.cs +++ b/Octokit.Reactive/Clients/IObservableRepositoryBranchesClient.cs @@ -348,6 +348,7 @@ namespace Octokit.Reactive /// The owner of the repository /// The name of the repository /// The name of the branch + /// The required pull request review settings IObservable UpdateReviewEnforcement(string owner, string name, string branch, BranchProtectionRequiredReviewsUpdate update); /// @@ -358,6 +359,7 @@ namespace Octokit.Reactive /// /// The Id of the repository /// The name of the branch + /// The required pull request review settings IObservable UpdateReviewEnforcement(long repositoryId, string branch, BranchProtectionRequiredReviewsUpdate update); /// diff --git a/Octokit.Reactive/Clients/IObservableTeamsClient.cs b/Octokit.Reactive/Clients/IObservableTeamsClient.cs index 11aba6f4..0e992e69 100644 --- a/Octokit.Reactive/Clients/IObservableTeamsClient.cs +++ b/Octokit.Reactive/Clients/IObservableTeamsClient.cs @@ -61,19 +61,20 @@ namespace Octokit.Reactive /// /// Returns all child teams of the given team. /// - /// The team identifier /// /// https://developer.github.com/v3/orgs/teams/#list-child-teams /// + /// The team identifier IObservable GetAllChildTeams(int id); /// /// Returns all child teams of the given team. /// - /// The team identifier /// /// https://developer.github.com/v3/orgs/teams/#list-child-teams /// + /// The team identifier + /// Options for changing the API response IObservable GetAllChildTeams(int id, ApiOptions options); /// diff --git a/Octokit.Reactive/Clients/ObservableProjectsClient.cs b/Octokit.Reactive/Clients/ObservableProjectsClient.cs index 608c7f70..c2b55f01 100644 --- a/Octokit.Reactive/Clients/ObservableProjectsClient.cs +++ b/Octokit.Reactive/Clients/ObservableProjectsClient.cs @@ -34,7 +34,7 @@ namespace Octokit.Reactive /// See the API documentation for more information. /// /// The owner of the repository - /// The name of the repository + /// The name of the repository public IObservable GetAllForRepository(string owner, string name) { return GetAllForRepository(owner, name, ApiOptions.None); @@ -47,7 +47,8 @@ namespace Octokit.Reactive /// See the API documentation for more information. /// /// The owner of the repository - /// The name of the repository + /// The name of the repository + /// Options for changing the API response public IObservable GetAllForRepository(string owner, string name, ApiOptions options) { Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); @@ -66,7 +67,7 @@ namespace Octokit.Reactive /// See the API documentation for more information. /// /// The owner of the repository - /// The name of the repository + /// The name of the repository /// Used to filter the list of projects returned public IObservable GetAllForRepository(string owner, string name, ProjectRequest request) { @@ -80,7 +81,7 @@ namespace Octokit.Reactive /// See the API documentation for more information. /// /// The owner of the repository - /// The name of the repository + /// The name of the repository /// Used to filter the list of projects returned /// Options for changing the API response public IObservable GetAllForRepository(string owner, string name, ProjectRequest request, ApiOptions options) @@ -113,8 +114,7 @@ namespace Octokit.Reactive /// /// See the API documentation for more information. /// - /// The owner of the repository - /// The name of the repository + /// The Id of the repository /// Options for changing the API response public IObservable GetAllForRepository(long repositoryId, ApiOptions options) { diff --git a/Octokit.Reactive/Clients/ObservablePullRequestReviewsClient.cs b/Octokit.Reactive/Clients/ObservablePullRequestReviewsClient.cs index e13fcdde..955e5939 100644 --- a/Octokit.Reactive/Clients/ObservablePullRequestReviewsClient.cs +++ b/Octokit.Reactive/Clients/ObservablePullRequestReviewsClient.cs @@ -266,6 +266,7 @@ namespace Octokit.Reactive /// The name of the repository /// The pull request number /// The pull request review number + /// Options for changing the API response public IObservable GetAllComments(string owner, string name, int number, long reviewId, ApiOptions options) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); @@ -282,6 +283,7 @@ namespace Octokit.Reactive /// The Id of the repository /// The pull request number /// The pull request review number + /// Options for changing the API response public IObservable GetAllComments(long repositoryId, int number, long reviewId, ApiOptions options) { Ensure.ArgumentNotNull(options, nameof(options)); diff --git a/Octokit.Reactive/Clients/ObservableRepositoryBranchesClient.cs b/Octokit.Reactive/Clients/ObservableRepositoryBranchesClient.cs index cda1284d..e289f560 100644 --- a/Octokit.Reactive/Clients/ObservableRepositoryBranchesClient.cs +++ b/Octokit.Reactive/Clients/ObservableRepositoryBranchesClient.cs @@ -537,6 +537,7 @@ namespace Octokit.Reactive /// The owner of the repository /// The name of the repository /// The name of the branch + /// The required pull request review settings public IObservable UpdateReviewEnforcement(string owner, string name, string branch, BranchProtectionRequiredReviewsUpdate update) { Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); @@ -555,6 +556,7 @@ namespace Octokit.Reactive /// /// The Id of the repository /// The name of the branch + /// The required pull request review settings public IObservable UpdateReviewEnforcement(long repositoryId, string branch, BranchProtectionRequiredReviewsUpdate update) { Ensure.ArgumentNotNullOrEmptyString(branch, "branch"); diff --git a/Octokit.Reactive/Clients/ObservableTeamsClient.cs b/Octokit.Reactive/Clients/ObservableTeamsClient.cs index 39c75467..4739ce0c 100644 --- a/Octokit.Reactive/Clients/ObservableTeamsClient.cs +++ b/Octokit.Reactive/Clients/ObservableTeamsClient.cs @@ -105,10 +105,11 @@ namespace Octokit.Reactive /// /// Returns all child teams of the given team. /// - /// The team identifier /// /// https://developer.github.com/v3/orgs/teams/#list-child-teams /// + /// The team identifier + /// Options to change API behaviour. public IObservable GetAllChildTeams(int id, ApiOptions options) { Ensure.ArgumentNotNull(options, "options"); diff --git a/Octokit.Reactive/Octokit.Reactive.csproj b/Octokit.Reactive/Octokit.Reactive.csproj index 3e0f04d9..baad918d 100644 --- a/Octokit.Reactive/Octokit.Reactive.csproj +++ b/Octokit.Reactive/Octokit.Reactive.csproj @@ -18,6 +18,10 @@ Copyright GitHub 2017 + + 1591;1701;1702;1705 + + diff --git a/Octokit.Tests.Conventions/ModelTests.cs b/Octokit.Tests.Conventions/ModelTests.cs index fbfe1a73..d89234f6 100644 --- a/Octokit.Tests.Conventions/ModelTests.cs +++ b/Octokit.Tests.Conventions/ModelTests.cs @@ -186,6 +186,7 @@ namespace Octokit.Tests.Conventions .SelectMany(type => type.GetProperties()) .SelectMany(property => UnwrapGenericArguments(property.PropertyType)) .Where(type => type.GetTypeInfo().Assembly.Equals(Octokit) && type.GetTypeInfo().IsEnum) + .Distinct() .Select(type => new[] { type }); } } diff --git a/Octokit.Tests.Conventions/Octokit.Tests.Conventions.csproj b/Octokit.Tests.Conventions/Octokit.Tests.Conventions.csproj index 98fc8a72..6c7a859b 100644 --- a/Octokit.Tests.Conventions/Octokit.Tests.Conventions.csproj +++ b/Octokit.Tests.Conventions/Octokit.Tests.Conventions.csproj @@ -22,7 +22,6 @@ - PreserveNewest diff --git a/Octokit.Tests.Integration/Clients/AssigneesClientTests.cs b/Octokit.Tests.Integration/Clients/AssigneesClientTests.cs index 2ebc10d0..cc0c2f3e 100644 --- a/Octokit.Tests.Integration/Clients/AssigneesClientTests.cs +++ b/Octokit.Tests.Integration/Clients/AssigneesClientTests.cs @@ -10,7 +10,6 @@ public class AssigneesClientTests { readonly IGitHubClient _github; readonly RepositoryContext _context; - readonly IIssuesClient _issuesClient; public AssigneesClientTests() { diff --git a/Octokit/Clients/IProjectsClient.cs b/Octokit/Clients/IProjectsClient.cs index c3edd5ae..3e75e2f3 100644 --- a/Octokit/Clients/IProjectsClient.cs +++ b/Octokit/Clients/IProjectsClient.cs @@ -19,7 +19,7 @@ namespace Octokit /// See the API documentation for more information. /// /// The owner of the repository - /// The name of the repository + /// The name of the repository Task> GetAllForRepository(string owner, string name); /// @@ -29,7 +29,7 @@ namespace Octokit /// See the API documentation for more information. /// /// The owner of the repository - /// The name of the repository + /// The name of the repository /// Used to filter the list of projects returned Task> GetAllForRepository(string owner, string name, ProjectRequest request); @@ -59,7 +59,7 @@ namespace Octokit /// See the API documentation for more information. /// /// The owner of the repository - /// The name of the repository + /// The name of the repository /// Options for changing the API response Task> GetAllForRepository(string owner, string name, ApiOptions options); @@ -70,7 +70,7 @@ namespace Octokit /// See the API documentation for more information. /// /// The owner of the repository - /// The name of the repository + /// The name of the repository /// Used to filter the list of projects returned /// Options for changing the API response Task> GetAllForRepository(string owner, string name, ProjectRequest request, ApiOptions options); diff --git a/Octokit/Clients/IRepositoryBranchesClient.cs b/Octokit/Clients/IRepositoryBranchesClient.cs index fc2655ee..6422199c 100644 --- a/Octokit/Clients/IRepositoryBranchesClient.cs +++ b/Octokit/Clients/IRepositoryBranchesClient.cs @@ -352,6 +352,7 @@ namespace Octokit /// The owner of the repository /// The name of the repository /// The name of the branch + /// The required pull request review settings Task UpdateReviewEnforcement(string owner, string name, string branch, BranchProtectionRequiredReviewsUpdate update); /// @@ -362,6 +363,7 @@ namespace Octokit /// /// The Id of the repository /// The name of the branch + /// The required pull request review settings Task UpdateReviewEnforcement(long repositoryId, string branch, BranchProtectionRequiredReviewsUpdate update); /// diff --git a/Octokit/Clients/ITeamsClient.cs b/Octokit/Clients/ITeamsClient.cs index ebe939db..c8931391 100644 --- a/Octokit/Clients/ITeamsClient.cs +++ b/Octokit/Clients/ITeamsClient.cs @@ -62,19 +62,20 @@ namespace Octokit /// /// Returns all child teams of the given team. /// - /// The team identifier /// /// https://developer.github.com/v3/orgs/teams/#list-child-teams /// + /// The team identifier Task> GetAllChildTeams(int id); /// /// Returns all child teams of the given team. /// - /// The team identifier /// /// https://developer.github.com/v3/orgs/teams/#list-child-teams /// + /// The team identifier + /// Options to change API behaviour. Task> GetAllChildTeams(int id, ApiOptions options); /// diff --git a/Octokit/Clients/ProjectsClient.cs b/Octokit/Clients/ProjectsClient.cs index 630f987f..862ac82c 100644 --- a/Octokit/Clients/ProjectsClient.cs +++ b/Octokit/Clients/ProjectsClient.cs @@ -27,7 +27,7 @@ namespace Octokit /// See the API documentation for more information. /// /// The owner of the repository - /// The name of the repository + /// The name of the repository public Task> GetAllForRepository(string owner, string name) { return GetAllForRepository(owner, name, ApiOptions.None); @@ -40,7 +40,7 @@ namespace Octokit /// See the API documentation for more information. /// /// The owner of the repository - /// The name of the repository + /// The name of the repository /// Options for changing the API response public Task> GetAllForRepository(string owner, string name, ApiOptions options) { @@ -58,7 +58,7 @@ namespace Octokit /// See the API documentation for more information. /// /// The owner of the repository - /// The name of the repository + /// The name of the repository /// Used to filter the list of projects returned public Task> GetAllForRepository(string owner, string name, ProjectRequest request) { @@ -72,7 +72,7 @@ namespace Octokit /// See the API documentation for more information. /// /// The owner of the repository - /// The name of the repository + /// The name of the repository /// Used to filter the list of projects returned /// Options for changing the API response public Task> GetAllForRepository(string owner, string name, ProjectRequest request, ApiOptions options) diff --git a/Octokit/Clients/RepositoryBranchesClient.cs b/Octokit/Clients/RepositoryBranchesClient.cs index baee963d..8ad2d0fd 100644 --- a/Octokit/Clients/RepositoryBranchesClient.cs +++ b/Octokit/Clients/RepositoryBranchesClient.cs @@ -576,6 +576,7 @@ namespace Octokit /// The owner of the repository /// The name of the repository /// The name of the branch + /// The required pull request review settings public Task UpdateReviewEnforcement(string owner, string name, string branch, BranchProtectionRequiredReviewsUpdate update) { Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); @@ -594,6 +595,7 @@ namespace Octokit /// /// The Id of the repository /// The name of the branch + /// The required pull request review settings public Task UpdateReviewEnforcement(long repositoryId, string branch, BranchProtectionRequiredReviewsUpdate update) { Ensure.ArgumentNotNullOrEmptyString(branch, "branch"); diff --git a/Octokit/Clients/TeamsClient.cs b/Octokit/Clients/TeamsClient.cs index db3fe9f4..894cf046 100644 --- a/Octokit/Clients/TeamsClient.cs +++ b/Octokit/Clients/TeamsClient.cs @@ -104,10 +104,11 @@ namespace Octokit /// /// Returns all child teams of the given team. /// - /// The team identifier /// /// https://developer.github.com/v3/orgs/teams/#list-child-teams /// + /// The team identifier + /// Options to change API behaviour. public Task> GetAllChildTeams(int id, ApiOptions options) { Ensure.ArgumentNotNull(options, nameof(options)); diff --git a/Octokit/Octokit.csproj b/Octokit/Octokit.csproj index 1a561c05..d46a3500 100644 --- a/Octokit/Octokit.csproj +++ b/Octokit/Octokit.csproj @@ -26,6 +26,10 @@ $(DefineConstants);HAS_ENVIRONMENT;HAS_REGEX_COMPILED_OPTIONS;SIMPLE_JSON_INTERNAL;SIMPLE_JSON_OBJARRAYINTERNAL;SIMPLE_JSON_READONLY_COLLECTIONS;HAS_SERVICEPOINTMANAGER + + 1591;1701;1702;1705 + +