From de61dda7d78cebfd772bcc2c799f42f105ee4c25 Mon Sep 17 00:00:00 2001 From: Jacob Slusser Date: Thu, 10 Jul 2025 13:09:55 -0700 Subject: [PATCH 1/3] Fixes spelling errors in comments, private members, and public members in test projects --- .editorconfig | 34 ++++++------ CONTRIBUTING.md | 2 +- Renci.SshNet.sln | 1 + exclusion.dic | 53 +++++++++++++++++++ src/Renci.SshNet/.editorconfig | 2 + .../Abstractions/SocketAbstraction.cs | 2 +- src/Renci.SshNet/BaseClient.cs | 8 +-- src/Renci.SshNet/Channels/Channel.cs | 18 +++---- .../Channels/ChannelDirectTcpip.cs | 6 +-- .../Channels/ChannelForwardedTcpip.cs | 4 +- src/Renci.SshNet/Channels/ChannelSession.cs | 24 ++++----- src/Renci.SshNet/Channels/IChannel.cs | 2 +- src/Renci.SshNet/ClientAuthentication.cs | 2 +- src/Renci.SshNet/Common/ExceptionEventArgs.cs | 2 +- src/Renci.SshNet/Common/SshDataStream.cs | 2 +- .../Connection/Socks5Connector.cs | 2 +- src/Renci.SshNet/ForwardedPort.cs | 8 +-- src/Renci.SshNet/ForwardedPortDynamic.cs | 6 +-- src/Renci.SshNet/ForwardedPortLocal.cs | 6 +-- src/Renci.SshNet/IServiceFactory.cs | 2 +- src/Renci.SshNet/ISubsystemSession.cs | 4 +- .../ChannelOpen/ChannelOpenMessage.cs | 2 +- .../PseudoTerminalRequestInfo.cs | 2 +- .../Messages/Transport/IgnoreMessage.cs | 2 +- src/Renci.SshNet/PrivateKeyFile.OpenSSH.cs | 2 +- src/Renci.SshNet/PrivateKeyFile.cs | 2 +- .../RemotePathShellQuoteTransformation.cs | 2 +- src/Renci.SshNet/Security/Certificate.cs | 4 +- .../Cryptography/Ciphers/AesGcmCipher.cs | 4 +- .../Ciphers/ChaCha20Poly1305Cipher.cs | 2 +- src/Renci.SshNet/Security/SshKeyData.cs | 2 +- src/Renci.SshNet/Session.cs | 1 + src/Renci.SshNet/SftpClient.cs | 10 ++-- src/Renci.SshNet/Shell.cs | 6 +-- src/Renci.SshNet/ShellStream.cs | 6 +-- src/Renci.SshNet/SshCommand.cs | 10 ++-- src/Renci.SshNet/SubsystemSession.cs | 38 ++++++------- test/.editorconfig | 2 + test/Renci.SshNet.Benchmarks/.editorconfig | 2 + .../.editorconfig | 2 + .../.editorconfig | 2 + .../Renci.SshNet.IntegrationTests/ScpTests.cs | 8 +-- .../SftpTests.cs | 24 ++++----- .../Renci.SshNet.IntegrationTests/SshTests.cs | 2 +- .../.editorconfig | 2 + test/Renci.SshNet.Tests/.editorconfig | 2 + ...Test_Connect_OnConnectedThrowsException.cs | 2 +- .../BaseClientTest_Disconnected_Connect.cs | 2 +- .../Channels/ChannelDirectTcpipTest.cs | 2 +- ...OnOpenFailureReceived_RetriesAvailable.cs} | 2 +- .../Classes/Channels/ChannelStub.cs | 2 +- ...nChannelCloseReceived_OnClose_Exception.cs | 2 +- ...ionChannelDataReceived_OnData_Exception.cs | 2 +- ...ssionChannelEofReceived_OnEof_Exception.cs | 2 +- ...edDataReceived_OnExtendedData_Exception.cs | 2 +- ...nnelFailureReceived_OnFailure_Exception.cs | 2 +- ...nnelRequestReceived_OnRequest_Exception.cs | 2 +- ...nnelSuccessReceived_OnSuccess_Exception.cs | 2 +- ...AdjustReceived_OnWindowAdjust_Exception.cs | 2 +- ...onDisconnected_OnDisconnected_Exception.cs | 2 +- ...ErrorOccurred_OnErrorOccurred_Exception.cs | 2 +- .../Classes/Channels/ClientChannelStub.cs | 2 +- ...onReceived_OnOpenConfirmation_Exception.cs | 2 +- ...FailureReceived_OnOpenFailure_Exception.cs | 2 +- .../Classes/ConnectionInfoTest.cs | 12 ++--- ...wardedPortDynamicTest_Start_PortStarted.cs | 2 +- ...orwardedPortLocalTest_Start_PortStarted.cs | 2 +- ...rwardedPortRemoteTest_Start_PortStarted.cs | 2 +- .../ForwardedPortStatusTest_Stopped.cs | 2 +- ...st_Connect_NetConfSessionConnectFailure.cs | 2 +- .../Classes/OrderedDictionaryTest.cs | 2 +- .../Classes/SftpClientTest.UploadFile.cs | 2 +- ...tTest_Connect_SftpSessionConnectFailure.cs | 2 +- ...ferEmptyAndWriteMoreBytesThanBufferSize.cs | 2 +- .../Classes/SshCommandTest_Dispose.cs | 2 +- ...ssion_Connect_SendSubsystemRequestFails.cs | 2 +- 76 files changed, 236 insertions(+), 165 deletions(-) create mode 100644 exclusion.dic rename test/Renci.SshNet.Tests/Classes/Channels/{ChannelSessionTest_Open_OnOpenFailureReceived_RetriesAvalable.cs => ChannelSessionTest_Open_OnOpenFailureReceived_RetriesAvailable.cs} (99%) diff --git a/.editorconfig b/.editorconfig index ec2a16387..ef949a28b 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,4 +1,4 @@ -// Avoid looking for .editorconfig files in parent directories +# Avoid looking for .editorconfig files in parent directories root=true [*] @@ -7,6 +7,8 @@ insert_final_newline = true indent_style = space indent_size = 4 tab_width = 4 +spelling_exclusion_path = exclusion.dic +spelling_checkable_types = all [*.{xml,csproj,props}] @@ -776,14 +778,14 @@ dotnet_diagnostic.IDE0032.severity = suggestion dotnet_diagnostic.IDE0045.severity = none # IDE0046: Use conditional expression for return -# +# # Using a conditional expression is not always a clear win for readability. # # Configured using 'dotnet_style_prefer_conditional_expression_over_return' dotnet_diagnostic.IDE0046.severity = suggestion # IDE0047: Remove unnecessary parentheses -# +# # Removing "unnecessary" parentheses is not always a clear win for readability. dotnet_diagnostic.IDE0047.severity = suggestion @@ -794,7 +796,7 @@ dotnet_diagnostic.IDE0047.severity = suggestion dotnet_diagnostic.IDE0130.severity = none # IDE0270: Null check can be simplified -# +# # var inputPath = originalDossierPathList.Find(x => x.id == updatedPath.id); # if (inputPath is null) # { @@ -938,7 +940,7 @@ csharp_new_line_before_catch = true csharp_new_line_before_finally = true # Enabling this setting breaks Resharper formatting for an enum field reference that is # deeply nested in an object initializer. -# +# # For an example, see TDataExchangeGeneralEnricher_CernInfrastructureObstruction. #csharp_new_line_before_members_in_object_initializers = true csharp_new_line_before_members_in_anonymous_types = true @@ -1021,19 +1023,19 @@ dotnet_naming_rule.private_const_fields_pascal_case.severity = warning dotnet_naming_symbols.interface.applicable_kinds = interface dotnet_naming_symbols.interface.applicable_accessibilities = * -dotnet_naming_symbols.interface.required_modifiers = +dotnet_naming_symbols.interface.required_modifiers = dotnet_naming_symbols.types.applicable_kinds = class, struct, interface, enum dotnet_naming_symbols.types.applicable_accessibilities = * -dotnet_naming_symbols.types.required_modifiers = +dotnet_naming_symbols.types.required_modifiers = dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method dotnet_naming_symbols.non_field_members.applicable_accessibilities = * -dotnet_naming_symbols.non_field_members.required_modifiers = +dotnet_naming_symbols.non_field_members.required_modifiers = dotnet_naming_symbols.private_fields.applicable_kinds = field dotnet_naming_symbols.private_fields.applicable_accessibilities = private -dotnet_naming_symbols.private_fields.required_modifiers = +dotnet_naming_symbols.private_fields.required_modifiers = dotnet_naming_symbols.private_static_fields.applicable_kinds = field dotnet_naming_symbols.private_static_fields.applicable_accessibilities = private @@ -1050,18 +1052,18 @@ dotnet_naming_symbols.private_const_fields.required_modifiers = const # Naming styles dotnet_naming_style.begins_with_i.required_prefix = I -dotnet_naming_style.begins_with_i.required_suffix = -dotnet_naming_style.begins_with_i.word_separator = +dotnet_naming_style.begins_with_i.required_suffix = +dotnet_naming_style.begins_with_i.word_separator = dotnet_naming_style.begins_with_i.capitalization = pascal_case -dotnet_naming_style.pascal_case.required_prefix = -dotnet_naming_style.pascal_case.required_suffix = -dotnet_naming_style.pascal_case.word_separator = +dotnet_naming_style.pascal_case.required_prefix = +dotnet_naming_style.pascal_case.required_suffix = +dotnet_naming_style.pascal_case.word_separator = dotnet_naming_style.pascal_case.capitalization = pascal_case dotnet_naming_style.camel_case_begins_with_underscore.required_prefix = _ -dotnet_naming_style.camel_case_begins_with_underscore.required_suffix = -dotnet_naming_style.camel_case_begins_with_underscore.word_separator = +dotnet_naming_style.camel_case_begins_with_underscore.required_suffix = +dotnet_naming_style.camel_case_begins_with_underscore.word_separator = dotnet_naming_style.camel_case_begins_with_underscore.capitalization = camel_case #### .NET Compiler Platform general options #### diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index af7ba3c94..e3bf18671 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -18,7 +18,7 @@ The library has a test project for unit tests and a test project for integration Code coverage information can be generated for all test projects at once or for individual test projects. From the root of the repository or from the individual test project directory, run `dotnet test --collect:"XPlat Code Coverage"`. -The coverage information can be visualised using e.g. [ReportGenerator](https://reportgenerator.io/). Install the ReportGenerator dotnet tool with `dotnet tool update -g dotnet-reportgenerator-globaltool` and then run +The coverage information can be visualized using e.g. [ReportGenerator](https://reportgenerator.io/). Install the ReportGenerator dotnet tool with `dotnet tool update -g dotnet-reportgenerator-globaltool` and then run ``` reportgenerator -reports:**/coverage.cobertura.xml -targetdir:TestResults/CoverageReport -assemblyfilters:+Renci.SshNet diff --git a/Renci.SshNet.sln b/Renci.SshNet.sln index 4a0a20538..f40457086 100644 --- a/Renci.SshNet.sln +++ b/Renci.SshNet.sln @@ -14,6 +14,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution CONTRIBUTING.md = CONTRIBUTING.md Directory.Build.props = Directory.Build.props Directory.Packages.props = Directory.Packages.props + exclusion.dic = exclusion.dic global.json = global.json LICENSE = LICENSE nuget.config = nuget.config diff --git a/exclusion.dic b/exclusion.dic new file mode 100644 index 000000000..95df49b0c --- /dev/null +++ b/exclusion.dic @@ -0,0 +1,53 @@ +args +atime +bcrypt +bigint +bourne +cbc +chacha +csproj +decryptor +dest +diffie +docfx +ecdh +ecdsa +emerle +exe +fallback +github +hmac +hostbased +identd +ietf +impl +infocmp +kewl +kex +mindrot +mtime +netconf +nist +nistp +openssh +pkcs +posix +privatekey +protoversion +pubkey +publickey +renci +ripemd +slen +sntrup +softwareversion +sshd +tcpip +threadpool +umac +unpad +unix +waithandle +xoff +xmldoc +zlib diff --git a/src/Renci.SshNet/.editorconfig b/src/Renci.SshNet/.editorconfig index ee5bc33b9..618abc4d6 100644 --- a/src/Renci.SshNet/.editorconfig +++ b/src/Renci.SshNet/.editorconfig @@ -1,4 +1,6 @@ [*.cs] +spelling_exclusion_path = ../exclusion.dic +spelling_checkable_types = all #### Sonar rules #### diff --git a/src/Renci.SshNet/Abstractions/SocketAbstraction.cs b/src/Renci.SshNet/Abstractions/SocketAbstraction.cs index 7114247ae..69ec38b26 100644 --- a/src/Renci.SshNet/Abstractions/SocketAbstraction.cs +++ b/src/Renci.SshNet/Abstractions/SocketAbstraction.cs @@ -350,7 +350,7 @@ public static void Send(Socket socket, byte[] data, int offset, int size) } else { - throw; // any serious error occurr + throw; // any serious error occur } } } diff --git a/src/Renci.SshNet/BaseClient.cs b/src/Renci.SshNet/BaseClient.cs index d855c7342..d799ababb 100644 --- a/src/Renci.SshNet/BaseClient.cs +++ b/src/Renci.SshNet/BaseClient.cs @@ -408,7 +408,7 @@ protected virtual void OnDisconnected() { } - private void Session_ErrorOccured(object? sender, ExceptionEventArgs e) + private void Session_ErrorOccurred(object? sender, ExceptionEventArgs e) { ErrorOccurred?.Invoke(this, e); } @@ -558,7 +558,7 @@ private ISession CreateAndConnectSession() var session = _serviceFactory.CreateSession(ConnectionInfo, _serviceFactory.CreateSocketFactory()); session.ServerIdentificationReceived += Session_ServerIdentificationReceived; session.HostKeyReceived += Session_HostKeyReceived; - session.ErrorOccured += Session_ErrorOccured; + session.ErrorOccured += Session_ErrorOccurred; try { @@ -577,7 +577,7 @@ private async Task CreateAndConnectSessionAsync(CancellationToken canc var session = _serviceFactory.CreateSession(ConnectionInfo, _serviceFactory.CreateSocketFactory()); session.ServerIdentificationReceived += Session_ServerIdentificationReceived; session.HostKeyReceived += Session_HostKeyReceived; - session.ErrorOccured += Session_ErrorOccured; + session.ErrorOccured += Session_ErrorOccurred; try { @@ -593,7 +593,7 @@ private async Task CreateAndConnectSessionAsync(CancellationToken canc private void DisposeSession(ISession session) { - session.ErrorOccured -= Session_ErrorOccured; + session.ErrorOccured -= Session_ErrorOccurred; session.HostKeyReceived -= Session_HostKeyReceived; session.ServerIdentificationReceived -= Session_ServerIdentificationReceived; session.Dispose(); diff --git a/src/Renci.SshNet/Channels/Channel.cs b/src/Renci.SshNet/Channels/Channel.cs index bbcd1ffbd..29a50652a 100644 --- a/src/Renci.SshNet/Channels/Channel.cs +++ b/src/Renci.SshNet/Channels/Channel.cs @@ -94,7 +94,7 @@ protected Channel(ISession session, uint localChannelNumber, uint localWindowSiz session.ChannelRequestReceived += OnChannelRequest; session.ChannelSuccessReceived += OnChannelSuccess; session.ChannelFailureReceived += OnChannelFailure; - session.ErrorOccured += Session_ErrorOccured; + session.ErrorOccured += Session_ErrorOccurred; session.Disconnected += Session_Disconnected; } @@ -102,7 +102,7 @@ protected Channel(ISession session, uint localChannelNumber, uint localWindowSiz /// Gets the session. /// /// - /// Thhe session. + /// The session. /// protected ISession Session { @@ -328,7 +328,7 @@ public void SendData(byte[] data) /// multiple chunks and will wait for the remote window size to be adjusted when it's zero. /// /// - /// This is done to support SSH servers will a small window size that do not agressively + /// This is done to support SSH servers will a small window size that do not aggressively /// increase their window size. We need to take into account that there may be SSH servers /// that only increase their window size when it has reached zero. /// @@ -586,7 +586,7 @@ protected virtual void OnDisconnected() { } - protected virtual void OnErrorOccured(Exception exp) + protected virtual void OnErrorOccurred(Exception exp) { } @@ -609,20 +609,20 @@ private void Session_Disconnected(object sender, EventArgs e) /// /// The . /// - /// This method will in turn invoke , and + /// This method will in turn invoke , and /// raise the event. /// protected void OnChannelException(Exception ex) { - OnErrorOccured(ex); + OnErrorOccurred(ex); RaiseExceptionEvent(ex); } - private void Session_ErrorOccured(object sender, ExceptionEventArgs e) + private void Session_ErrorOccurred(object sender, ExceptionEventArgs e) { try { - OnErrorOccured(e.Exception); + OnErrorOccurred(e.Exception); } catch (Exception ex) { @@ -854,7 +854,7 @@ protected virtual void Dispose(bool disposing) session.ChannelRequestReceived -= OnChannelRequest; session.ChannelSuccessReceived -= OnChannelSuccess; session.ChannelFailureReceived -= OnChannelFailure; - session.ErrorOccured -= Session_ErrorOccured; + session.ErrorOccured -= Session_ErrorOccurred; session.Disconnected -= Session_Disconnected; } diff --git a/src/Renci.SshNet/Channels/ChannelDirectTcpip.cs b/src/Renci.SshNet/Channels/ChannelDirectTcpip.cs index 64f35d4a4..140e5d6e8 100644 --- a/src/Renci.SshNet/Channels/ChannelDirectTcpip.cs +++ b/src/Renci.SshNet/Channels/ChannelDirectTcpip.cs @@ -249,9 +249,9 @@ protected override void OnEof() /// Called whenever an unhandled occurs in causing /// the message loop to be interrupted, or when an exception occurred processing a channel message. /// - protected override void OnErrorOccured(Exception exp) + protected override void OnErrorOccurred(Exception exp) { - base.OnErrorOccured(exp); + base.OnErrorOccurred(exp); // signal to the client that we will not send anything anymore; this will also interrupt the // blocking receive in Bind if the client sends FIN/ACK in time @@ -261,7 +261,7 @@ protected override void OnErrorOccured(Exception exp) } /// - /// Called when the server wants to terminate the connection immmediately. + /// Called when the server wants to terminate the connection immediately. /// /// /// The sender MUST NOT send or receive any data after this message, and diff --git a/src/Renci.SshNet/Channels/ChannelForwardedTcpip.cs b/src/Renci.SshNet/Channels/ChannelForwardedTcpip.cs index 10d8a161c..18d5e2b49 100644 --- a/src/Renci.SshNet/Channels/ChannelForwardedTcpip.cs +++ b/src/Renci.SshNet/Channels/ChannelForwardedTcpip.cs @@ -98,9 +98,9 @@ public void Bind(IPEndPoint remoteEndpoint, IForwardedPort forwardedPort) SocketAbstraction.ReadContinuous(_socket, buffer, 0, buffer.Length, SendData); } - protected override void OnErrorOccured(Exception exp) + protected override void OnErrorOccurred(Exception exp) { - base.OnErrorOccured(exp); + base.OnErrorOccurred(exp); // signal to the server that we will not send anything anymore; this will also interrupt the // blocking receive in Bind if the server sends FIN/ACK in time diff --git a/src/Renci.SshNet/Channels/ChannelSession.cs b/src/Renci.SshNet/Channels/ChannelSession.cs index cb8bedc69..47442d7b5 100644 --- a/src/Renci.SshNet/Channels/ChannelSession.cs +++ b/src/Renci.SshNet/Channels/ChannelSession.cs @@ -35,7 +35,7 @@ internal sealed class ChannelSession : ClientChannel, IChannelSession private EventWaitHandle _channelRequestResponse = new ManualResetEvent(initialState: false); - private bool _channelRequestSucces; + private bool _channelRequestSuccess; /// /// Initializes a new instance of the class. @@ -136,7 +136,7 @@ public bool SendPseudoTerminalRequest(string environmentVariable, uint columns, _ = _channelRequestResponse.Reset(); SendMessage(new ChannelRequestMessage(RemoteChannelNumber, new PseudoTerminalRequestInfo(environmentVariable, columns, rows, width, height, terminalModeValues))); WaitOnHandle(_channelRequestResponse); - return _channelRequestSucces; + return _channelRequestSuccess; } /// @@ -154,7 +154,7 @@ public bool SendX11ForwardingRequest(bool isSingleConnection, string protocol, b _ = _channelRequestResponse.Reset(); SendMessage(new ChannelRequestMessage(RemoteChannelNumber, new X11ForwardingRequestInfo(isSingleConnection, protocol, cookie, screenNumber))); WaitOnHandle(_channelRequestResponse); - return _channelRequestSucces; + return _channelRequestSuccess; } /// @@ -170,7 +170,7 @@ public bool SendEnvironmentVariableRequest(string variableName, string variableV _ = _channelRequestResponse.Reset(); SendMessage(new ChannelRequestMessage(RemoteChannelNumber, new EnvironmentVariableRequestInfo(variableName, variableValue))); WaitOnHandle(_channelRequestResponse); - return _channelRequestSucces; + return _channelRequestSuccess; } /// @@ -184,7 +184,7 @@ public bool SendShellRequest() _ = _channelRequestResponse.Reset(); SendMessage(new ChannelRequestMessage(RemoteChannelNumber, new ShellRequestInfo())); WaitOnHandle(_channelRequestResponse); - return _channelRequestSucces; + return _channelRequestSuccess; } /// @@ -199,7 +199,7 @@ public bool SendExecRequest(string command) _ = _channelRequestResponse.Reset(); SendMessage(new ChannelRequestMessage(RemoteChannelNumber, new ExecRequestInfo(command, ConnectionInfo.Encoding))); WaitOnHandle(_channelRequestResponse); - return _channelRequestSucces; + return _channelRequestSuccess; } /// @@ -214,7 +214,7 @@ public bool SendBreakRequest(uint breakLength) _ = _channelRequestResponse.Reset(); SendMessage(new ChannelRequestMessage(RemoteChannelNumber, new BreakRequestInfo(breakLength))); WaitOnHandle(_channelRequestResponse); - return _channelRequestSucces; + return _channelRequestSuccess; } /// @@ -229,7 +229,7 @@ public bool SendSubsystemRequest(string subsystem) _ = _channelRequestResponse.Reset(); SendMessage(new ChannelRequestMessage(RemoteChannelNumber, new SubsystemRequestInfo(subsystem))); WaitOnHandle(_channelRequestResponse); - return _channelRequestSucces; + return _channelRequestSuccess; } /// @@ -277,7 +277,7 @@ public bool SendEndOfWriteRequest() _ = _channelRequestResponse.Reset(); SendMessage(new ChannelRequestMessage(RemoteChannelNumber, new EndOfWriteRequestInfo())); WaitOnHandle(_channelRequestResponse); - return _channelRequestSucces; + return _channelRequestSuccess; } /// @@ -291,7 +291,7 @@ public bool SendKeepAliveRequest() _ = _channelRequestResponse.Reset(); SendMessage(new ChannelRequestMessage(RemoteChannelNumber, new KeepAliveRequestInfo())); WaitOnHandle(_channelRequestResponse); - return _channelRequestSucces; + return _channelRequestSuccess; } /// @@ -301,7 +301,7 @@ protected override void OnSuccess() { base.OnSuccess(); - _channelRequestSucces = true; + _channelRequestSuccess = true; _ = _channelRequestResponse?.Set(); } @@ -312,7 +312,7 @@ protected override void OnFailure() { base.OnFailure(); - _channelRequestSucces = false; + _channelRequestSuccess = false; _ = _channelRequestResponse?.Set(); } diff --git a/src/Renci.SshNet/Channels/IChannel.cs b/src/Renci.SshNet/Channels/IChannel.cs index f89679eb0..4e15c6c4c 100644 --- a/src/Renci.SshNet/Channels/IChannel.cs +++ b/src/Renci.SshNet/Channels/IChannel.cs @@ -102,7 +102,7 @@ internal interface IChannel : IDisposable /// multiple chunks and will wait for the remote window size to be adjusted when it's zero. /// /// - /// This is done to support SSH servers will a small window size that do not agressively + /// This is done to support SSH servers will a small window size that do not aggressively /// increase their window size. We need to take into account that there may be SSH servers /// that only increase their window size when it has reached zero. /// diff --git a/src/Renci.SshNet/ClientAuthentication.cs b/src/Renci.SshNet/ClientAuthentication.cs index ad755be82..bd386ed27 100644 --- a/src/Renci.SshNet/ClientAuthentication.cs +++ b/src/Renci.SshNet/ClientAuthentication.cs @@ -116,7 +116,7 @@ private bool TryAuthenticate(ISession session, foreach (var authenticationMethod in authenticationState.GetActiveAuthenticationMethods(matchingAuthenticationMethods)) { - // guard against a stack overlow for servers that do not update the list of allowed authentication + // guard against a stack overflow for servers that do not update the list of allowed authentication // methods after a partial success if (authenticationState.GetPartialSuccessCount(authenticationMethod) >= _partialSuccessLimit) { diff --git a/src/Renci.SshNet/Common/ExceptionEventArgs.cs b/src/Renci.SshNet/Common/ExceptionEventArgs.cs index 7e99def5a..b183f998a 100644 --- a/src/Renci.SshNet/Common/ExceptionEventArgs.cs +++ b/src/Renci.SshNet/Common/ExceptionEventArgs.cs @@ -3,7 +3,7 @@ namespace Renci.SshNet.Common { /// - /// Provides data for the ErrorOccured events. + /// Provides data for the ErrorOccurred events. /// public class ExceptionEventArgs : EventArgs { diff --git a/src/Renci.SshNet/Common/SshDataStream.cs b/src/Renci.SshNet/Common/SshDataStream.cs index af8be81bc..a13b635ea 100644 --- a/src/Renci.SshNet/Common/SshDataStream.cs +++ b/src/Renci.SshNet/Common/SshDataStream.cs @@ -213,7 +213,7 @@ public void WriteBinary(byte[] buffer, int offset, int count) } /// - /// Reads a from the SSH datastream. + /// Reads a from the SSH data stream. /// /// /// The read from the SSH data stream. diff --git a/src/Renci.SshNet/Connection/Socks5Connector.cs b/src/Renci.SshNet/Connection/Socks5Connector.cs index a548eaea4..bf54c2285 100644 --- a/src/Renci.SshNet/Connection/Socks5Connector.cs +++ b/src/Renci.SshNet/Connection/Socks5Connector.cs @@ -180,7 +180,7 @@ private static byte[] CreateSocks5UserNameAndPasswordAuthenticationRequest(strin var index = 0; - // Version of the negiotiation + // Version of the negotiation authenticationRequest[index++] = 0x01; // Length of the username diff --git a/src/Renci.SshNet/ForwardedPort.cs b/src/Renci.SshNet/ForwardedPort.cs index c19ef31ba..6440c7476 100644 --- a/src/Renci.SshNet/ForwardedPort.cs +++ b/src/Renci.SshNet/ForwardedPort.cs @@ -64,7 +64,7 @@ public virtual void Start() throw new SshConnectionException("Client not connected."); } - Session.ErrorOccured += Session_ErrorOccured; + Session.ErrorOccured += Session_ErrorOccurred; StartPort(); } @@ -107,7 +107,7 @@ protected virtual void StopPort(TimeSpan timeout) var session = Session; if (session is not null) { - session.ErrorOccured -= Session_ErrorOccured; + session.ErrorOccured -= Session_ErrorOccurred; } } @@ -162,11 +162,11 @@ private void RaiseClosing() } /// - /// Handles session ErrorOccured event. + /// Handles session ErrorOccurred event. /// /// The source of the event. /// The instance containing the event data. - private void Session_ErrorOccured(object sender, ExceptionEventArgs e) + private void Session_ErrorOccurred(object sender, ExceptionEventArgs e) { RaiseExceptionEvent(e.Exception); } diff --git a/src/Renci.SshNet/ForwardedPortDynamic.cs b/src/Renci.SshNet/ForwardedPortDynamic.cs index 4a85a0fa3..b86506c9d 100644 --- a/src/Renci.SshNet/ForwardedPortDynamic.cs +++ b/src/Renci.SshNet/ForwardedPortDynamic.cs @@ -171,7 +171,7 @@ private void InternalStart() // update bound port (in case original was passed as zero) BoundPort = (uint)((IPEndPoint)_listener.LocalEndPoint).Port; - Session.ErrorOccured += Session_ErrorOccured; + Session.ErrorOccured += Session_ErrorOccurred; Session.Disconnected += Session_Disconnected; // consider port started when we're listening for inbound connections @@ -401,7 +401,7 @@ private void StopListener() var session = Session; if (session is not null) { - session.ErrorOccured -= Session_ErrorOccured; + session.ErrorOccured -= Session_ErrorOccurred; session.Disconnected -= Session_Disconnected; } } @@ -449,7 +449,7 @@ private void Session_Disconnected(object sender, EventArgs e) } } - private void Session_ErrorOccured(object sender, ExceptionEventArgs e) + private void Session_ErrorOccurred(object sender, ExceptionEventArgs e) { var session = Session; if (session is not null) diff --git a/src/Renci.SshNet/ForwardedPortLocal.cs b/src/Renci.SshNet/ForwardedPortLocal.cs index 50d84dc74..f5d376173 100644 --- a/src/Renci.SshNet/ForwardedPortLocal.cs +++ b/src/Renci.SshNet/ForwardedPortLocal.cs @@ -199,7 +199,7 @@ private void InternalStart() // update bound port (in case original was passed as zero) BoundPort = (uint)((IPEndPoint)_listener.LocalEndPoint).Port; - Session.ErrorOccured += Session_ErrorOccured; + Session.ErrorOccured += Session_ErrorOccurred; Session.Disconnected += Session_Disconnected; InitializePendingChannelCountdown(); @@ -375,7 +375,7 @@ private void StopListener() var session = Session; if (session != null) { - session.ErrorOccured -= Session_ErrorOccured; + session.ErrorOccured -= Session_ErrorOccurred; session.Disconnected -= Session_Disconnected; } } @@ -423,7 +423,7 @@ private void Session_Disconnected(object sender, EventArgs e) } } - private void Session_ErrorOccured(object sender, ExceptionEventArgs e) + private void Session_ErrorOccurred(object sender, ExceptionEventArgs e) { var session = Session; if (session is not null) diff --git a/src/Renci.SshNet/IServiceFactory.cs b/src/Renci.SshNet/IServiceFactory.cs index c042e5455..7051942a1 100644 --- a/src/Renci.SshNet/IServiceFactory.cs +++ b/src/Renci.SshNet/IServiceFactory.cs @@ -121,7 +121,7 @@ internal partial interface IServiceFactory /// /// /// The TERM environment variable contains an identifier for the text window's capabilities. - /// You can get a detailed list of these cababilities by using the ‘infocmp’ command. + /// You can get a detailed list of these capabilities by using the ‘infocmp’ command. /// /// /// The column/row dimensions override the pixel dimensions(when non-zero). Pixel dimensions refer diff --git a/src/Renci.SshNet/ISubsystemSession.cs b/src/Renci.SshNet/ISubsystemSession.cs index 4fa6b28b2..ce9e4f1fe 100644 --- a/src/Renci.SshNet/ISubsystemSession.cs +++ b/src/Renci.SshNet/ISubsystemSession.cs @@ -42,7 +42,7 @@ internal interface ISubsystemSession : IDisposable /// Waits a specified time for a given to get signaled. /// /// The handle to wait for. - /// The number of millieseconds wait for to get signaled, or -1 to wait indefinitely. + /// The number of milliseconds wait for to get signaled, or -1 to wait indefinitely. /// The connection was closed by the server. /// The channel was closed. /// The handle did not get signaled within the specified timeout. @@ -105,7 +105,7 @@ internal interface ISubsystemSession : IDisposable /// /// The connection was closed by the server. /// The channel was closed. - /// No object satified the wait and a time interval equivalent to has passed. + /// No object satisfied the wait and a time interval equivalent to has passed. /// /// For the return value, the index of the first non-system object is considered to be zero. /// diff --git a/src/Renci.SshNet/Messages/Connection/ChannelOpen/ChannelOpenMessage.cs b/src/Renci.SshNet/Messages/Connection/ChannelOpen/ChannelOpenMessage.cs index a9d62b018..bd5c52bfb 100644 --- a/src/Renci.SshNet/Messages/Connection/ChannelOpen/ChannelOpenMessage.cs +++ b/src/Renci.SshNet/Messages/Connection/ChannelOpen/ChannelOpenMessage.cs @@ -93,7 +93,7 @@ protected override int BufferCapacity /// public ChannelOpenMessage() { - // Required for dynamicly loading request type when it comes from the server + // Required for dynamically loading request type when it comes from the server } /// diff --git a/src/Renci.SshNet/Messages/Connection/ChannelRequest/PseudoTerminalRequestInfo.cs b/src/Renci.SshNet/Messages/Connection/ChannelRequest/PseudoTerminalRequestInfo.cs index e90bac45f..33e46545f 100644 --- a/src/Renci.SshNet/Messages/Connection/ChannelRequest/PseudoTerminalRequestInfo.cs +++ b/src/Renci.SshNet/Messages/Connection/ChannelRequest/PseudoTerminalRequestInfo.cs @@ -105,7 +105,7 @@ public PseudoTerminalRequestInfo() /// /// /// The TERM environment variable contains an identifier for the text window's capabilities. - /// You can get a detailed list of these cababilities by using the ‘infocmp’ command. + /// You can get a detailed list of these capabilities by using the ‘infocmp’ command. /// /// /// The column/row dimensions override the pixel dimensions(when nonzero). Pixel dimensions refer diff --git a/src/Renci.SshNet/Messages/Transport/IgnoreMessage.cs b/src/Renci.SshNet/Messages/Transport/IgnoreMessage.cs index 25ebd43b2..bce81bcf6 100644 --- a/src/Renci.SshNet/Messages/Transport/IgnoreMessage.cs +++ b/src/Renci.SshNet/Messages/Transport/IgnoreMessage.cs @@ -28,7 +28,7 @@ public override byte MessageNumber } /// - /// Gets ignore message data if this message has been initialised + /// Gets ignore message data if this message has been initialized /// with data to be sent. Otherwise, returns an empty array. /// public byte[] Data { get; private set; } diff --git a/src/Renci.SshNet/PrivateKeyFile.OpenSSH.cs b/src/Renci.SshNet/PrivateKeyFile.OpenSSH.cs index 379b51cb3..0a02d8cf9 100644 --- a/src/Renci.SshNet/PrivateKeyFile.OpenSSH.cs +++ b/src/Renci.SshNet/PrivateKeyFile.OpenSSH.cs @@ -66,7 +66,7 @@ public Key Parse() throw new SshException("At this time only one public key in the openssh key is supported."); } - // read public key in ssh-format, but we dont need it + // read public key in ssh-format, but we don't need it _ = keyReader.ReadString(Encoding.UTF8); // possibly encrypted private key diff --git a/src/Renci.SshNet/PrivateKeyFile.cs b/src/Renci.SshNet/PrivateKeyFile.cs index a7339a913..606c9702d 100644 --- a/src/Renci.SshNet/PrivateKeyFile.cs +++ b/src/Renci.SshNet/PrivateKeyFile.cs @@ -406,7 +406,7 @@ private void OpenCertificate(Stream certificate) Certificate = new Certificate(Convert.FromBase64String(data)); - Debug.Assert(Key is not null, $"{nameof(Key)} should have been initialised already."); + Debug.Assert(Key is not null, $"{nameof(Key)} should have been initialized already."); if (!Certificate.Key.Public.SequenceEqual(Key.Public)) { diff --git a/src/Renci.SshNet/RemotePathShellQuoteTransformation.cs b/src/Renci.SshNet/RemotePathShellQuoteTransformation.cs index adc1442ed..d019547bf 100644 --- a/src/Renci.SshNet/RemotePathShellQuoteTransformation.cs +++ b/src/Renci.SshNet/RemotePathShellQuoteTransformation.cs @@ -118,7 +118,7 @@ public string Transform(string path) break; case '!': /* - * In C-Shell, an exclamatation point can only be protected from shell interpretation + * In C-Shell, an exclamation point can only be protected from shell interpretation * when escaped by a backslash. * * Source: diff --git a/src/Renci.SshNet/Security/Certificate.cs b/src/Renci.SshNet/Security/Certificate.cs index 24cd1f1ef..88e386ca4 100644 --- a/src/Renci.SshNet/Security/Certificate.cs +++ b/src/Renci.SshNet/Security/Certificate.cs @@ -176,7 +176,7 @@ public DateTimeOffset ValidBefore /// The key identifies the option and the value encodes /// option-specific information. /// All such options are "critical" in the sense that an implementation - /// must refuse to authorise a key that has an unrecognised option. + /// must refuse to authorize a key that has an unrecognized option. /// public IDictionary CriticalOptions { @@ -189,7 +189,7 @@ public IDictionary CriticalOptions /// /// A set of zero or more optional extensions. These extensions /// are not critical, and an implementation that encounters one that it does - /// not recognise may safely ignore it. + /// not recognize may safely ignore it. /// public IDictionary Extensions { diff --git a/src/Renci.SshNet/Security/Cryptography/Ciphers/AesGcmCipher.cs b/src/Renci.SshNet/Security/Cryptography/Ciphers/AesGcmCipher.cs index 820416bb2..ded36fc0d 100644 --- a/src/Renci.SshNet/Security/Cryptography/Ciphers/AesGcmCipher.cs +++ b/src/Renci.SshNet/Security/Cryptography/Ciphers/AesGcmCipher.cs @@ -22,7 +22,7 @@ internal sealed partial class AesGcmCipher : SymmetricCipher, IDisposable #endif /// - /// Gets the minimun block size. + /// Gets the minimum block size. /// The reader is reminded that SSH requires that the data to be /// encrypted MUST be padded out to a multiple of the block size /// (16-octets for AES-GCM). @@ -164,7 +164,7 @@ private void IncrementCounter() /// /// Dispose the instance. /// - /// Set to True to dispose of resouces. + /// Set to True to dispose of resources. public void Dispose(bool disposing) { if (disposing) diff --git a/src/Renci.SshNet/Security/Cryptography/Ciphers/ChaCha20Poly1305Cipher.cs b/src/Renci.SshNet/Security/Cryptography/Ciphers/ChaCha20Poly1305Cipher.cs index 5f63660c2..1559c2631 100644 --- a/src/Renci.SshNet/Security/Cryptography/Ciphers/ChaCha20Poly1305Cipher.cs +++ b/src/Renci.SshNet/Security/Cryptography/Ciphers/ChaCha20Poly1305Cipher.cs @@ -27,7 +27,7 @@ internal sealed class ChaCha20Poly1305Cipher : SymmetricCipher private readonly Poly1305 _mac; /// - /// Gets the minimun block size. + /// Gets the minimum block size. /// public override byte MinimumSize { diff --git a/src/Renci.SshNet/Security/SshKeyData.cs b/src/Renci.SshNet/Security/SshKeyData.cs index 0a1467a52..f57143fd7 100644 --- a/src/Renci.SshNet/Security/SshKeyData.cs +++ b/src/Renci.SshNet/Security/SshKeyData.cs @@ -58,7 +58,7 @@ public SshKeyData(byte[] data) /// /// Initializes a new instance of the class. /// - /// The public key format identifer. + /// The public key format identifier. /// The public key constituents. public SshKeyData(string name, BigInteger[] keys) { diff --git a/src/Renci.SshNet/Session.cs b/src/Renci.SshNet/Session.cs index dc252c39c..64fc12b0d 100644 --- a/src/Renci.SshNet/Session.cs +++ b/src/Renci.SshNet/Session.cs @@ -355,6 +355,7 @@ public string ClientVersion /// /// Occurs when an error occurred. /// + /// A known misspelling of "occurred" preserved for backward compatibility. public event EventHandler ErrorOccured; /// diff --git a/src/Renci.SshNet/SftpClient.cs b/src/Renci.SshNet/SftpClient.cs index e6d4efc16..1869bcaa7 100644 --- a/src/Renci.SshNet/SftpClient.cs +++ b/src/Renci.SshNet/SftpClient.cs @@ -2165,7 +2165,7 @@ public IEnumerable SynchronizeDirectories(string sourcePath, string de ThrowHelper.ThrowIfNull(sourcePath); ThrowHelper.ThrowIfNullOrWhiteSpace(destinationPath); - return InternalSynchronizeDirectories(sourcePath, destinationPath, searchPattern, asynchResult: null); + return InternalSynchronizeDirectories(sourcePath, destinationPath, searchPattern, asyncResult: null); } /// @@ -2227,7 +2227,7 @@ public IEnumerable EndSynchronizeDirectories(IAsyncResult asyncResult) return ar.EndInvoke(); } - private List InternalSynchronizeDirectories(string sourcePath, string destinationPath, string searchPattern, SftpSynchronizeDirectoriesAsyncResult? asynchResult) + private List InternalSynchronizeDirectories(string sourcePath, string destinationPath, string searchPattern, SftpSynchronizeDirectoriesAsyncResult? asyncResult) { if (!Directory.Exists(sourcePath)) { @@ -2293,7 +2293,7 @@ private List InternalSynchronizeDirectories(string sourcePath, string uploadedFiles.Add(localFile); - asynchResult?.Update(uploadedFiles.Count); + asyncResult?.Update(uploadedFiles.Count); } catch (Exception ex) { @@ -2318,7 +2318,7 @@ private List InternalSynchronizeDirectories(string sourcePath, string /// An that references the asynchronous request. /// The list callback. /// - /// A list of files in the specfied directory. + /// A list of files in the specified directory. /// /// is . /// Client not connected. @@ -2490,7 +2490,7 @@ private void InternalUploadFile(Stream input, string path, Flags flags, SftpUplo // We will send out all the write requests without waiting for each response. // Afterwards, we may wait on this handle until all responses are received - // or an error has occured. + // or an error has occurred. using var mres = new ManualResetEventSlim(initialState: false); ExceptionDispatchInfo? exception = null; diff --git a/src/Renci.SshNet/Shell.cs b/src/Renci.SshNet/Shell.cs index 909d8f507..54c229878 100644 --- a/src/Renci.SshNet/Shell.cs +++ b/src/Renci.SshNet/Shell.cs @@ -154,7 +154,7 @@ public void Start() _channel.ExtendedDataReceived += Channel_ExtendedDataReceived; _channel.Closed += Channel_Closed; _session.Disconnected += Session_Disconnected; - _session.ErrorOccured += Session_ErrorOccured; + _session.ErrorOccured += Session_ErrorOccurred; _channel.Open(); if (!_noTerminal) @@ -224,7 +224,7 @@ public void Stop() _channel?.Dispose(); } - private void Session_ErrorOccured(object sender, ExceptionEventArgs e) + private void Session_ErrorOccurred(object sender, ExceptionEventArgs e) { RaiseError(e); } @@ -297,7 +297,7 @@ private void UnsubscribeFromSessionEvents(ISession session) } session.Disconnected -= Session_Disconnected; - session.ErrorOccured -= Session_ErrorOccured; + session.ErrorOccured -= Session_ErrorOccurred; } private bool _disposed; diff --git a/src/Renci.SshNet/ShellStream.cs b/src/Renci.SshNet/ShellStream.cs index f7dc862ac..1bd58c5c1 100644 --- a/src/Renci.SshNet/ShellStream.cs +++ b/src/Renci.SshNet/ShellStream.cs @@ -162,7 +162,7 @@ private ShellStream(ISession session, int bufferSize, bool noTerminal) _channel.DataReceived += Channel_DataReceived; _channel.Closed += Channel_Closed; _session.Disconnected += Session_Disconnected; - _session.ErrorOccured += Session_ErrorOccured; + _session.ErrorOccured += Session_ErrorOccurred; _readBuffer = new System.Net.ArrayBuffer(bufferSize); _writeBuffer = new System.Net.ArrayBuffer(bufferSize); @@ -927,7 +927,7 @@ protected override void Dispose(bool disposing) // Do not dispose _session (we don't own it) _session.Disconnected -= Session_Disconnected; - _session.ErrorOccured -= Session_ErrorOccured; + _session.ErrorOccured -= Session_ErrorOccurred; // But we do own _channel _channel.DataReceived -= Channel_DataReceived; @@ -940,7 +940,7 @@ protected override void Dispose(bool disposing) base.Dispose(disposing); } - private void Session_ErrorOccured(object? sender, ExceptionEventArgs e) + private void Session_ErrorOccurred(object? sender, ExceptionEventArgs e) { ErrorOccurred?.Invoke(this, e); } diff --git a/src/Renci.SshNet/SshCommand.cs b/src/Renci.SshNet/SshCommand.cs index 1a3c6945d..6c8f0e09a 100644 --- a/src/Renci.SshNet/SshCommand.cs +++ b/src/Renci.SshNet/SshCommand.cs @@ -225,7 +225,7 @@ internal SshCommand(ISession session, string commandText, Encoding encoding) OutputStream = new PipeStream(); ExtendedOutputStream = new PipeStream(); _session.Disconnected += Session_Disconnected; - _session.ErrorOccured += Session_ErrorOccured; + _session.ErrorOccured += Session_ErrorOccurred; _channel = _session.CreateChannelSession(); } @@ -263,9 +263,9 @@ public Task ExecuteAsync(CancellationToken cancellationToken = default) OutputStream.Dispose(); ExtendedOutputStream.Dispose(); - // Initialize output streams. We already initialised them for the first + // Initialize output streams. We already initialized them for the first // execution in the constructor (to allow passing them around before execution) - // so we just need to reinitialise them for subsequent executions. + // so we just need to reinitialize them for subsequent executions. OutputStream = new PipeStream(); ExtendedOutputStream = new PipeStream(); _channel = _session.CreateChannelSession(); @@ -512,7 +512,7 @@ private void Session_Disconnected(object? sender, EventArgs e) SetAsyncComplete(setResult: false); } - private void Session_ErrorOccured(object? sender, ExceptionEventArgs e) + private void Session_ErrorOccurred(object? sender, ExceptionEventArgs e) { _ = _tcs?.TrySetException(e.Exception); @@ -642,7 +642,7 @@ protected virtual void Dispose(bool disposing) // unsubscribe from session events to ensure other objects that we're going to dispose // are not accessed while disposing _session.Disconnected -= Session_Disconnected; - _session.ErrorOccured -= Session_ErrorOccured; + _session.ErrorOccured -= Session_ErrorOccurred; // unsubscribe from channel events to ensure other objects that we're going to dispose // are not accessed while disposing diff --git a/src/Renci.SshNet/SubsystemSession.cs b/src/Renci.SshNet/SubsystemSession.cs index 6c6200f4b..af3044674 100644 --- a/src/Renci.SshNet/SubsystemSession.cs +++ b/src/Renci.SshNet/SubsystemSession.cs @@ -27,7 +27,7 @@ internal abstract class SubsystemSession : ISubsystemSession private ISession _session; private IChannelSession _channel; private Exception _exception; - private EventWaitHandle _errorOccuredWaitHandle = new ManualResetEvent(initialState: false); + private EventWaitHandle _errorOccurredWaitHandle = new ManualResetEvent(initialState: false); private EventWaitHandle _sessionDisconnectedWaitHandle = new ManualResetEvent(initialState: false); private EventWaitHandle _channelClosedWaitHandle = new ManualResetEvent(initialState: false); private bool _isDisposed; @@ -106,12 +106,12 @@ public void Connect() } // reset waithandles in case we're reconnecting - _ = _errorOccuredWaitHandle.Reset(); + _ = _errorOccurredWaitHandle.Reset(); _ = _sessionDisconnectedWaitHandle.Reset(); _ = _sessionDisconnectedWaitHandle.Reset(); _ = _channelClosedWaitHandle.Reset(); - _session.ErrorOccured += Session_ErrorOccured; + _session.ErrorOccured += Session_ErrorOccurred; _session.Disconnected += Session_Disconnected; _channel = _session.CreateChannelSession(); @@ -185,7 +185,7 @@ protected void RaiseError(Exception error) _logger.LogInformation(error, "Raised exception"); - _ = _errorOccuredWaitHandle?.Set(); + _ = _errorOccurredWaitHandle?.Set(); SignalErrorOccurred(error); } @@ -224,7 +224,7 @@ public void WaitOnHandle(WaitHandle waitHandle, int millisecondsTimeout) { var waitHandles = new[] { - _errorOccuredWaitHandle, + _errorOccurredWaitHandle, _sessionDisconnectedWaitHandle, _channelClosedWaitHandle, waitHandle @@ -253,8 +253,8 @@ protected async Task WaitOnHandleAsync(TaskCompletionSource tcs, int mi { cancellationToken.ThrowIfCancellationRequested(); - var errorOccuredReg = ThreadPool.RegisterWaitForSingleObject( - _errorOccuredWaitHandle, + var errorOccurredReg = ThreadPool.RegisterWaitForSingleObject( + _errorOccurredWaitHandle, (tcs, _) => ((TaskCompletionSource)tcs).TrySetException(_exception), state: tcs, millisecondsTimeOutInterval: -1, @@ -296,7 +296,7 @@ protected async Task WaitOnHandleAsync(TaskCompletionSource tcs, int mi } finally { - _ = errorOccuredReg.Unregister(waitObject: null); + _ = errorOccurredReg.Unregister(waitObject: null); _ = sessionDisconnectedReg.Unregister(waitObject: null); _ = channelClosedReg.Unregister(waitObject: null); } @@ -323,7 +323,7 @@ public bool WaitOne(WaitHandle waitHandle, int millisecondsTimeout) { var waitHandles = new[] { - _errorOccuredWaitHandle, + _errorOccurredWaitHandle, _sessionDisconnectedWaitHandle, _channelClosedWaitHandle, waitHandle @@ -377,7 +377,7 @@ public int WaitAny(WaitHandle waitHandleA, WaitHandle waitHandleB, int milliseco { var waitHandles = new[] { - _errorOccuredWaitHandle, + _errorOccurredWaitHandle, _sessionDisconnectedWaitHandle, _channelClosedWaitHandle, waitHandleA, @@ -416,7 +416,7 @@ public int WaitAny(WaitHandle waitHandleA, WaitHandle waitHandleB, int milliseco /// /// The connection was closed by the server. /// The channel was closed. - /// No object satified the wait and a time interval equivalent to has passed. + /// No object satisfied the wait and a time interval equivalent to has passed. /// /// For the return value, the index of the first non-system object is considered to be zero. /// @@ -452,7 +452,7 @@ public WaitHandle[] CreateWaitHandleArray(WaitHandle waitHandle1, WaitHandle wai { return new WaitHandle[] { - _errorOccuredWaitHandle, + _errorOccurredWaitHandle, _sessionDisconnectedWaitHandle, _channelClosedWaitHandle, waitHandle1, @@ -471,7 +471,7 @@ public WaitHandle[] CreateWaitHandleArray(WaitHandle waitHandle1, WaitHandle wai public WaitHandle[] CreateWaitHandleArray(params WaitHandle[] waitHandles) { var array = new WaitHandle[waitHandles.Length + SystemWaitHandleCount]; - array[0] = _errorOccuredWaitHandle; + array[0] = _errorOccurredWaitHandle; array[1] = _sessionDisconnectedWaitHandle; array[2] = _channelClosedWaitHandle; @@ -490,7 +490,7 @@ private void Session_Disconnected(object sender, EventArgs e) SignalDisconnected(); } - private void Session_ErrorOccured(object sender, ExceptionEventArgs e) + private void Session_ErrorOccurred(object sender, ExceptionEventArgs e) { RaiseError(e.Exception); } @@ -528,7 +528,7 @@ private void UnsubscribeFromSessionEvents(ISession session) } session.Disconnected -= Session_Disconnected; - session.ErrorOccured -= Session_ErrorOccured; + session.ErrorOccured -= Session_ErrorOccurred; } /// @@ -557,11 +557,11 @@ protected virtual void Dispose(bool disposing) _session = null; - var errorOccuredWaitHandle = _errorOccuredWaitHandle; - if (errorOccuredWaitHandle != null) + var errorOccurredWaitHandle = _errorOccurredWaitHandle; + if (errorOccurredWaitHandle != null) { - _errorOccuredWaitHandle = null; - errorOccuredWaitHandle.Dispose(); + _errorOccurredWaitHandle = null; + errorOccurredWaitHandle.Dispose(); } var sessionDisconnectedWaitHandle = _sessionDisconnectedWaitHandle; diff --git a/test/.editorconfig b/test/.editorconfig index e0a4a8b8f..6b6fc8570 100644 --- a/test/.editorconfig +++ b/test/.editorconfig @@ -1,4 +1,6 @@ [*.cs] +spelling_exclusion_path = ../exclusion.dic +spelling_checkable_types = identifiers,comments #### Sonar rules #### diff --git a/test/Renci.SshNet.Benchmarks/.editorconfig b/test/Renci.SshNet.Benchmarks/.editorconfig index 29255dc30..9cd7bec66 100644 --- a/test/Renci.SshNet.Benchmarks/.editorconfig +++ b/test/Renci.SshNet.Benchmarks/.editorconfig @@ -1,4 +1,6 @@ [*.cs] +spelling_exclusion_path = ../../exclusion.dic +spelling_checkable_types = identifiers,comments #### Sonar rules #### diff --git a/test/Renci.SshNet.IntegrationBenchmarks/.editorconfig b/test/Renci.SshNet.IntegrationBenchmarks/.editorconfig index 3e3e6d5eb..c39439e41 100644 --- a/test/Renci.SshNet.IntegrationBenchmarks/.editorconfig +++ b/test/Renci.SshNet.IntegrationBenchmarks/.editorconfig @@ -1,4 +1,6 @@ [*.cs] +spelling_exclusion_path = ../../exclusion.dic +spelling_checkable_types = identifiers,comments #### Sonar rules #### diff --git a/test/Renci.SshNet.IntegrationTests/.editorconfig b/test/Renci.SshNet.IntegrationTests/.editorconfig index ecfbce764..269754ae8 100644 --- a/test/Renci.SshNet.IntegrationTests/.editorconfig +++ b/test/Renci.SshNet.IntegrationTests/.editorconfig @@ -1,4 +1,6 @@ [*.cs] +spelling_exclusion_path = ../../exclusion.dic +spelling_checkable_types = identifiers,comments #### Sonar rules #### diff --git a/test/Renci.SshNet.IntegrationTests/ScpTests.cs b/test/Renci.SshNet.IntegrationTests/ScpTests.cs index 5a131865f..d12d08f07 100644 --- a/test/Renci.SshNet.IntegrationTests/ScpTests.cs +++ b/test/Renci.SshNet.IntegrationTests/ScpTests.cs @@ -1596,11 +1596,11 @@ public void Scp_Upload_DirectoryInfo_ExistingDirectory(IRemotePathTransformation var remotePathFile1 = CombinePaths(remoteDirectory, "file1"); var remotePathFile2 = CombinePaths(remoteDirectory, "file2"); - var absoluteremoteSubDirectory1 = CombinePaths(absoluteRemoteDirectory, "sub1"); + var absoluteRemoteSubDirectory1 = CombinePaths(absoluteRemoteDirectory, "sub1"); var remoteSubDirectory1 = CombinePaths(remoteDirectory, "sub1"); var remotePathSubFile1 = CombinePaths(remoteSubDirectory1, "file1"); var remotePathSubFile2 = CombinePaths(remoteSubDirectory1, "file2"); - var absoluteremoteSubDirectory2 = CombinePaths(absoluteRemoteDirectory, "sub2"); + var absoluteRemoteSubDirectory2 = CombinePaths(absoluteRemoteDirectory, "sub2"); var remoteSubDirectory2 = CombinePaths(remoteDirectory, "sub2"); using (var client = new SftpClient(_connectionInfoFactory.Create())) @@ -1726,7 +1726,7 @@ public void Scp_Upload_DirectoryInfo_ExistingDirectory(IRemotePathTransformation Assert.IsTrue(client.Exists(remoteSubDirectory1)); remoteSftpDirectory = client.Get(remoteSubDirectory1); Assert.IsNotNull(remoteSftpDirectory); - Assert.AreEqual(absoluteremoteSubDirectory1, remoteSftpDirectory.FullName); + Assert.AreEqual(absoluteRemoteSubDirectory1, remoteSftpDirectory.FullName); Assert.IsTrue(remoteSftpDirectory.IsDirectory); Assert.IsFalse(remoteSftpDirectory.IsRegularFile); Assert.AreEqual(Directory.GetLastWriteTimeUtc(localSubDirectory1), remoteSftpDirectory.LastWriteTimeUtc); @@ -1740,7 +1740,7 @@ public void Scp_Upload_DirectoryInfo_ExistingDirectory(IRemotePathTransformation Assert.IsTrue(client.Exists(remoteSubDirectory2)); remoteSftpDirectory = client.Get(remoteSubDirectory2); Assert.IsNotNull(remoteSftpDirectory); - Assert.AreEqual(absoluteremoteSubDirectory2, remoteSftpDirectory.FullName); + Assert.AreEqual(absoluteRemoteSubDirectory2, remoteSftpDirectory.FullName); Assert.IsTrue(remoteSftpDirectory.IsDirectory); Assert.IsFalse(remoteSftpDirectory.IsRegularFile); Assert.AreEqual(Directory.GetLastWriteTimeUtc(localSubDirectory2), remoteSftpDirectory.LastWriteTimeUtc); diff --git a/test/Renci.SshNet.IntegrationTests/SftpTests.cs b/test/Renci.SshNet.IntegrationTests/SftpTests.cs index 83275e0e3..64ca1521b 100644 --- a/test/Renci.SshNet.IntegrationTests/SftpTests.cs +++ b/test/Renci.SshNet.IntegrationTests/SftpTests.cs @@ -4570,9 +4570,9 @@ public void Sftp_SftpFileStream_Seek_BeyondEndOfFile_SeekOriginBegin() Assert.AreEqual(seekOffset + writeBuffer.Length, fs.Length); Assert.AreEqual(0x04, fs.ReadByte()); - var soughtOverReadBufferffer = new byte[seekOffset - 1]; - Assert.AreEqual(soughtOverReadBufferffer.Length, fs.Read(soughtOverReadBufferffer, offset: 0, soughtOverReadBufferffer.Length)); - Assert.IsTrue(new byte[soughtOverReadBufferffer.Length].IsEqualTo(soughtOverReadBufferffer)); + var soughtOverReadBuffer = new byte[seekOffset - 1]; + Assert.AreEqual(soughtOverReadBuffer.Length, fs.Read(soughtOverReadBuffer, offset: 0, soughtOverReadBuffer.Length)); + Assert.IsTrue(new byte[soughtOverReadBuffer.Length].IsEqualTo(soughtOverReadBuffer)); var readBuffer = new byte[writeBuffer.Length]; Assert.AreEqual(readBuffer.Length, fs.Read(readBuffer, offset: 0, readBuffer.Length)); @@ -4612,9 +4612,9 @@ public void Sftp_SftpFileStream_Seek_BeyondEndOfFile_SeekOriginBegin() Assert.AreEqual(seekOffset + writeBuffer.Length, fs.Length); Assert.AreEqual(0x04, fs.ReadByte()); - var soughtOverReadBufferffer = new byte[seekOffset - 1]; - Assert.AreEqual(soughtOverReadBufferffer.Length, fs.Read(soughtOverReadBufferffer, offset: 0, soughtOverReadBufferffer.Length)); - Assert.IsTrue(new byte[soughtOverReadBufferffer.Length].IsEqualTo(soughtOverReadBufferffer)); + var soughtOverReadBuffer = new byte[seekOffset - 1]; + Assert.AreEqual(soughtOverReadBuffer.Length, fs.Read(soughtOverReadBuffer, offset: 0, soughtOverReadBuffer.Length)); + Assert.IsTrue(new byte[soughtOverReadBuffer.Length].IsEqualTo(soughtOverReadBuffer)); var readBuffer = new byte[writeBuffer.Length]; Assert.AreEqual(readBuffer.Length, fs.Read(readBuffer, offset: 0, readBuffer.Length)); @@ -5315,9 +5315,9 @@ public void Sftp_SftpFileStream_Seek_WithinReadBuffer() Assert.AreEqual(seekOffset + writeBuffer.Length, fs.Length); Assert.AreEqual(0x04, fs.ReadByte()); - var soughtOverReadBufferffer = new byte[seekOffset - 1]; - Assert.AreEqual(soughtOverReadBufferffer.Length, fs.Read(soughtOverReadBufferffer, offset: 0, soughtOverReadBufferffer.Length)); - Assert.IsTrue(new byte[soughtOverReadBufferffer.Length].IsEqualTo(soughtOverReadBufferffer)); + var soughtOverReadBuffer = new byte[seekOffset - 1]; + Assert.AreEqual(soughtOverReadBuffer.Length, fs.Read(soughtOverReadBuffer, offset: 0, soughtOverReadBuffer.Length)); + Assert.IsTrue(new byte[soughtOverReadBuffer.Length].IsEqualTo(soughtOverReadBuffer)); var readBuffer = new byte[writeBuffer.Length]; Assert.AreEqual(readBuffer.Length, fs.Read(readBuffer, offset: 0, readBuffer.Length)); @@ -5398,9 +5398,9 @@ public void Sftp_SftpFileStream_Seek_WithinReadBuffer() Assert.AreEqual(0x04, fs.ReadByte()); - var soughtOverReadBufferffer = new byte[seekOffset - 1]; - Assert.AreEqual(seekOffset - 1, fs.Read(soughtOverReadBufferffer, offset: 0, soughtOverReadBufferffer.Length)); - Assert.IsTrue(new byte[seekOffset - 1].IsEqualTo(soughtOverReadBufferffer)); + var soughtOverReadBuffer = new byte[seekOffset - 1]; + Assert.AreEqual(seekOffset - 1, fs.Read(soughtOverReadBuffer, offset: 0, soughtOverReadBuffer.Length)); + Assert.IsTrue(new byte[seekOffset - 1].IsEqualTo(soughtOverReadBuffer)); var readBuffer = new byte[writeBuffer.Length]; Assert.AreEqual(writeBuffer.Length, fs.Read(readBuffer, offset: 0, readBuffer.Length)); diff --git a/test/Renci.SshNet.IntegrationTests/SshTests.cs b/test/Renci.SshNet.IntegrationTests/SshTests.cs index ba84365bf..276030e5d 100644 --- a/test/Renci.SshNet.IntegrationTests/SshTests.cs +++ b/test/Renci.SshNet.IntegrationTests/SshTests.cs @@ -831,7 +831,7 @@ private static bool AddOrUpdateHostsEntry(IConnectionInfoFactory linuxAdminConne continue; } - // If hostname is currently mapped to another IP address, then remove the + // If hostname is currently mapped to another IP address, then remove the // current mapping hostConfig.Entries.RemoveAt(i); } diff --git a/test/Renci.SshNet.TestTools.OpenSSH/.editorconfig b/test/Renci.SshNet.TestTools.OpenSSH/.editorconfig index f09ad6339..fd466cf21 100644 --- a/test/Renci.SshNet.TestTools.OpenSSH/.editorconfig +++ b/test/Renci.SshNet.TestTools.OpenSSH/.editorconfig @@ -1,4 +1,6 @@ [*.cs] +spelling_exclusion_path = ../../exclusion.dic +spelling_checkable_types = identifiers,comments #### Meziantou.Analyzer rules #### diff --git a/test/Renci.SshNet.Tests/.editorconfig b/test/Renci.SshNet.Tests/.editorconfig index e3ef92c0c..4ffebcf26 100644 --- a/test/Renci.SshNet.Tests/.editorconfig +++ b/test/Renci.SshNet.Tests/.editorconfig @@ -1,4 +1,6 @@ [*.cs] +spelling_exclusion_path = ../../exclusion.dic +spelling_checkable_types = identifiers,comments #### Sonar rules #### diff --git a/test/Renci.SshNet.Tests/Classes/BaseClientTest_Connect_OnConnectedThrowsException.cs b/test/Renci.SshNet.Tests/Classes/BaseClientTest_Connect_OnConnectedThrowsException.cs index caeb7f231..b49eac8df 100644 --- a/test/Renci.SshNet.Tests/Classes/BaseClientTest_Connect_OnConnectedThrowsException.cs +++ b/test/Renci.SshNet.Tests/Classes/BaseClientTest_Connect_OnConnectedThrowsException.cs @@ -102,7 +102,7 @@ public void DisposeOnSessionShouldBeInvokedOnce() } [TestMethod] - public void ErrorOccuredOnSessionShouldNoLongerBeSignaledViaErrorOccurredOnBaseClient() + public void ErrorOccurredOnSessionShouldNoLongerBeSignaledViaErrorOccurredOnBaseClient() { var errorOccurredSignalCount = 0; diff --git a/test/Renci.SshNet.Tests/Classes/BaseClientTest_Disconnected_Connect.cs b/test/Renci.SshNet.Tests/Classes/BaseClientTest_Disconnected_Connect.cs index db2cac1c6..79665089d 100644 --- a/test/Renci.SshNet.Tests/Classes/BaseClientTest_Disconnected_Connect.cs +++ b/test/Renci.SshNet.Tests/Classes/BaseClientTest_Disconnected_Connect.cs @@ -78,7 +78,7 @@ protected override void Act() } [TestMethod] - public void CreateSocketFactoryOnServiceFactoryShouldBeInvokedTwic() + public void CreateSocketFactoryOnServiceFactoryShouldBeInvokedTwice() { ServiceFactoryMock.Verify(p => p.CreateSocketFactory(), Times.Exactly(2)); } diff --git a/test/Renci.SshNet.Tests/Classes/Channels/ChannelDirectTcpipTest.cs b/test/Renci.SshNet.Tests/Classes/Channels/ChannelDirectTcpipTest.cs index 0b67b9174..ab15e7e29 100644 --- a/test/Renci.SshNet.Tests/Classes/Channels/ChannelDirectTcpipTest.cs +++ b/test/Renci.SshNet.Tests/Classes/Channels/ChannelDirectTcpipTest.cs @@ -142,7 +142,7 @@ public void SocketShouldBeClosedAndBindShouldEndWhenOnErrorOccurredIsInvoked() { // sleep for a short period to allow channel to actually start receiving from socket Thread.Sleep(100); - // raise ErrorOccured event on session + // raise ErrorOccurred event on session _sessionMock.Raise(s => s.ErrorOccured += null, new ExceptionEventArgs(new SystemException())); }); diff --git a/test/Renci.SshNet.Tests/Classes/Channels/ChannelSessionTest_Open_OnOpenFailureReceived_RetriesAvalable.cs b/test/Renci.SshNet.Tests/Classes/Channels/ChannelSessionTest_Open_OnOpenFailureReceived_RetriesAvailable.cs similarity index 99% rename from test/Renci.SshNet.Tests/Classes/Channels/ChannelSessionTest_Open_OnOpenFailureReceived_RetriesAvalable.cs rename to test/Renci.SshNet.Tests/Classes/Channels/ChannelSessionTest_Open_OnOpenFailureReceived_RetriesAvailable.cs index 2ecc40920..78ffa1ec1 100644 --- a/test/Renci.SshNet.Tests/Classes/Channels/ChannelSessionTest_Open_OnOpenFailureReceived_RetriesAvalable.cs +++ b/test/Renci.SshNet.Tests/Classes/Channels/ChannelSessionTest_Open_OnOpenFailureReceived_RetriesAvailable.cs @@ -14,7 +14,7 @@ namespace Renci.SshNet.Tests.Classes.Channels { [TestClass] - public class ChannelSessionTest_Open_OnOpenFailureReceived_RetriesAvalable : ChannelSessionTestBase + public class ChannelSessionTest_Open_OnOpenFailureReceived_RetriesAvailable : ChannelSessionTestBase { private ChannelSession _channel; private uint _localChannelNumber; diff --git a/test/Renci.SshNet.Tests/Classes/Channels/ChannelStub.cs b/test/Renci.SshNet.Tests/Classes/Channels/ChannelStub.cs index 119c3d58e..9ce0d2b17 100644 --- a/test/Renci.SshNet.Tests/Classes/Channels/ChannelStub.cs +++ b/test/Renci.SshNet.Tests/Classes/Channels/ChannelStub.cs @@ -108,7 +108,7 @@ protected override void OnExtendedData(byte[] data, uint dataTypeCode) } } - protected override void OnErrorOccured(Exception exp) + protected override void OnErrorOccurred(Exception exp) { OnErrorOccurredInvocations.Add(exp); diff --git a/test/Renci.SshNet.Tests/Classes/Channels/ChannelTest_OnSessionChannelCloseReceived_OnClose_Exception.cs b/test/Renci.SshNet.Tests/Classes/Channels/ChannelTest_OnSessionChannelCloseReceived_OnClose_Exception.cs index af4936e17..964ae98b9 100644 --- a/test/Renci.SshNet.Tests/Classes/Channels/ChannelTest_OnSessionChannelCloseReceived_OnClose_Exception.cs +++ b/test/Renci.SshNet.Tests/Classes/Channels/ChannelTest_OnSessionChannelCloseReceived_OnClose_Exception.cs @@ -56,7 +56,7 @@ public void ExceptionEventShouldHaveFiredOnce() } [TestMethod] - public void OnErrorOccuredShouldBeInvokedOnce() + public void OnErrorOccurredShouldBeInvokedOnce() { Assert.AreEqual(1, _channel.OnErrorOccurredInvocations.Count); Assert.AreSame(_onCloseException, _channel.OnErrorOccurredInvocations[0]); diff --git a/test/Renci.SshNet.Tests/Classes/Channels/ChannelTest_OnSessionChannelDataReceived_OnData_Exception.cs b/test/Renci.SshNet.Tests/Classes/Channels/ChannelTest_OnSessionChannelDataReceived_OnData_Exception.cs index 0703ca604..6ad785d85 100644 --- a/test/Renci.SshNet.Tests/Classes/Channels/ChannelTest_OnSessionChannelDataReceived_OnData_Exception.cs +++ b/test/Renci.SshNet.Tests/Classes/Channels/ChannelTest_OnSessionChannelDataReceived_OnData_Exception.cs @@ -56,7 +56,7 @@ public void ExceptionEventShouldHaveFiredOnce() } [TestMethod] - public void OnErrorOccuredShouldBeInvokedOnce() + public void OnErrorOccurredShouldBeInvokedOnce() { Assert.AreEqual(1, _channel.OnErrorOccurredInvocations.Count); Assert.AreSame(_onDataException, _channel.OnErrorOccurredInvocations[0]); diff --git a/test/Renci.SshNet.Tests/Classes/Channels/ChannelTest_OnSessionChannelEofReceived_OnEof_Exception.cs b/test/Renci.SshNet.Tests/Classes/Channels/ChannelTest_OnSessionChannelEofReceived_OnEof_Exception.cs index a97031bf2..c4f7f433d 100644 --- a/test/Renci.SshNet.Tests/Classes/Channels/ChannelTest_OnSessionChannelEofReceived_OnEof_Exception.cs +++ b/test/Renci.SshNet.Tests/Classes/Channels/ChannelTest_OnSessionChannelEofReceived_OnEof_Exception.cs @@ -64,7 +64,7 @@ public void ExceptionEventShouldHaveFiredOnce() } [TestMethod] - public void OnErrorOccuredShouldBeInvokedOnce() + public void OnErrorOccurredShouldBeInvokedOnce() { Assert.AreEqual(1, _channel.OnErrorOccurredInvocations.Count); Assert.AreSame(_onEofException, _channel.OnErrorOccurredInvocations[0]); diff --git a/test/Renci.SshNet.Tests/Classes/Channels/ChannelTest_OnSessionChannelExtendedDataReceived_OnExtendedData_Exception.cs b/test/Renci.SshNet.Tests/Classes/Channels/ChannelTest_OnSessionChannelExtendedDataReceived_OnExtendedData_Exception.cs index f07e01987..84892795a 100644 --- a/test/Renci.SshNet.Tests/Classes/Channels/ChannelTest_OnSessionChannelExtendedDataReceived_OnExtendedData_Exception.cs +++ b/test/Renci.SshNet.Tests/Classes/Channels/ChannelTest_OnSessionChannelExtendedDataReceived_OnExtendedData_Exception.cs @@ -56,7 +56,7 @@ public void ExceptionEventShouldHaveFiredOnce() } [TestMethod] - public void OnErrorOccuredShouldBeInvokedOnce() + public void OnErrorOccurredShouldBeInvokedOnce() { Assert.AreEqual(1, _channel.OnErrorOccurredInvocations.Count); Assert.AreSame(_onExtendedDataException, _channel.OnErrorOccurredInvocations[0]); diff --git a/test/Renci.SshNet.Tests/Classes/Channels/ChannelTest_OnSessionChannelFailureReceived_OnFailure_Exception.cs b/test/Renci.SshNet.Tests/Classes/Channels/ChannelTest_OnSessionChannelFailureReceived_OnFailure_Exception.cs index 3709b2de8..b0b3d8139 100644 --- a/test/Renci.SshNet.Tests/Classes/Channels/ChannelTest_OnSessionChannelFailureReceived_OnFailure_Exception.cs +++ b/test/Renci.SshNet.Tests/Classes/Channels/ChannelTest_OnSessionChannelFailureReceived_OnFailure_Exception.cs @@ -56,7 +56,7 @@ public void ExceptionEventShouldHaveFiredOnce() } [TestMethod] - public void OnErrorOccuredShouldBeInvokedOnce() + public void OnErrorOccurredShouldBeInvokedOnce() { Assert.AreEqual(1, _channel.OnErrorOccurredInvocations.Count); Assert.AreSame(_onFailureException, _channel.OnErrorOccurredInvocations[0]); diff --git a/test/Renci.SshNet.Tests/Classes/Channels/ChannelTest_OnSessionChannelRequestReceived_OnRequest_Exception.cs b/test/Renci.SshNet.Tests/Classes/Channels/ChannelTest_OnSessionChannelRequestReceived_OnRequest_Exception.cs index 62fe98ad8..860fc684b 100644 --- a/test/Renci.SshNet.Tests/Classes/Channels/ChannelTest_OnSessionChannelRequestReceived_OnRequest_Exception.cs +++ b/test/Renci.SshNet.Tests/Classes/Channels/ChannelTest_OnSessionChannelRequestReceived_OnRequest_Exception.cs @@ -60,7 +60,7 @@ public void ExceptionEventShouldHaveFiredOnce() } [TestMethod] - public void OnErrorOccuredShouldBeInvokedOnce() + public void OnErrorOccurredShouldBeInvokedOnce() { Assert.AreEqual(1, _channel.OnErrorOccurredInvocations.Count); Assert.AreSame(_onRequestException, _channel.OnErrorOccurredInvocations[0]); diff --git a/test/Renci.SshNet.Tests/Classes/Channels/ChannelTest_OnSessionChannelSuccessReceived_OnSuccess_Exception.cs b/test/Renci.SshNet.Tests/Classes/Channels/ChannelTest_OnSessionChannelSuccessReceived_OnSuccess_Exception.cs index b49b0b7ba..a12753067 100644 --- a/test/Renci.SshNet.Tests/Classes/Channels/ChannelTest_OnSessionChannelSuccessReceived_OnSuccess_Exception.cs +++ b/test/Renci.SshNet.Tests/Classes/Channels/ChannelTest_OnSessionChannelSuccessReceived_OnSuccess_Exception.cs @@ -56,7 +56,7 @@ public void ExceptionEventShouldHaveFiredOnce() } [TestMethod] - public void OnErrorOccuredShouldBeInvokedOnce() + public void OnErrorOccurredShouldBeInvokedOnce() { Assert.AreEqual(1, _channel.OnErrorOccurredInvocations.Count); Assert.AreSame(_onSuccessException, _channel.OnErrorOccurredInvocations[0]); diff --git a/test/Renci.SshNet.Tests/Classes/Channels/ChannelTest_OnSessionChannelWindowAdjustReceived_OnWindowAdjust_Exception.cs b/test/Renci.SshNet.Tests/Classes/Channels/ChannelTest_OnSessionChannelWindowAdjustReceived_OnWindowAdjust_Exception.cs index afad6eb87..5f0686ef0 100644 --- a/test/Renci.SshNet.Tests/Classes/Channels/ChannelTest_OnSessionChannelWindowAdjustReceived_OnWindowAdjust_Exception.cs +++ b/test/Renci.SshNet.Tests/Classes/Channels/ChannelTest_OnSessionChannelWindowAdjustReceived_OnWindowAdjust_Exception.cs @@ -65,7 +65,7 @@ public void ExceptionEventShouldHaveFiredOnce() } [TestMethod] - public void OnErrorOccuredShouldBeInvokedOnce() + public void OnErrorOccurredShouldBeInvokedOnce() { Assert.AreEqual(1, _channel.OnErrorOccurredInvocations.Count); Assert.AreSame(_onWindowAdjustException, _channel.OnErrorOccurredInvocations[0]); diff --git a/test/Renci.SshNet.Tests/Classes/Channels/ChannelTest_OnSessionDisconnected_OnDisconnected_Exception.cs b/test/Renci.SshNet.Tests/Classes/Channels/ChannelTest_OnSessionDisconnected_OnDisconnected_Exception.cs index 693adbd75..6900ac720 100644 --- a/test/Renci.SshNet.Tests/Classes/Channels/ChannelTest_OnSessionDisconnected_OnDisconnected_Exception.cs +++ b/test/Renci.SshNet.Tests/Classes/Channels/ChannelTest_OnSessionDisconnected_OnDisconnected_Exception.cs @@ -54,7 +54,7 @@ public void ExceptionEventShouldHaveFiredOnce() } [TestMethod] - public void OnErrorOccuredShouldBeInvokedOnce() + public void OnErrorOccurredShouldBeInvokedOnce() { Assert.AreEqual(1, _channel.OnErrorOccurredInvocations.Count); Assert.AreSame(_onDisconnectedException, _channel.OnErrorOccurredInvocations[0]); diff --git a/test/Renci.SshNet.Tests/Classes/Channels/ChannelTest_OnSessionErrorOccurred_OnErrorOccurred_Exception.cs b/test/Renci.SshNet.Tests/Classes/Channels/ChannelTest_OnSessionErrorOccurred_OnErrorOccurred_Exception.cs index 1dd45bbe7..eabb0eab9 100644 --- a/test/Renci.SshNet.Tests/Classes/Channels/ChannelTest_OnSessionErrorOccurred_OnErrorOccurred_Exception.cs +++ b/test/Renci.SshNet.Tests/Classes/Channels/ChannelTest_OnSessionErrorOccurred_OnErrorOccurred_Exception.cs @@ -56,7 +56,7 @@ public void ExceptionEventShouldHaveFiredOnce() } [TestMethod] - public void OnErrorOccuredShouldBeInvokedOnce() + public void OnErrorOccurredShouldBeInvokedOnce() { Assert.AreEqual(1, _channel.OnErrorOccurredInvocations.Count); Assert.AreSame(_errorOccurredException, _channel.OnErrorOccurredInvocations[0]); diff --git a/test/Renci.SshNet.Tests/Classes/Channels/ClientChannelStub.cs b/test/Renci.SshNet.Tests/Classes/Channels/ClientChannelStub.cs index 07ac5dad8..fffb3afb7 100644 --- a/test/Renci.SshNet.Tests/Classes/Channels/ClientChannelStub.cs +++ b/test/Renci.SshNet.Tests/Classes/Channels/ClientChannelStub.cs @@ -112,7 +112,7 @@ protected override void OnExtendedData(byte[] data, uint dataTypeCode) } } - protected override void OnErrorOccured(Exception exp) + protected override void OnErrorOccurred(Exception exp) { OnErrorOccurredInvocations.Add(exp); diff --git a/test/Renci.SshNet.Tests/Classes/Channels/ClientChannelTest_OnSessionChannelOpenConfirmationReceived_OnOpenConfirmation_Exception.cs b/test/Renci.SshNet.Tests/Classes/Channels/ClientChannelTest_OnSessionChannelOpenConfirmationReceived_OnOpenConfirmation_Exception.cs index 9fcdc6d40..0f0ec607d 100644 --- a/test/Renci.SshNet.Tests/Classes/Channels/ClientChannelTest_OnSessionChannelOpenConfirmationReceived_OnOpenConfirmation_Exception.cs +++ b/test/Renci.SshNet.Tests/Classes/Channels/ClientChannelTest_OnSessionChannelOpenConfirmationReceived_OnOpenConfirmation_Exception.cs @@ -62,7 +62,7 @@ public void ExceptionEventShouldHaveFiredOnce() } [TestMethod] - public void OnErrorOccuredShouldBeInvokedOnce() + public void OnErrorOccurredShouldBeInvokedOnce() { Assert.AreEqual(1, _channel.OnErrorOccurredInvocations.Count); Assert.AreSame(_onOpenConfirmationException, _channel.OnErrorOccurredInvocations[0]); diff --git a/test/Renci.SshNet.Tests/Classes/Channels/ClientChannelTest_OnSessionChannelOpenFailureReceived_OnOpenFailure_Exception.cs b/test/Renci.SshNet.Tests/Classes/Channels/ClientChannelTest_OnSessionChannelOpenFailureReceived_OnOpenFailure_Exception.cs index ad2b6ad1f..1a76ef5ac 100644 --- a/test/Renci.SshNet.Tests/Classes/Channels/ClientChannelTest_OnSessionChannelOpenFailureReceived_OnOpenFailure_Exception.cs +++ b/test/Renci.SshNet.Tests/Classes/Channels/ClientChannelTest_OnSessionChannelOpenFailureReceived_OnOpenFailure_Exception.cs @@ -59,7 +59,7 @@ public void ExceptionEventShouldHaveFiredOnce() } [TestMethod] - public void OnErrorOccuredShouldBeInvokedOnce() + public void OnErrorOccurredShouldBeInvokedOnce() { Assert.AreEqual(1, _channel.OnErrorOccurredInvocations.Count); Assert.AreSame(_onOpenFailureException, _channel.OnErrorOccurredInvocations[0]); diff --git a/test/Renci.SshNet.Tests/Classes/ConnectionInfoTest.cs b/test/Renci.SshNet.Tests/Classes/ConnectionInfoTest.cs index 4e143bbc6..407eb5a3e 100644 --- a/test/Renci.SshNet.Tests/Classes/ConnectionInfoTest.cs +++ b/test/Renci.SshNet.Tests/Classes/ConnectionInfoTest.cs @@ -19,7 +19,7 @@ public class ConnectionInfoTest : TestBase { [TestMethod] [TestCategory("ConnectionInfo")] - public void ConstructorShouldNotThrowExceptionhenProxyTypesIsNoneAndProxyHostIsNull() + public void ConstructorShouldNotThrowExceptionWhenProxyTypesIsNoneAndProxyHostIsNull() { const string proxyHost = null; @@ -32,7 +32,7 @@ public void ConstructorShouldNotThrowExceptionhenProxyTypesIsNoneAndProxyHostIsN [TestMethod] [TestCategory("ConnectionInfo")] - public void ConstructorShouldThrowArgumentNullExceptionhenProxyTypesIsNotNoneAndProxyHostIsNull() + public void ConstructorShouldThrowArgumentNullExceptionWhenProxyTypesIsNotNoneAndProxyHostIsNull() { try { @@ -153,7 +153,7 @@ public void ConstructorShouldNotThrowExceptionWhenProxyTypesIsNotNoneAndProxyUse [TestMethod] [TestCategory("ConnectionInfo")] - public void ConstructorShouldThrowArgumentNullExceptionhenHostIsNull() + public void ConstructorShouldThrowArgumentNullExceptionWhenHostIsNull() { try { @@ -358,7 +358,7 @@ public void Test_ConnectionInfo_ChannelCloseTimeout_Valid() [TestMethod] [TestCategory("ConnectionInfo")] - public void ConstructorShouldThrowArgumentExceptionhenUsernameIsNull() + public void ConstructorShouldThrowArgumentExceptionWhenUsernameIsNull() { const string username = null; @@ -384,7 +384,7 @@ public void ConstructorShouldThrowArgumentExceptionhenUsernameIsNull() [TestMethod] [TestCategory("ConnectionInfo")] - public void ConstructorShouldThrowArgumentExceptionhenUsernameIsEmpty() + public void ConstructorShouldThrowArgumentExceptionWhenUsernameIsEmpty() { var username = string.Empty; @@ -411,7 +411,7 @@ public void ConstructorShouldThrowArgumentExceptionhenUsernameIsEmpty() [TestMethod] [TestCategory("ConnectionInfo")] - public void ConstructorShouldThrowArgumentExceptionhenUsernameContainsOnlyWhitespace() + public void ConstructorShouldThrowArgumentExceptionWhenUsernameContainsOnlyWhitespace() { const string username = " \t\r"; diff --git a/test/Renci.SshNet.Tests/Classes/ForwardedPortDynamicTest_Start_PortStarted.cs b/test/Renci.SshNet.Tests/Classes/ForwardedPortDynamicTest_Start_PortStarted.cs index 0124a8db7..e7c115485 100644 --- a/test/Renci.SshNet.Tests/Classes/ForwardedPortDynamicTest_Start_PortStarted.cs +++ b/test/Renci.SshNet.Tests/Classes/ForwardedPortDynamicTest_Start_PortStarted.cs @@ -77,7 +77,7 @@ protected void Act() } [TestMethod] - public void StartShouldThrowInvalidOperatationException() + public void StartShouldThrowInvalidOperationException() { Assert.IsNotNull(_actualException); Assert.AreEqual("Forwarded port is already started.", _actualException.Message); diff --git a/test/Renci.SshNet.Tests/Classes/ForwardedPortLocalTest_Start_PortStarted.cs b/test/Renci.SshNet.Tests/Classes/ForwardedPortLocalTest_Start_PortStarted.cs index e9e07e393..1af1f7e6c 100644 --- a/test/Renci.SshNet.Tests/Classes/ForwardedPortLocalTest_Start_PortStarted.cs +++ b/test/Renci.SshNet.Tests/Classes/ForwardedPortLocalTest_Start_PortStarted.cs @@ -83,7 +83,7 @@ protected void Act() } [TestMethod] - public void StartShouldThrowInvalidOperatationException() + public void StartShouldThrowInvalidOperationException() { Assert.IsNotNull(_actualException); Assert.AreEqual("Forwarded port is already started.", _actualException.Message); diff --git a/test/Renci.SshNet.Tests/Classes/ForwardedPortRemoteTest_Start_PortStarted.cs b/test/Renci.SshNet.Tests/Classes/ForwardedPortRemoteTest_Start_PortStarted.cs index c6cf0850e..6c5c0cc62 100644 --- a/test/Renci.SshNet.Tests/Classes/ForwardedPortRemoteTest_Start_PortStarted.cs +++ b/test/Renci.SshNet.Tests/Classes/ForwardedPortRemoteTest_Start_PortStarted.cs @@ -103,7 +103,7 @@ protected void Act() } [TestMethod] - public void StartShouldThrowInvalidOperatationException() + public void StartShouldThrowInvalidOperationException() { Assert.IsNotNull(_actualException); Assert.AreEqual("Forwarded port is already started.", _actualException.Message); diff --git a/test/Renci.SshNet.Tests/Classes/ForwardedPortStatusTest_Stopped.cs b/test/Renci.SshNet.Tests/Classes/ForwardedPortStatusTest_Stopped.cs index a3836aa03..aae846b6e 100644 --- a/test/Renci.SshNet.Tests/Classes/ForwardedPortStatusTest_Stopped.cs +++ b/test/Renci.SshNet.Tests/Classes/ForwardedPortStatusTest_Stopped.cs @@ -49,7 +49,7 @@ public void Equals_ShouldReturnFalseWhenOtherIsNotInstanceOfForwardedPortStatus( } [TestMethod] - public void Equals_ShouldReturTrueWhenOtherIsStopped() + public void Equals_ShouldReturnTrueWhenOtherIsStopped() { var other = ForwardedPortStatus.Stopped; diff --git a/test/Renci.SshNet.Tests/Classes/NetConfClientTest_Connect_NetConfSessionConnectFailure.cs b/test/Renci.SshNet.Tests/Classes/NetConfClientTest_Connect_NetConfSessionConnectFailure.cs index 1585d8734..a5b7e03ad 100644 --- a/test/Renci.SshNet.Tests/Classes/NetConfClientTest_Connect_NetConfSessionConnectFailure.cs +++ b/test/Renci.SshNet.Tests/Classes/NetConfClientTest_Connect_NetConfSessionConnectFailure.cs @@ -84,7 +84,7 @@ public void NetConfSessionShouldBeNull() } [TestMethod] - public void ErrorOccuredOnSessionShouldNoLongerBeSignaledViaErrorOccurredOnNetConfClient() + public void ErrorOccurredOnSessionShouldNoLongerBeSignaledViaErrorOccurredOnNetConfClient() { var errorOccurredSignalCount = 0; diff --git a/test/Renci.SshNet.Tests/Classes/OrderedDictionaryTest.cs b/test/Renci.SshNet.Tests/Classes/OrderedDictionaryTest.cs index d5c55a081..3f3ef5712 100644 --- a/test/Renci.SshNet.Tests/Classes/OrderedDictionaryTest.cs +++ b/test/Renci.SshNet.Tests/Classes/OrderedDictionaryTest.cs @@ -69,7 +69,7 @@ private static void AssertEqual(List> e valuesArray); // Creates a List via enumeration, avoiding the ICollection.CopyTo - // optimisation in the List constructor. + // optimization in the List constructor. static List ToList(IEnumerable values) { List list = new(); diff --git a/test/Renci.SshNet.Tests/Classes/SftpClientTest.UploadFile.cs b/test/Renci.SshNet.Tests/Classes/SftpClientTest.UploadFile.cs index 5bb4c916e..72e8995af 100644 --- a/test/Renci.SshNet.Tests/Classes/SftpClientTest.UploadFile.cs +++ b/test/Renci.SshNet.Tests/Classes/SftpClientTest.UploadFile.cs @@ -89,7 +89,7 @@ private class MySession(ConnectionInfo connectionInfo) : ISession public void SendMessage(Message message) { - // Initialisation sequence for SFTP session + // Initialization sequence for SFTP session if (message is ChannelOpenMessage) { diff --git a/test/Renci.SshNet.Tests/Classes/SftpClientTest_Connect_SftpSessionConnectFailure.cs b/test/Renci.SshNet.Tests/Classes/SftpClientTest_Connect_SftpSessionConnectFailure.cs index 1b2a068c1..2f52a51c1 100644 --- a/test/Renci.SshNet.Tests/Classes/SftpClientTest_Connect_SftpSessionConnectFailure.cs +++ b/test/Renci.SshNet.Tests/Classes/SftpClientTest_Connect_SftpSessionConnectFailure.cs @@ -93,7 +93,7 @@ public void SftpSessionShouldBeNull() } [TestMethod] - public void ErrorOccuredOnSessionShouldNoLongerBeSignaledViaErrorOccurredOnSftpClient() + public void ErrorOccurredOnSessionShouldNoLongerBeSignaledViaErrorOccurredOnSftpClient() { var errorOccurredSignalCount = 0; diff --git a/test/Renci.SshNet.Tests/Classes/ShellStreamTest_Write_WriteBufferEmptyAndWriteMoreBytesThanBufferSize.cs b/test/Renci.SshNet.Tests/Classes/ShellStreamTest_Write_WriteBufferEmptyAndWriteMoreBytesThanBufferSize.cs index d52e55c00..997863cf4 100644 --- a/test/Renci.SshNet.Tests/Classes/ShellStreamTest_Write_WriteBufferEmptyAndWriteMoreBytesThanBufferSize.cs +++ b/test/Renci.SshNet.Tests/Classes/ShellStreamTest_Write_WriteBufferEmptyAndWriteMoreBytesThanBufferSize.cs @@ -129,7 +129,7 @@ public void BufferShouldHaveBeenFlushedTwice() } [TestMethod] - public void FlushShouldSendRemaningBytesToServer() + public void FlushShouldSendRemainingBytesToServer() { var expectedBytesSent = _data.Take(_bufferSize * 2, _data.Length - (_bufferSize * 2)); diff --git a/test/Renci.SshNet.Tests/Classes/SshCommandTest_Dispose.cs b/test/Renci.SshNet.Tests/Classes/SshCommandTest_Dispose.cs index a3d11f231..217ab84e7 100644 --- a/test/Renci.SshNet.Tests/Classes/SshCommandTest_Dispose.cs +++ b/test/Renci.SshNet.Tests/Classes/SshCommandTest_Dispose.cs @@ -83,7 +83,7 @@ public void RaisingDisconnectedOnSessionShouldDoNothing() } [TestMethod] - public void RaisingErrorOccuredOnSessionShouldDoNothing() + public void RaisingErrorOccurredOnSessionShouldDoNothing() { _sessionMock.Raise(s => s.ErrorOccured += null, new ExceptionEventArgs(new Exception())); } diff --git a/test/Renci.SshNet.Tests/Classes/SubsystemSession_Connect_SendSubsystemRequestFails.cs b/test/Renci.SshNet.Tests/Classes/SubsystemSession_Connect_SendSubsystemRequestFails.cs index 3df4c98ce..8e5a7b5fd 100644 --- a/test/Renci.SshNet.Tests/Classes/SubsystemSession_Connect_SendSubsystemRequestFails.cs +++ b/test/Renci.SshNet.Tests/Classes/SubsystemSession_Connect_SendSubsystemRequestFails.cs @@ -107,7 +107,7 @@ public void DisposeOnChannelShouldBeInvokedOnce() } [TestMethod] - public void ErrorOccuredOnSessionShouldNoLongerBeSignaledViaErrorOccurredOnSubsystemSession() + public void ErrorOccurredOnSessionShouldNoLongerBeSignaledViaErrorOccurredOnSubsystemSession() { _sessionMock.Raise(p => p.ErrorOccured += null, new ExceptionEventArgs(new Exception())); From 024a02355f691112baba0b470beb61b27b1e3ad0 Mon Sep 17 00:00:00 2001 From: Jacob Slusser Date: Fri, 11 Jul 2025 11:08:16 -0700 Subject: [PATCH 2/3] Adds en-GB as spell checker option; reverts notable cases of American English --- .editorconfig | 1 + CONTRIBUTING.md | 2 +- exclusion.dic | Bin 365 -> 838 bytes src/Renci.SshNet/.editorconfig | 1 + .../Messages/Transport/IgnoreMessage.cs | 2 +- src/Renci.SshNet/PrivateKeyFile.cs | 2 +- src/Renci.SshNet/Security/Certificate.cs | 4 ++-- src/Renci.SshNet/SshCommand.cs | 4 ++-- src/exclusion.dic | 2 ++ test/.editorconfig | 1 + test/Renci.SshNet.Benchmarks/.editorconfig | 1 + .../.editorconfig | 1 + .../Renci.SshNet.IntegrationTests/.editorconfig | 1 + test/Renci.SshNet.Tests/.editorconfig | 1 + .../Classes/OrderedDictionaryTest.cs | 2 +- .../Classes/SftpClientTest.UploadFile.cs | 2 +- 16 files changed, 18 insertions(+), 9 deletions(-) create mode 100644 src/exclusion.dic diff --git a/.editorconfig b/.editorconfig index ef949a28b..8bbdc9ca2 100644 --- a/.editorconfig +++ b/.editorconfig @@ -7,6 +7,7 @@ insert_final_newline = true indent_style = space indent_size = 4 tab_width = 4 +spelling_languages = en-us,en-gb spelling_exclusion_path = exclusion.dic spelling_checkable_types = all diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e3bf18671..af7ba3c94 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -18,7 +18,7 @@ The library has a test project for unit tests and a test project for integration Code coverage information can be generated for all test projects at once or for individual test projects. From the root of the repository or from the individual test project directory, run `dotnet test --collect:"XPlat Code Coverage"`. -The coverage information can be visualized using e.g. [ReportGenerator](https://reportgenerator.io/). Install the ReportGenerator dotnet tool with `dotnet tool update -g dotnet-reportgenerator-globaltool` and then run +The coverage information can be visualised using e.g. [ReportGenerator](https://reportgenerator.io/). Install the ReportGenerator dotnet tool with `dotnet tool update -g dotnet-reportgenerator-globaltool` and then run ``` reportgenerator -reports:**/coverage.cobertura.xml -targetdir:TestResults/CoverageReport -assemblyfilters:+Renci.SshNet diff --git a/exclusion.dic b/exclusion.dic index 95df49b0c4616d7d3793411e057217cd46a553ec..a19091c6b3ba43b8b6d7e2eb8a1af1a063af6570 100644 GIT binary patch literal 838 zcmZXSZEu4x421o8(tacj(6RwR1p2ZczwJ3Ytd%B28{6kQ`@+w6W2>F5*t@-1W19^& zS?AHo619gdWK}&;JM+$eakd@AT=5A+a%8d#T=A>U1pfju+lSX%I-cB_icrdy%H5*V z^9+@{r8g1Z9jWdX4Ryu2pcj#*Uu~>?9UZYv4`Spw`DCAt);1eFJ6UyK*j;nSIr}ui z7dTqa4nCzEIO2|TUuzRvj`ci~)y&F??-Pz&t?C?`Ozvmv-h|5&e9t?Ow;L=OmqTTy zdbo6)Lm{Kofh#=W&4Q}Dm;M4rp*M7O8-rchZKFr?JSs}JwDDfat==K+V31F*Sj8he z=_R}R42i6Iq@t;&>Q@1;8C5I%Zy@&SP(igPb7Ly8{GT8;3+Ls^;_TwmEvlzMN1NvA r^!{?AJ9>*F)S>8bLyGYwG-O+!QJA|=6u#eK8mZ|{Rr?|u>UZ-C$Rvs5 literal 365 zcmXv~(T)Tm2z&2eD&okE0#Rmn_P+j{O)epALm;K3c`T%m!N@c}9>{WtZnA4CgEE0y z+67uZ?FWUwb2hhHfg-gEqZrj2Or<@r5_s_J489pP^_~-*I3(JY(MBRPTanY^0x7Jq ziK9Y>cZgP_;W+u-H{2MaWm;f-?^F<x(za4>-(O*J|*S7TlKH@F}kpeDY^Y3w!Zg zVhX?Vw|C_(^r*>7f+^0UV0Bh3jd?ki)p)1L|C`&OAjriLZE`AZ)^R;yF7;G4Zr^v> TA(NJ!{kB?hkG_9{-!2({bfASb diff --git a/src/Renci.SshNet/.editorconfig b/src/Renci.SshNet/.editorconfig index 618abc4d6..59be614a0 100644 --- a/src/Renci.SshNet/.editorconfig +++ b/src/Renci.SshNet/.editorconfig @@ -1,4 +1,5 @@ [*.cs] +spelling_languages = en-us,en-gb spelling_exclusion_path = ../exclusion.dic spelling_checkable_types = all diff --git a/src/Renci.SshNet/Messages/Transport/IgnoreMessage.cs b/src/Renci.SshNet/Messages/Transport/IgnoreMessage.cs index bce81bcf6..25ebd43b2 100644 --- a/src/Renci.SshNet/Messages/Transport/IgnoreMessage.cs +++ b/src/Renci.SshNet/Messages/Transport/IgnoreMessage.cs @@ -28,7 +28,7 @@ public override byte MessageNumber } /// - /// Gets ignore message data if this message has been initialized + /// Gets ignore message data if this message has been initialised /// with data to be sent. Otherwise, returns an empty array. /// public byte[] Data { get; private set; } diff --git a/src/Renci.SshNet/PrivateKeyFile.cs b/src/Renci.SshNet/PrivateKeyFile.cs index 606c9702d..a7339a913 100644 --- a/src/Renci.SshNet/PrivateKeyFile.cs +++ b/src/Renci.SshNet/PrivateKeyFile.cs @@ -406,7 +406,7 @@ private void OpenCertificate(Stream certificate) Certificate = new Certificate(Convert.FromBase64String(data)); - Debug.Assert(Key is not null, $"{nameof(Key)} should have been initialized already."); + Debug.Assert(Key is not null, $"{nameof(Key)} should have been initialised already."); if (!Certificate.Key.Public.SequenceEqual(Key.Public)) { diff --git a/src/Renci.SshNet/Security/Certificate.cs b/src/Renci.SshNet/Security/Certificate.cs index 88e386ca4..ccc358fc6 100644 --- a/src/Renci.SshNet/Security/Certificate.cs +++ b/src/Renci.SshNet/Security/Certificate.cs @@ -176,7 +176,7 @@ public DateTimeOffset ValidBefore /// The key identifies the option and the value encodes /// option-specific information. /// All such options are "critical" in the sense that an implementation - /// must refuse to authorize a key that has an unrecognized option. + /// must refuse to authorize a key that has an unrecognised option. /// public IDictionary CriticalOptions { @@ -189,7 +189,7 @@ public IDictionary CriticalOptions /// /// A set of zero or more optional extensions. These extensions /// are not critical, and an implementation that encounters one that it does - /// not recognize may safely ignore it. + /// not recognise may safely ignore it. /// public IDictionary Extensions { diff --git a/src/Renci.SshNet/SshCommand.cs b/src/Renci.SshNet/SshCommand.cs index 6c8f0e09a..d329ba4de 100644 --- a/src/Renci.SshNet/SshCommand.cs +++ b/src/Renci.SshNet/SshCommand.cs @@ -263,9 +263,9 @@ public Task ExecuteAsync(CancellationToken cancellationToken = default) OutputStream.Dispose(); ExtendedOutputStream.Dispose(); - // Initialize output streams. We already initialized them for the first + // Initialise output streams. We already initialised them for the first // execution in the constructor (to allow passing them around before execution) - // so we just need to reinitialize them for subsequent executions. + // so we just need to reinitialise them for subsequent executions. OutputStream = new PipeStream(); ExtendedOutputStream = new PipeStream(); _channel = _session.CreateChannelSession(); diff --git a/src/exclusion.dic b/src/exclusion.dic new file mode 100644 index 000000000..186ea9d5c --- /dev/null +++ b/src/exclusion.dic @@ -0,0 +1,2 @@ +renci +openssh diff --git a/test/.editorconfig b/test/.editorconfig index 6b6fc8570..5cc9439fe 100644 --- a/test/.editorconfig +++ b/test/.editorconfig @@ -1,4 +1,5 @@ [*.cs] +spelling_languages = en-us,en-gb spelling_exclusion_path = ../exclusion.dic spelling_checkable_types = identifiers,comments diff --git a/test/Renci.SshNet.Benchmarks/.editorconfig b/test/Renci.SshNet.Benchmarks/.editorconfig index 9cd7bec66..d11bbc544 100644 --- a/test/Renci.SshNet.Benchmarks/.editorconfig +++ b/test/Renci.SshNet.Benchmarks/.editorconfig @@ -1,4 +1,5 @@ [*.cs] +spelling_languages = en-us,en-gb spelling_exclusion_path = ../../exclusion.dic spelling_checkable_types = identifiers,comments diff --git a/test/Renci.SshNet.IntegrationBenchmarks/.editorconfig b/test/Renci.SshNet.IntegrationBenchmarks/.editorconfig index c39439e41..2b1969299 100644 --- a/test/Renci.SshNet.IntegrationBenchmarks/.editorconfig +++ b/test/Renci.SshNet.IntegrationBenchmarks/.editorconfig @@ -1,4 +1,5 @@ [*.cs] +spelling_languages = en-us,en-gb spelling_exclusion_path = ../../exclusion.dic spelling_checkable_types = identifiers,comments diff --git a/test/Renci.SshNet.IntegrationTests/.editorconfig b/test/Renci.SshNet.IntegrationTests/.editorconfig index 269754ae8..6168c7bb3 100644 --- a/test/Renci.SshNet.IntegrationTests/.editorconfig +++ b/test/Renci.SshNet.IntegrationTests/.editorconfig @@ -1,4 +1,5 @@ [*.cs] +spelling_languages = en-us,en-gb spelling_exclusion_path = ../../exclusion.dic spelling_checkable_types = identifiers,comments diff --git a/test/Renci.SshNet.Tests/.editorconfig b/test/Renci.SshNet.Tests/.editorconfig index 4ffebcf26..e8401b72c 100644 --- a/test/Renci.SshNet.Tests/.editorconfig +++ b/test/Renci.SshNet.Tests/.editorconfig @@ -1,4 +1,5 @@ [*.cs] +spelling_languages = en-us,en-gb spelling_exclusion_path = ../../exclusion.dic spelling_checkable_types = identifiers,comments diff --git a/test/Renci.SshNet.Tests/Classes/OrderedDictionaryTest.cs b/test/Renci.SshNet.Tests/Classes/OrderedDictionaryTest.cs index 3f3ef5712..d5c55a081 100644 --- a/test/Renci.SshNet.Tests/Classes/OrderedDictionaryTest.cs +++ b/test/Renci.SshNet.Tests/Classes/OrderedDictionaryTest.cs @@ -69,7 +69,7 @@ private static void AssertEqual(List> e valuesArray); // Creates a List via enumeration, avoiding the ICollection.CopyTo - // optimization in the List constructor. + // optimisation in the List constructor. static List ToList(IEnumerable values) { List list = new(); diff --git a/test/Renci.SshNet.Tests/Classes/SftpClientTest.UploadFile.cs b/test/Renci.SshNet.Tests/Classes/SftpClientTest.UploadFile.cs index 72e8995af..5bb4c916e 100644 --- a/test/Renci.SshNet.Tests/Classes/SftpClientTest.UploadFile.cs +++ b/test/Renci.SshNet.Tests/Classes/SftpClientTest.UploadFile.cs @@ -89,7 +89,7 @@ private class MySession(ConnectionInfo connectionInfo) : ISession public void SendMessage(Message message) { - // Initialization sequence for SFTP session + // Initialisation sequence for SFTP session if (message is ChannelOpenMessage) { From c3cfaf2fab4486c66490c15d2a640e2d7c888b9c Mon Sep 17 00:00:00 2001 From: Rob Hague Date: Sat, 12 Jul 2025 13:59:04 +0200 Subject: [PATCH 3/3] convert file UTF-16 LE BOM -> UTF-8 --- exclusion.dic | Bin 838 -> 365 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/exclusion.dic b/exclusion.dic index a19091c6b3ba43b8b6d7e2eb8a1af1a063af6570..95df49b0c4616d7d3793411e057217cd46a553ec 100644 GIT binary patch literal 365 zcmXv~(T)Tm2z&2eD&okE0#Rmn_P+j{O)epALm;K3c`T%m!N@c}9>{WtZnA4CgEE0y z+67uZ?FWUwb2hhHfg-gEqZrj2Or<@r5_s_J489pP^_~-*I3(JY(MBRPTanY^0x7Jq ziK9Y>cZgP_;W+u-H{2MaWm;f-?^F<x(za4>-(O*J|*S7TlKH@F}kpeDY^Y3w!Zg zVhX?Vw|C_(^r*>7f+^0UV0Bh3jd?ki)p)1L|C`&OAjriLZE`AZ)^R;yF7;G4Zr^v> TA(NJ!{kB?hkG_9{-!2({bfASb literal 838 zcmZXSZEu4x421o8(tacj(6RwR1p2ZczwJ3Ytd%B28{6kQ`@+w6W2>F5*t@-1W19^& zS?AHo619gdWK}&;JM+$eakd@AT=5A+a%8d#T=A>U1pfju+lSX%I-cB_icrdy%H5*V z^9+@{r8g1Z9jWdX4Ryu2pcj#*Uu~>?9UZYv4`Spw`DCAt);1eFJ6UyK*j;nSIr}ui z7dTqa4nCzEIO2|TUuzRvj`ci~)y&F??-Pz&t?C?`Ozvmv-h|5&e9t?Ow;L=OmqTTy zdbo6)Lm{Kofh#=W&4Q}Dm;M4rp*M7O8-rchZKFr?JSs}JwDDfat==K+V31F*Sj8he z=_R}R42i6Iq@t;&>Q@1;8C5I%Zy@&SP(igPb7Ly8{GT8;3+Ls^;_TwmEvlzMN1NvA r^!{?AJ9>*F)S>8bLyGYwG-O+!QJA|=6u#eK8mZ|{Rr?|u>UZ-C$Rvs5