Skip to content

Commit 47805ac

Browse files
authored
Merge branch 'develop' into sftpwriterequestbuffer
2 parents f0863c8 + 41053cb commit 47805ac

80 files changed

Lines changed: 155 additions & 191 deletions

File tree

Some content is hidden

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

.editorconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -620,12 +620,21 @@ dotnet_diagnostic.MA0112.severity = warning
620620
# MA0165: Make interpolated string
621621
dotnet_diagnostic.MA0165.severity = none
622622

623+
# MA0173 - Use LazyInitializer.EnsureInitialize
624+
dotnet_diagnostic.MA0173.severity = none
625+
623626
# MA0182: Avoid unused internal types
624627
dotnet_diagnostic.MA0182.severity = none
625628

626629
# MA0184: Do not use interpolated string without parameters
627630
dotnet_diagnostic.MA0184.severity = none
628631

632+
# MA0190 - Use partial property instead of partial method for GeneratedRegex
633+
dotnet_diagnostic.MA0190.severity = none
634+
635+
# MA0192 - Use HasFlag instead of bitwise checks
636+
dotnet_diagnostic.MA0192.severity = none
637+
629638
#### MSTest rules ####
630639

631640
# MSTEST0015: Test method should not be ignored

.github/workflows/build.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ jobs:
1818
runs-on: ubuntu-24.04
1919
steps:
2020
- name: Checkout
21-
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
21+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
2222
with:
2323
fetch-depth: 0 # needed for Nerdbank.GitVersioning
2424
persist-credentials: false
2525

2626
- name: Setup .NET
27-
uses: actions/setup-dotnet@c2fa09f4bde5ebb9d1777cf28262a3eb3db3ced7 # v5.2.0
27+
uses: actions/setup-dotnet@9a946fdbd5fb07b82b2f5a4466058b876ab72bb2 # v5.3.0
2828

2929
- name: Build Unit Tests .NET
3030
run: dotnet build -f net10.0 test/Renci.SshNet.Tests/
@@ -66,13 +66,13 @@ jobs:
6666
runs-on: windows-2025
6767
steps:
6868
- name: Checkout
69-
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
69+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
7070
with:
7171
fetch-depth: 0 # needed for Nerdbank.GitVersioning
7272
persist-credentials: false
7373

7474
- name: Setup .NET
75-
uses: actions/setup-dotnet@c2fa09f4bde5ebb9d1777cf28262a3eb3db3ced7 # v5.2.0
75+
uses: actions/setup-dotnet@9a946fdbd5fb07b82b2f5a4466058b876ab72bb2 # v5.3.0
7676

7777
- name: Build Solution
7878
run: dotnet build Renci.SshNet.slnx
@@ -118,13 +118,13 @@ jobs:
118118
runs-on: windows-2025
119119
steps:
120120
- name: Checkout
121-
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
121+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
122122
with:
123123
fetch-depth: 0 # needed for Nerdbank.GitVersioning
124124
persist-credentials: false
125125

126126
- name: Setup .NET
127-
uses: actions/setup-dotnet@c2fa09f4bde5ebb9d1777cf28262a3eb3db3ced7 # v5.2.0
127+
uses: actions/setup-dotnet@9a946fdbd5fb07b82b2f5a4466058b876ab72bb2 # v5.3.0
128128

129129
- name: Setup WSL2
130130
uses: Vampire/setup-wsl@d1da7f2c0322a5ee4f24975344f67fc0f5baf364 # v7.0.0
@@ -161,13 +161,13 @@ jobs:
161161
runs-on: windows-2025
162162
steps:
163163
- name: Checkout
164-
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
164+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
165165
with:
166166
fetch-depth: 0 # needed for Nerdbank.GitVersioning
167167
persist-credentials: false
168168

169169
- name: Setup .NET
170-
uses: actions/setup-dotnet@c2fa09f4bde5ebb9d1777cf28262a3eb3db3ced7 # v5.2.0
170+
uses: actions/setup-dotnet@9a946fdbd5fb07b82b2f5a4466058b876ab72bb2 # v5.3.0
171171

