Skip to content

Commit c731db6

Browse files
authored
Suppress violations of S3717, turn off in tests (#1554)
* Fix violations of S3717, turn off in tests * Switch back to original exception type
1 parent 246488a commit c731db6

File tree

5 files changed

+7
-1
lines changed

5 files changed

+7
-1
lines changed

Steeltoe.Debug.ruleset

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@
7070
<Rule Id="S3459" Action="Info" />
7171
<Rule Id="S3597" Action="None" />
7272
<Rule Id="S3598" Action="None" />
73+
<Rule Id="S3717" Action="Info" />
7374
<Rule Id="S3776" Action="Info" />
7475
<Rule Id="S3872" Action="Warning" />
7576
<Rule Id="S3874" Action="Warning" />

Steeltoe.Release.ruleset

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
<Rule Id="S3433" Action="None" />
5959
<Rule Id="S3597" Action="None" />
6060
<Rule Id="S3598" Action="None" />
61+
<Rule Id="S3717" Action="Warning" />
6162
<Rule Id="S3872" Action="Warning" />
6263
<Rule Id="S3874" Action="Warning" />
6364
<Rule Id="S3878" Action="None" />

shared-test.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project>
22
<PropertyGroup>
3-
<NoWarn>$(NoWarn);S2094;SA1602;CA1062;CA1707;NU5104</NoWarn>
3+
<NoWarn>$(NoWarn);S2094;S3717;SA1602;CA1062;CA1707;NU5104</NoWarn>
44
</PropertyGroup>
55

66
<PropertyGroup>

src/Connectors/src/Connectors/MongoDb/MongoDbConnectionStringBuilder.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,9 @@ private void FromConnectionString(string? connectionString, bool preserveUnknown
135135
if (connectionString.Contains(','))
136136
{
137137
// MongoDB allows multiple servers in the connection string, but we haven't found any service bindings that actually use that.
138+
#pragma warning disable S3717 // Track use of "NotImplementedException"
138139
throw new NotImplementedException("Support for multiple servers is not implemented. Please open a GitHub issue if you need this.");
140+
#pragma warning restore S3717 // Track use of "NotImplementedException"
139141
}
140142

141143
// MongoDB allows semicolon as separator for query string parameters, to provide backwards compatibility.

src/Connectors/src/Connectors/Redis/RedisConnectionStringBuilder.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,9 @@ private void FromConnectionString(string? connectionString)
103103
if (option.Contains(','))
104104
{
105105
// Redis allows multiple servers in the connection string, but we haven't found any service bindings that actually use that.
106+
#pragma warning disable S3717 // Track use of "NotImplementedException"
106107
throw new NotImplementedException("Support for multiple servers is not implemented. Please open a GitHub issue if you need this.");
108+
#pragma warning restore S3717 // Track use of "NotImplementedException"
107109
}
108110

109111
string[] hostWithPort = option.Split(':', 2);

0 commit comments

Comments
 (0)