Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ dotnet_diagnostic.S101.severity = none
# This is a duplicate of CA2201 and MA0012.
dotnet_diagnostic.S112.severity = none

# S125: Remove this commented out code
dotnet_diagnostic.S125.severity = silent

# S127: "for" loop stop conditions should be invariant
# https://rules.sonarsource.com/csharp/RSPEC-127
#
Expand Down Expand Up @@ -324,6 +327,23 @@ dotnet_diagnostic.S4487.severity = none
# This is a partial duplicate of MA0067, and we do not want to report the use of 'default' for a Guid as error.
dotnet_diagnostic.S4581.severity = none

# S4790: Weak hashing algorithms should not be used
dotnet_diagnostic.S4790.severity = none

# S5766: Serializable objects should validate data during deserialization
dotnet_diagnostic.S5766.severity = none

# S6444: Pass a regex timeout
dotnet_diagnostic.S6444.severity = silent

# S8949: The overload accepting a 'CancellationToken' should be used
dotnet_diagnostic.S8949.severity = silent

# S8969: Remove unnecessary suppression
#
# Dupe of IDE0370
dotnet_diagnostic.S8969.severity = none

# S4830: Server certificates should be verified during SSL/TLS connections
# https://rules.sonarsource.com/csharp/RSPEC-4830/
dotnet_diagnostic.S4830.severity = none
Expand Down Expand Up @@ -612,6 +632,9 @@ MA0053.exceptions_should_be_sealed = true
# Also report diagnostic for types that define (new) virtual members.
MA0053.class_with_virtual_member_shoud_be_sealed = true

# MA0071: Avoid using redundant else
dotnet_diagnostic.MA0071.severity = silent

# MA0112: Use 'Count > 0' instead of 'Any()'
#
# This rule is disabled by default, hence we need to explicitly enable it.
Expand All @@ -635,6 +658,9 @@ dotnet_diagnostic.MA0190.severity = none
# MA0192 - Use HasFlag instead of bitwise checks
dotnet_diagnostic.MA0192.severity = none

# MA0219: Set the language attribute in XML comment
dotnet_diagnostic.MA0219.severity = none

#### MSTest rules ####

# MSTEST0015: Test method should not be ignored
Expand Down
24 changes: 12 additions & 12 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,22 @@
<ItemGroup>
<PackageVersion Include="BenchmarkDotNet" Version="0.15.8" />
<PackageVersion Include="BouncyCastle.Cryptography" Version="2.7.0" />
<PackageVersion Include="coverlet.collector" Version="10.0.1" />
<PackageVersion Include="coverlet.msbuild" Version="10.0.1" />
<PackageVersion Include="coverlet.collector" Version="10.1.0" />
<PackageVersion Include="coverlet.msbuild" Version="10.1.0" />
<PackageVersion Include="GitHubActionsTestLogger" Version="3.0.5" />
<PackageVersion Include="Meziantou.Analyzer" Version="3.0.125" />
<PackageVersion Include="Meziantou.Analyzer" Version="3.0.303" />
<!-- Should stay on LTS .NET releases. -->
<PackageVersion Include="Microsoft.Bcl.Cryptography" Version="10.0.10" />
<PackageVersion Include="Microsoft.Bcl.Cryptography" Version="10.0.13" />
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.3" />
<PackageVersion Include="Microsoft.Extensions.Logging.Console" Version="10.0.10" />
<PackageVersion Include="MSTest" Version="4.3.3" />
<PackageVersion Include="Moq" Version="4.20.72" />
<PackageVersion Include="Nerdbank.GitVersioning" Version="3.10.91" />
<PackageVersion Include="Microsoft.Extensions.Logging.Console" Version="10.0.13" />
<PackageVersion Include="MSTest" Version="4.5.1" />
<PackageVersion Include="Moq" Version="4.21.0" />
<PackageVersion Include="Nerdbank.GitVersioning" Version="3.10.94" />
<PackageVersion Include="PolySharp" Version="1.16.0" />
<PackageVersion Include="SonarAnalyzer.CSharp" Version="10.27.0.140913" />
<PackageVersion Include="SonarAnalyzer.CSharp" Version="10.35.0.4138" />
<PackageVersion Include="StyleCop.Analyzers" Version="1.2.0-beta.556" />
<!-- Should stay on LTS .NET releases. -->
<PackageVersion Include="System.Formats.Asn1" Version="10.0.10" />
<PackageVersion Include="Testcontainers" Version="4.13.0" />
<PackageVersion Include="System.Formats.Asn1" Version="10.0.13" />
<PackageVersion Include="Testcontainers" Version="4.16.0" />
</ItemGroup>
</Project>
</Project>
9 changes: 6 additions & 3 deletions src/Renci.SshNet/Abstractions/SocketAbstraction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -238,9 +238,12 @@ public static int Read(Socket socket, byte[] buffer, int offset, int size, TimeS

if (ex.SocketErrorCode == SocketError.TimedOut)
{
throw new SshOperationTimeoutException(string.Format(CultureInfo.InvariantCulture,
"Socket read operation has timed out after {0:F0} milliseconds.",
readTimeout.TotalMilliseconds));
throw new SshOperationTimeoutException(
string.Format(
CultureInfo.InvariantCulture,
"Socket read operation has timed out after {0:F0} milliseconds.",
readTimeout.TotalMilliseconds),
ex);
}

throw;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
/// Indicates that message that implement this interface is allowed during key exchange phase.
/// </summary>
#pragma warning disable CA1040 // Avoid empty interfaces
public interface IKeyExchangedAllowed
public interface IKeyExchangedAllowed;
#pragma warning restore CA1040 // Avoid empty interfaces
{
}
}
Loading