172172
- name: Setup WSL2
173173
uses: Vampire/setup-wsl@d1da7f2c0322a5ee4f24975344f67fc0f5baf364 # v7.0.0
@@ -247,7 +247,7 @@ jobs:
247247
name: NuGet Package
248248

249249
- name: NuGet login (OIDC → temp API key)
250-
uses: NuGet/login@d22cc5f58ff5b88bf9bd452535b4335137e24544 # v1.1.0
250+
uses: NuGet/login@8d196754b4036150537f80ac539e15c2f1028841 # v1.2.0
251251
id: login
252252
with:
253253
user: ${{ secrets.NUGET_USER }}

.github/workflows/docs.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@ jobs:
2222
runs-on: ubuntu-24.04
2323
steps:
2424
- name: Checkout repository
25-
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
25+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
2626
with:
2727
persist-credentials: false
2828

2929
- name: Setup Pages
3030
uses: actions/configure-pages@45bfe0192ca1faeb007ade9deae92b16b8254a0d # v6.0.0
3131

3232
- name: Setup .NET
33-
uses: actions/setup-dotnet@c2fa09f4bde5ebb9d1777cf28262a3eb3db3ced7 # v5.2.0
33+
uses: actions/setup-dotnet@9a946fdbd5fb07b82b2f5a4466058b876ab72bb2 # v5.3.0
3434

3535
- name: Setup docfx
3636
run: dotnet tool update -g docfx
@@ -39,7 +39,7 @@ jobs:
3939
run: docfx ./docfx/docfx.json
4040

4141
- name: Upload documentation
42-
uses: actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b # v4.0.0
42+
uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0
4343
with:
4444
path: './docfx/_site'
4545

Directory.Packages.props

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,22 @@
66
<ItemGroup>
77
<PackageVersion Include="BenchmarkDotNet" Version="0.15.8" />
88
<PackageVersion Include="BouncyCastle.Cryptography" Version="2.6.2" />
9-
<PackageVersion Include="coverlet.collector" Version="6.0.4" />
10-
<PackageVersion Include="coverlet.msbuild" Version="6.0.4" />
11-
<PackageVersion Include="GitHubActionsTestLogger" Version="3.0.1" />
12-
<PackageVersion Include="Meziantou.Analyzer" Version="3.0.18" />
9+
<PackageVersion Include="coverlet.collector" Version="10.0.1" />
10+
<PackageVersion Include="coverlet.msbuild" Version="10.0.1" />
11+
<PackageVersion Include="GitHubActionsTestLogger" Version="3.0.4" />
12+
<PackageVersion Include="Meziantou.Analyzer" Version="3.0.114" />
1313
<!-- Should stay on LTS .NET releases. -->
14-
<PackageVersion Include="Microsoft.Bcl.Cryptography" Version="10.0.3" />
14+
<PackageVersion Include="Microsoft.Bcl.Cryptography" Version="10.0.9" />
1515
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.3" />
16-
<PackageVersion Include="Microsoft.Extensions.Logging.Console" Version="10.0.3" />
17-
<PackageVersion Include="MSTest" Version="4.1.0" />
16+
<PackageVersion Include="Microsoft.Extensions.Logging.Console" Version="10.0.9" />
17+
<PackageVersion Include="MSTest" Version="4.2.3" />
1818
<PackageVersion Include="Moq" Version="4.20.72" />
19-
<PackageVersion Include="Nerdbank.GitVersioning" Version="3.9.50" />
20-
<PackageVersion Include="PolySharp" Version="1.15.0" />
21-
<PackageVersion Include="SonarAnalyzer.CSharp" Version="10.20.0.135146" />
19+
<PackageVersion Include="Nerdbank.GitVersioning" Version="3.10.85" />
20+
<PackageVersion Include="PolySharp" Version="1.16.0" />
21+
<PackageVersion Include="SonarAnalyzer.CSharp" Version="10.27.0.140913" />
2222
<PackageVersion Include="StyleCop.Analyzers" Version="1.2.0-beta.556" />
2323
<!-- Should stay on LTS .NET releases. -->
24-
<PackageVersion Include="System.Formats.Asn1" Version="10.0.3" />
25-
<PackageVersion Include="Testcontainers" Version="4.10.0" />
24+
<PackageVersion Include="System.Formats.Asn1" Version="10.0.9" />
25+
<PackageVersion Include="Testcontainers" Version="4.12.0" />
2626
</ItemGroup>
2727
</Project>

