From bc85ef68104d1725bacef2bc7ad8ffb52bf7f8b0 Mon Sep 17 00:00:00 2001 From: js6pak Date: Wed, 24 Mar 2021 17:55:15 +0100 Subject: [PATCH] Fix xmldoc warnings --- src/Directory.Build.props | 4 ++++ .../Events/Attributes/EventListenerAttribute.cs | 6 +++--- .../Events/Game/Player/IPlayerStartMeetingEvent.cs | 2 +- src/Impostor.Api/Events/IEventCancelable.cs | 2 +- src/Impostor.Api/Events/Managers/IEventManager.cs | 6 +++--- src/Impostor.Api/Extensions/SpanReaderExtensions.cs | 6 +++--- src/Impostor.Api/Impostor.Api.csproj | 1 + src/Impostor.Api/Net/IClient.cs | 4 ++-- src/Impostor.Api/Net/IHazelConnection.cs | 6 +++--- .../Net/Messages/IMessageWriterProvider.cs | 2 +- src/Impostor.Api/Reactor/PluginSide.cs | 2 +- src/Impostor.Server/Extensions/TypeExtensions.cs | 2 +- src/Impostor.Server/Impostor.Server.csproj | 1 + src/Impostor.Server/Recorder/ServerReplayVersion.cs | 4 ++-- src/ProjectRules.ruleset | 5 ++--- src/stylecop.json | 11 +++++++++++ 16 files changed, 40 insertions(+), 24 deletions(-) create mode 100644 src/stylecop.json diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 81faf42..1bcb40a 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -3,5 +3,9 @@ 1.3.0 dev + + + + diff --git a/src/Impostor.Api/Events/Attributes/EventListenerAttribute.cs b/src/Impostor.Api/Events/Attributes/EventListenerAttribute.cs index 9289fa5..da1e489 100644 --- a/src/Impostor.Api/Events/Attributes/EventListenerAttribute.cs +++ b/src/Impostor.Api/Events/Attributes/EventListenerAttribute.cs @@ -17,17 +17,17 @@ namespace Impostor.Api.Events } /// - /// The priority of the event listener. + /// Gets or sets the priority of the event listener. /// public EventPriority Priority { get; set; } /// - /// The events that the listener is listening to. + /// Gets or sets the event that the listener is listening to. /// public Type? Event { get; set; } /// - /// If set to true, the listener will be called regardless of the . + /// Gets or sets a value indicating whether the listener will be called regardless of the . /// public bool IgnoreCancelled { get; set; } } diff --git a/src/Impostor.Api/Events/Game/Player/IPlayerStartMeetingEvent.cs b/src/Impostor.Api/Events/Game/Player/IPlayerStartMeetingEvent.cs index 1a28115..016d131 100644 --- a/src/Impostor.Api/Events/Game/Player/IPlayerStartMeetingEvent.cs +++ b/src/Impostor.Api/Events/Game/Player/IPlayerStartMeetingEvent.cs @@ -5,7 +5,7 @@ namespace Impostor.Api.Events.Player public interface IPlayerStartMeetingEvent : IPlayerEvent { /// - /// Gets the player who's body got reported. Is null when the meeting started by Emergency call button + /// Gets the player who's body got reported. Is null when the meeting started by Emergency call button. /// IInnerPlayerControl? Body { get; } } diff --git a/src/Impostor.Api/Events/IEventCancelable.cs b/src/Impostor.Api/Events/IEventCancelable.cs index d6d1ca6..1902284 100644 --- a/src/Impostor.Api/Events/IEventCancelable.cs +++ b/src/Impostor.Api/Events/IEventCancelable.cs @@ -3,7 +3,7 @@ public interface IEventCancelable : IEvent { /// - /// True if the event was cancelled. + /// Gets or sets a value indicating whether the event was cancelled. /// bool IsCancelled { get; set; } } diff --git a/src/Impostor.Api/Events/Managers/IEventManager.cs b/src/Impostor.Api/Events/Managers/IEventManager.cs index 35fb9bb..3d73768 100644 --- a/src/Impostor.Api/Events/Managers/IEventManager.cs +++ b/src/Impostor.Api/Events/Managers/IEventManager.cs @@ -16,15 +16,15 @@ namespace Impostor.Api.Events.Managers where TListener : IEventListener; /// - /// Returns true if an event with the type is registered. + /// Returns true if an event with the type is registered. /// - /// True if the is registered. + /// True if the is registered. /// Type of the event. bool IsRegistered() where TEvent : IEvent; /// - /// Call all the event listeners for the type . + /// Call all the event listeners for the type . /// /// The event argument. /// Type of the event. diff --git a/src/Impostor.Api/Extensions/SpanReaderExtensions.cs b/src/Impostor.Api/Extensions/SpanReaderExtensions.cs index 242f054..78e5a45 100644 --- a/src/Impostor.Api/Extensions/SpanReaderExtensions.cs +++ b/src/Impostor.Api/Extensions/SpanReaderExtensions.cs @@ -5,7 +5,7 @@ using System.Runtime.CompilerServices; namespace Impostor.Api { /// - /// Priovides a StreamReader-like api throught extensions + /// Priovides a StreamReader-like api throught extensions. /// public static class SpanReaderExtensions { @@ -53,11 +53,11 @@ namespace Impostor.Api } /// - /// Advances the position of by the size of . + /// Advances the position of by the size of . /// /// Type that will be read. /// input "stream"/span. - /// The original input + /// The original input. [MethodImpl(MethodImplOptions.AggressiveInlining)] private static unsafe ReadOnlySpan Advance(ref ReadOnlySpan input) where T : unmanaged diff --git a/src/Impostor.Api/Impostor.Api.csproj b/src/Impostor.Api/Impostor.Api.csproj index 33c2ea0..86b4f09 100644 --- a/src/Impostor.Api/Impostor.Api.csproj +++ b/src/Impostor.Api/Impostor.Api.csproj @@ -18,6 +18,7 @@ https://github.com/Impostor/Impostor git https://github.com/Impostor/Impostor + true diff --git a/src/Impostor.Api/Net/IClient.cs b/src/Impostor.Api/Net/IClient.cs index 790b1c0..d9631d7 100644 --- a/src/Impostor.Api/Net/IClient.cs +++ b/src/Impostor.Api/Net/IClient.cs @@ -57,7 +57,7 @@ namespace Impostor.Api.Net IDictionary Items { get; } /// - /// Gets or sets the current game data of the . + /// Gets the current game data of the . /// IClientPlayer? Player { get; } @@ -74,7 +74,7 @@ namespace Impostor.Api.Net /// The message to show to the player. /// /// - /// Only used when is set to . + /// Only used when is set to . /// /// /// A representing the asynchronous operation. diff --git a/src/Impostor.Api/Net/IHazelConnection.cs b/src/Impostor.Api/Net/IHazelConnection.cs index c012bd1..e2a9cfb 100644 --- a/src/Impostor.Api/Net/IHazelConnection.cs +++ b/src/Impostor.Api/Net/IHazelConnection.cs @@ -20,7 +20,7 @@ namespace Impostor.Api.Net bool IsConnected { get; } /// - /// Gets the client of the connection. + /// Gets or sets the client of the connection. /// IClient? Client { get; set; } @@ -28,14 +28,14 @@ namespace Impostor.Api.Net /// Sends a message writer to the connection. /// /// The message. - /// + /// Task that must be awaited. ValueTask SendAsync(IMessageWriter writer); /// /// Disconnects the client and invokes the disconnect handler. /// /// A reason. - /// + /// Task that must be awaited. ValueTask DisconnectAsync(string? reason); } } diff --git a/src/Impostor.Api/Net/Messages/IMessageWriterProvider.cs b/src/Impostor.Api/Net/Messages/IMessageWriterProvider.cs index cf92004..16a48ec 100644 --- a/src/Impostor.Api/Net/Messages/IMessageWriterProvider.cs +++ b/src/Impostor.Api/Net/Messages/IMessageWriterProvider.cs @@ -4,7 +4,7 @@ { /// /// Retrieves a from the internal pool. - /// Make sure to call when you are done! + /// Make sure to call when you are done!. /// /// /// Whether to send the message as or . diff --git a/src/Impostor.Api/Reactor/PluginSide.cs b/src/Impostor.Api/Reactor/PluginSide.cs index 2118299..4523dfc 100644 --- a/src/Impostor.Api/Reactor/PluginSide.cs +++ b/src/Impostor.Api/Reactor/PluginSide.cs @@ -1,7 +1,7 @@ namespace Impostor.Api.Reactor { /// - /// Plugin side used in modded handshake + /// Plugin side used in modded handshake. /// public enum PluginSide : byte { diff --git a/src/Impostor.Server/Extensions/TypeExtensions.cs b/src/Impostor.Server/Extensions/TypeExtensions.cs index 396d987..a49cb5e 100644 --- a/src/Impostor.Server/Extensions/TypeExtensions.cs +++ b/src/Impostor.Server/Extensions/TypeExtensions.cs @@ -45,7 +45,7 @@ namespace Impostor.Server /// /// The method. /// True if the parameters should be included in the name. - /// Friendly name of the method + /// Friendly name of the method. public static string GetFriendlyName(this MethodBase method, bool showParameters = true) { var str = method.Name; diff --git a/src/Impostor.Server/Impostor.Server.csproj b/src/Impostor.Server/Impostor.Server.csproj index 5cad72d..ba444fc 100644 --- a/src/Impostor.Server/Impostor.Server.csproj +++ b/src/Impostor.Server/Impostor.Server.csproj @@ -9,6 +9,7 @@ ../ProjectRules.ruleset enable false + true diff --git a/src/Impostor.Server/Recorder/ServerReplayVersion.cs b/src/Impostor.Server/Recorder/ServerReplayVersion.cs index 2eb3b49..ce77e3c 100644 --- a/src/Impostor.Server/Recorder/ServerReplayVersion.cs +++ b/src/Impostor.Server/Recorder/ServerReplayVersion.cs @@ -6,12 +6,12 @@ namespace Impostor.Server.Recorder public enum ServerReplayVersion { /// - /// Initial version + /// Initial version. /// Initial = 1, /// - /// Latest version + /// Latest version. /// Latest = Initial, } diff --git a/src/ProjectRules.ruleset b/src/ProjectRules.ruleset index 5102b80..5484352 100644 --- a/src/ProjectRules.ruleset +++ b/src/ProjectRules.ruleset @@ -1,6 +1,6 @@  - - + + @@ -17,7 +17,6 @@ - diff --git a/src/stylecop.json b/src/stylecop.json new file mode 100644 index 0000000..216b35a --- /dev/null +++ b/src/stylecop.json @@ -0,0 +1,11 @@ +{ + "$schema": "https://raw.githubusercontent.com/DotNetAnalyzers/StyleCopAnalyzers/master/StyleCop.Analyzers/StyleCop.Analyzers/Settings/stylecop.schema.json", + "settings": { + "orderingRules": { + "usingDirectivesPlacement": "preserve" + }, + "layoutRules": { + "newlineAtEndOfFile": "require" + } + } +} -- 2.39.5