Skip to content

Commit

Permalink
SerialPortStream: Remove IDE0074 suppressions and update style
Browse files Browse the repository at this point in the history
Issue: DOTNET-1001
  • Loading branch information
jcurl committed Mar 3, 2024
1 parent 8712625 commit 1527cf8
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 9 deletions.
8 changes: 2 additions & 6 deletions test/Common/SerialConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,7 @@ public static string SourcePort
{
if (s_SourcePort is null) {
lock (m_SyncLock) {
if (s_SourcePort is null) {
s_SourcePort = AppSettings.Settings[OSPrefix + "SourcePort"].Value;
}
s_SourcePort ??= AppSettings.Settings[OSPrefix + "SourcePort"].Value;
}
}
return s_SourcePort;
Expand All @@ -51,9 +49,7 @@ public static string DestPort
{
if (s_DestPort is null) {
lock (m_SyncLock) {
if (s_DestPort is null) {
s_DestPort = AppSettings.Settings[OSPrefix + "DestPort"].Value;
}
s_DestPort ??= AppSettings.Settings[OSPrefix + "DestPort"].Value;
}
}
return s_DestPort;
Expand Down
1 change: 0 additions & 1 deletion test/SerialPortStreamManualTest/GlobalSuppressions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@

using System.Diagnostics.CodeAnalysis;

[assembly: SuppressMessage("Style", "IDE0074:Use compound assignment", Justification = ".NET Framework 4.0 compatibility")]
[assembly: SuppressMessage("Style", "IDE0230:Use UTF-8 string literal", Justification = "Testing byte streams, not UTF8 strings")]
1 change: 0 additions & 1 deletion test/SerialPortStreamNativeTest/GlobalSuppressions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,4 @@

[assembly: SuppressMessage("Performance", "CA1835:Prefer the 'Memory'-based overloads for 'ReadAsync' and 'WriteAsync'", Justification = "Explicit testing of API")]
[assembly: SuppressMessage("Style", "IDE0056:Use index operator", Justification = ".NET 4.0 Framework Compatibility")]
[assembly: SuppressMessage("Style", "IDE0074:Use compound assignment", Justification = ".NET Framework 4.0 compatibility")]
[assembly: SuppressMessage("Style", "IDE0230:Use UTF-8 string literal", Justification = "Testing byte streams, not UTF8 strings")]
1 change: 0 additions & 1 deletion test/SerialPortStreamTest/GlobalSuppressions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,5 @@
using System.Diagnostics.CodeAnalysis;

[assembly: SuppressMessage("Style", "IDE0056:Use index operator", Justification = ".NET Framework 4.0 compatibility")]
[assembly: SuppressMessage("Style", "IDE0074:Use compound assignment", Justification = ".NET Framework 4.0 compatibility")]
[assembly: SuppressMessage("Style", "IDE0230:Use UTF-8 string literal", Justification = "Testing byte streams, not UTF8 strings")]
[assembly: SuppressMessage("Performance", "CA1835:Prefer the 'Memory'-based overloads for 'ReadAsync' and 'WriteAsync'", Justification = "Specific API Test")]

0 comments on commit 1527cf8

Please sign in to comment.