src/Renci.SshNet/Abstractions/SocketAbstraction.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
using Renci.SshNet.Common;
99
using Renci.SshNet.Messages.Transport;
1010

11+
#pragma warning disable MA0204 // Remove unnecessary partial modifier; not true for all targets
12+
1113
namespace Renci.SshNet.Abstractions
1214
{
1315
internal static partial class SocketAbstraction

src/Renci.SshNet/Connection/HttpConnector.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ namespace Renci.SshNet.Connection
3131
/// </item>
3232
/// </list>
3333
/// </remarks>
34+
#pragma warning disable MA0204 // Remove unnecessary partial modifier; not true for all targets
3435
internal sealed partial class HttpConnector : ProxyConnector
3536
{
3637
private const string HttpResponsePattern = @"HTTP/(?<version>\d[.]\d) (?<statusCode>\d{3}) (?<reasonPhrase>.+)$";

src/Renci.SshNet/Connection/ProtocolVersionExchange.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ namespace Renci.SshNet.Connection
1919
/// <remarks>
2020
/// https://tools.ietf.org/html/rfc4253#section-4.2.
2121
/// </remarks>
22+
#pragma warning disable MA0204 // Remove unnecessary partial modifier; not true for all targets
2223
internal sealed partial class ProtocolVersionExchange : IProtocolVersionExchange
2324
{
2425
private const byte Null = 0x00;

src/Renci.SshNet/ForwardedPortLocal.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ namespace Renci.SshNet
1212
/// <summary>
1313
/// Provides functionality for local port forwarding.
1414
/// </summary>
15-
public partial class ForwardedPortLocal : ForwardedPort
15+
public class ForwardedPortLocal : ForwardedPort
1616
{
1717
private ForwardedPortStatus _status;
1818
private bool _isDisposed;

src/Renci.SshNet/IServiceFactory.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ namespace Renci.SshNet
1414
/// <summary>
1515
/// Factory for creating new services.
1616
/// </summary>
17-
internal partial interface IServiceFactory
17+
internal interface IServiceFactory
1818
{
1919
/// <summary>
2020
/// Creates an <see cref="IClientAuthentication"/>.

src/Renci.SshNet/Netconf/NetConfSession.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77

88
using Renci.SshNet.Common;
99

10+
#pragma warning disable MA0204 // Remove unnecessary partial modifier; not true for all targets
11+
1012
namespace Renci.SshNet.NetConf
1113
{
1214
internal sealed partial class NetConfSession : SubsystemSession, INetConfSession
@@ -129,7 +131,7 @@ protected override void OnDataReceived(ArraySegment<byte> data)
129131
{
130132
_ = _data.Append(chunk);
131133

132-
if (!chunk.Contains(Prompt))
134+
if (!chunk.Contains(Prompt, StringComparison.Ordinal))
133135
{
134136
return;
135137
}
@@ -194,7 +196,7 @@ protected override void OnDataReceived(ArraySegment<byte> data)
194196
{
195197
_ = _data.Append(chunk);
196198

197-
if (!chunk.Contains(Prompt))
199+
if (!chunk.Contains(Prompt, StringComparison.Ordinal))
198200
{
199201
return;
200202
}

0 commit comments

Comments
 (0)