File tree Expand file tree Collapse file tree
test/Renci.SshNet.Tests/Classes/Security Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -620,12 +620,21 @@ dotnet_diagnostic.MA0112.severity = warning
620620# MA0165: Make interpolated string
621621dotnet_diagnostic.MA0165.severity = none
622622
623+ # MA0173 - Use LazyInitializer.EnsureInitialize
624+ dotnet_diagnostic.MA0173.severity = none
625+
623626# MA0182: Avoid unused internal types
624627dotnet_diagnostic.MA0182.severity = none
625628
626629# MA0184: Do not use interpolated string without parameters
627630dotnet_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
Original file line number Diff line number Diff line change @@ -129,7 +129,7 @@ protected override void OnDataReceived(ArraySegment<byte> data)
129129 {
130130 _ = _data . Append ( chunk ) ;
131131
132- if ( ! chunk . Contains ( Prompt ) )
132+ if ( ! chunk . Contains ( Prompt , StringComparison . Ordinal ) )
133133 {
134134 return ;
135135 }
@@ -194,7 +194,7 @@ protected override void OnDataReceived(ArraySegment<byte> data)
194194 {
195195 _ = _data . Append ( chunk ) ;
196196
197- if ( ! chunk . Contains ( Prompt ) )
197+ if ( ! chunk . Contains ( Prompt , StringComparison . Ordinal ) )
198198 {
199199 return ;
200200 }
Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ public Key Parse()
7070 throw new SshException ( "Invalid passphrase." ) ;
7171 }
7272
73- if ( keyType . Contains ( "rsa" ) )
73+ if ( keyType . Contains ( "rsa" , StringComparison . Ordinal ) )
7474 {
7575 var exponent = ReadBigIntWithBits ( keyReader ) ;
7676 var d = ReadBigIntWithBits ( keyReader ) ;
Original file line number Diff line number Diff line change @@ -287,7 +287,7 @@ public void CertificateBadCASignature_VerifySignatureReturnsFalse()
287287 "PD7/nXcyxnY3zALlPQTxb19EVx5lz58BS96gg=" ;
288288
289289 char [ ] chars = goodCertString . ToCharArray ( ) ;
290- chars [ ^ 10 ] = 'a' ;
290+ chars [ chars . Length - 1 ] = 'a' ;
291291 string badCertString = new string ( chars ) ;
292292
293293 Assert . IsTrue ( VerifySignature ( goodCertString ) ) ;
You can’t perform that action at this time.
0 commit comments