Skip to content

Commit 4886529

Browse files
Fixes spelling errors (#1668)
* Fixes spelling errors in comments, private members, and public members in test projects * Adds en-GB as spell checker option; reverts notable cases of American English * convert file UTF-16 LE BOM -> UTF-8 --------- Co-authored-by: Rob Hague <[email protected]>
1 parent 6bb3978 commit 4886529

File tree

72 files changed

+238
-158
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+238
-158
lines changed

.editorconfig

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Avoid looking for .editorconfig files in parent directories
1+
# Avoid looking for .editorconfig files in parent directories
22
root=true
33

44
[*]
@@ -7,6 +7,9 @@ insert_final_newline = true
77
indent_style = space
88
indent_size = 4
99
tab_width = 4
10+
spelling_languages = en-us,en-gb
11+
spelling_exclusion_path = exclusion.dic
12+
spelling_checkable_types = all
1013

1114
[*.{xml,csproj,props}]
1215

@@ -776,14 +779,14 @@ dotnet_diagnostic.IDE0032.severity = suggestion
776779
dotnet_diagnostic.IDE0045.severity = none
777780

778781
# IDE0046: Use conditional expression for return
779-
#
782+
#
780783
# Using a conditional expression is not always a clear win for readability.
781784
#
782785
# Configured using 'dotnet_style_prefer_conditional_expression_over_return'
783786
dotnet_diagnostic.IDE0046.severity = suggestion
784787

785788
# IDE0047: Remove unnecessary parentheses
786-
#
789+
#
787790
# Removing "unnecessary" parentheses is not always a clear win for readability.
788791
dotnet_diagnostic.IDE0047.severity = suggestion
789792

@@ -794,7 +797,7 @@ dotnet_diagnostic.IDE0047.severity = suggestion
794797
dotnet_diagnostic.IDE0130.severity = none
795798

796799
# IDE0270: Null check can be simplified
797-
#
800+
#
798801
# var inputPath = originalDossierPathList.Find(x => x.id == updatedPath.id);
799802
# if (inputPath is null)
800803
# {
@@ -938,7 +941,7 @@ csharp_new_line_before_catch = true
938941
csharp_new_line_before_finally = true
939942
# Enabling this setting breaks Resharper formatting for an enum field reference that is
940943
# deeply nested in an object initializer.
941-
#
944+
#
942945
# For an example, see TDataExchangeGeneralEnricher_CernInfrastructureObstruction.
943946
#csharp_new_line_before_members_in_object_initializers = true
944947
csharp_new_line_before_members_in_anonymous_types = true
@@ -1021,19 +1024,19 @@ dotnet_naming_rule.private_const_fields_pascal_case.severity = warning
10211024

10221025
dotnet_naming_symbols.interface.applicable_kinds = interface
10231026
dotnet_naming_symbols.interface.applicable_accessibilities = *
1024-
dotnet_naming_symbols.interface.required_modifiers =
1027+
dotnet_naming_symbols.interface.required_modifiers =
10251028

10261029
dotnet_naming_symbols.types.applicable_kinds = class, struct, interface, enum
10271030
dotnet_naming_symbols.types.applicable_accessibilities = *
1028-
dotnet_naming_symbols.types.required_modifiers =
1031+
dotnet_naming_symbols.types.required_modifiers =
10291032

10301033
dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method
10311034
dotnet_naming_symbols.non_field_members.applicable_accessibilities = *
1032-
dotnet_naming_symbols.non_field_members.required_modifiers =
1035+
dotnet_naming_symbols.non_field_members.required_modifiers =
10331036

10341037
dotnet_naming_symbols.private_fields.applicable_kinds = field
10351038
dotnet_naming_symbols.private_fields.applicable_accessibilities = private
1036-
dotnet_naming_symbols.private_fields.required_modifiers =
1039+
dotnet_naming_symbols.private_fields.required_modifiers =
10371040

10381041
dotnet_naming_symbols.private_static_fields.applicable_kinds = field
10391042
dotnet_naming_symbols.private_static_fields.applicable_accessibilities = private
@@ -1050,18 +1053,18 @@ dotnet_naming_symbols.private_const_fields.required_modifiers = const
10501053
# Naming styles
10511054

10521055
dotnet_naming_style.begins_with_i.required_prefix = I
1053-
dotnet_naming_style.begins_with_i.required_suffix =
1054-
dotnet_naming_style.begins_with_i.word_separator =
1056+
dotnet_naming_style.begins_with_i.required_suffix =
1057+
dotnet_naming_style.begins_with_i.word_separator =
10551058
dotnet_naming_style.begins_with_i.capitalization = pascal_case
10561059

1057-
dotnet_naming_style.pascal_case.required_prefix =
1058-
dotnet_naming_style.pascal_case.required_suffix =
1059-
dotnet_naming_style.pascal_case.word_separator =
1060+
dotnet_naming_style.pascal_case.required_prefix =
1061+
dotnet_naming_style.pascal_case.required_suffix =
1062+
dotnet_naming_style.pascal_case.word_separator =
10601063
dotnet_naming_style.pascal_case.capitalization = pascal_case
10611064

10621065
dotnet_naming_style.camel_case_begins_with_underscore.required_prefix = _
1063-
dotnet_naming_style.camel_case_begins_with_underscore.required_suffix =
1064-
dotnet_naming_style.camel_case_begins_with_underscore.word_separator =
1066+
dotnet_naming_style.camel_case_begins_with_underscore.required_suffix =
1067+
dotnet_naming_style.camel_case_begins_with_underscore.word_separator =
10651068
dotnet_naming_style.camel_case_begins_with_underscore.capitalization = camel_case
10661069

10671070
#### .NET Compiler Platform general options ####

Renci.SshNet.sln

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
1414
CONTRIBUTING.md = CONTRIBUTING.md
1515
Directory.Build.props = Directory.Build.props
1616
Directory.Packages.props = Directory.Packages.props
17+
exclusion.dic = exclusion.dic
1718
global.json = global.json
1819
LICENSE = LICENSE
1920
nuget.config = nuget.config

exclusion.dic

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
args
2+
atime
3+
bcrypt
4+
bigint
5+
bourne
6+
cbc
7+
chacha
8+
csproj
9+
decryptor
10+
dest
11+
diffie
12+
docfx
13+
ecdh
14+
ecdsa
15+
emerle
16+
exe
17+
fallback
18+
github
19+
hmac
20+
hostbased
21+
identd
22+
ietf
23+
impl
24+
infocmp
25+
kewl
26+
kex
27+
mindrot
28+
mtime
29+
netconf
30+
nist
31+
nistp
32+
openssh
33+
pkcs
34+
posix
35+
privatekey
36+
protoversion
37+
pubkey
38+
publickey
39+
renci
40+
ripemd
41+
slen
42+
sntrup
43+
softwareversion
44+
sshd
45+
tcpip
46+
threadpool
47+
umac
48+
unpad
49+
unix
50+
waithandle
51+
xoff
52+
xmldoc
53+
zlib

src/Renci.SshNet/.editorconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
[*.cs]
2+
spelling_languages = en-us,en-gb
3+
spelling_exclusion_path = ../exclusion.dic
4+
spelling_checkable_types = all
25

36
#### Sonar rules ####
47

src/Renci.SshNet/Abstractions/SocketAbstraction.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ public static void Send(Socket socket, byte[] data, int offset, int size)
350350
}
351351
else
352352
{
353-
throw; // any serious error occurr
353+
throw; // any serious error occur
354354
}
355355
}
356356
}

src/Renci.SshNet/BaseClient.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ protected virtual void OnDisconnected()
408408
{
409409
}
410410

411-
private void Session_ErrorOccured(object? sender, ExceptionEventArgs e)
411+
private void Session_ErrorOccurred(object? sender, ExceptionEventArgs e)
412412
{
413413
ErrorOccurred?.Invoke(this, e);
414414
}
@@ -558,7 +558,7 @@ private ISession CreateAndConnectSession()
558558
var session = _serviceFactory.CreateSession(ConnectionInfo, _serviceFactory.CreateSocketFactory());
559559
session.ServerIdentificationReceived += Session_ServerIdentificationReceived;
560560
session.HostKeyReceived += Session_HostKeyReceived;
561-
session.ErrorOccured += Session_ErrorOccured;
561+
session.ErrorOccured += Session_ErrorOccurred;
562562

563563
try
564564
{
@@ -577,7 +577,7 @@ private async Task<ISession> CreateAndConnectSessionAsync(CancellationToken canc
577577
var session = _serviceFactory.CreateSession(ConnectionInfo, _serviceFactory.CreateSocketFactory());
578578
session.ServerIdentificationReceived += Session_ServerIdentificationReceived;
579579
session.HostKeyReceived += Session_HostKeyReceived;
580-
session.ErrorOccured += Session_ErrorOccured;
580+
session.ErrorOccured += Session_ErrorOccurred;
581581

582582
try
583583
{
@@ -593,7 +593,7 @@ private async Task<ISession> CreateAndConnectSessionAsync(CancellationToken canc
593593

594594
private void DisposeSession(ISession session)
595595
{
596-
session.ErrorOccured -= Session_ErrorOccured;
596+
session.ErrorOccured -= Session_ErrorOccurred;
597597
session.HostKeyReceived -= Session_HostKeyReceived;
598598
session.ServerIdentificationReceived -= Session_ServerIdentificationReceived;
599599
session.Dispose();

src/Renci.SshNet/Channels/Channel.cs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -94,15 +94,15 @@ protected Channel(ISession session, uint localChannelNumber, uint localWindowSiz
9494
session.ChannelRequestReceived += OnChannelRequest;
9595
session.ChannelSuccessReceived += OnChannelSuccess;
9696
session.ChannelFailureReceived += OnChannelFailure;
97-
session.ErrorOccured += Session_ErrorOccured;
97+
session.ErrorOccured += Session_ErrorOccurred;
9898
session.Disconnected += Session_Disconnected;
9999
}
100100

101101
/// <summary>
102102
/// Gets the session.
103103
/// </summary>
104104
/// <value>
105-
/// Thhe session.
105+
/// The session.
106106
/// </value>
107107
protected ISession Session
108108
{
@@ -328,7 +328,7 @@ public void SendData(byte[] data)
328328
/// multiple chunks and will wait for the remote window size to be adjusted when it's zero.
329329
/// </para>
330330
/// <para>
331-
/// This is done to support SSH servers will a small window size that do not agressively
331+
/// This is done to support SSH servers will a small window size that do not aggressively
332332
/// increase their window size. We need to take into account that there may be SSH servers
333333
/// that only increase their window size when it has reached zero.
334334
/// </para>
@@ -586,7 +586,7 @@ protected virtual void OnDisconnected()
586586
{
587587
}
588588

589-
protected virtual void OnErrorOccured(Exception exp)
589+
protected virtual void OnErrorOccurred(Exception exp)
590590
{
591591
}
592592

@@ -609,20 +609,20 @@ private void Session_Disconnected(object sender, EventArgs e)
609609
/// </summary>
610610
/// <param name="ex">The <see cref="Exception"/>.</param>
611611
/// <remarks>
612-
/// This method will in turn invoke <see cref="OnErrorOccured(System.Exception)"/>, and
612+
/// This method will in turn invoke <see cref="OnErrorOccurred(System.Exception)"/>, and
613613
/// raise the <see cref="Exception"/> event.
614614
/// </remarks>
615615
protected void OnChannelException(Exception ex)
616616
{
617-
OnErrorOccured(ex);
617+
OnErrorOccurred(ex);
618618
RaiseExceptionEvent(ex);
619619
}
620620

621-
private void Session_ErrorOccured(object sender, ExceptionEventArgs e)
621+
private void Session_ErrorOccurred(object sender, ExceptionEventArgs e)
622622
{
623623
try
624624
{
625-
OnErrorOccured(e.Exception);
625+
OnErrorOccurred(e.Exception);
626626
}
627627
catch (Exception ex)
628628
{
@@ -854,7 +854,7 @@ protected virtual void Dispose(bool disposing)
854854
session.ChannelRequestReceived -= OnChannelRequest;
855855
session.ChannelSuccessReceived -= OnChannelSuccess;
856856
session.ChannelFailureReceived -= OnChannelFailure;
857-
session.ErrorOccured -= Session_ErrorOccured;
857+
session.ErrorOccured -= Session_ErrorOccurred;
858858
session.Disconnected -= Session_Disconnected;
859859
}
860860

src/Renci.SshNet/Channels/ChannelDirectTcpip.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -249,9 +249,9 @@ protected override void OnEof()
249249
/// Called whenever an unhandled <see cref="Exception"/> occurs in <see cref="Session"/> causing
250250
/// the message loop to be interrupted, or when an exception occurred processing a channel message.
251251
/// </summary>
252-
protected override void OnErrorOccured(Exception exp)
252+
protected override void OnErrorOccurred(Exception exp)
253253
{
254-
base.OnErrorOccured(exp);
254+
base.OnErrorOccurred(exp);
255255

256256
// signal to the client that we will not send anything anymore; this will also interrupt the
257257
// blocking receive in Bind if the client sends FIN/ACK in time
@@ -261,7 +261,7 @@ protected override void OnErrorOccured(Exception exp)
261261
}
262262

263263
/// <summary>
264-
/// Called when the server wants to terminate the connection immmediately.
264+
/// Called when the server wants to terminate the connection immediately.
265265
/// </summary>
266266
/// <remarks>
267267
/// The sender MUST NOT send or receive any data after this message, and

src/Renci.SshNet/Channels/ChannelForwardedTcpip.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,9 @@ public void Bind(IPEndPoint remoteEndpoint, IForwardedPort forwardedPort)
9898
SocketAbstraction.ReadContinuous(_socket, buffer, 0, buffer.Length, SendData);
9999
}
100100

101-
protected override void OnErrorOccured(Exception exp)
101+
protected override void OnErrorOccurred(Exception exp)
102102
{
103-
base.OnErrorOccured(exp);
103+
base.OnErrorOccurred(exp);
104104

105105
// signal to the server that we will not send anything anymore; this will also interrupt the
106106
// blocking receive in Bind if the server sends FIN/ACK in time

0 commit comments

Comments
 (0)