Skip to content

Commit 2b12c22

Browse files
build(deps): Bump SonarAnalyzer.CSharp from 8.52.0.60960 to 8.53.0.62665 (#988)
* build(deps): Bump SonarAnalyzer.CSharp from 8.52.0.60960 to 8.53.0.62665 Bumps [SonarAnalyzer.CSharp](https://github.com/SonarSource/sonar-dotnet) from 8.52.0.60960 to 8.53.0.62665. - [Release notes](https://github.com/SonarSource/sonar-dotnet/releases) - [Commits](SonarSource/sonar-dotnet@8.52.0.60960...8.53.0.62665) --- updated-dependencies: - dependency-name: SonarAnalyzer.CSharp dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> * chore: code analyzer rules code updates --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Egil Hansen <[email protected]>
1 parent d72412b commit 2b12c22

File tree

7 files changed

+270
-266
lines changed

7 files changed

+270
-266
lines changed

.editorconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -504,3 +504,4 @@ dotnet_diagnostic.S125.severity = none # S125: Sections of code should not be co
504504
dotnet_diagnostic.S3459.severity = none # S3459: Unassigned members should be removed
505505
dotnet_diagnostic.S3871.severity = none # S3871: Exception types should be "public"
506506
dotnet_diagnostic.S1186.severity = none # S1186: Methods should not be empty
507+
dotnet_diagnostic.S1133.severity = none # S1133: Deprecated code should be removed

Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
<!-- Shared code analyzers used for all projects in the solution -->
5151
<ItemGroup Label="Code Analyzers">
5252
<PackageReference Include="AsyncFixer" Version="1.6.0" PrivateAssets="All" />
53-
<PackageReference Include="SonarAnalyzer.CSharp" Version="8.52.0.60960" PrivateAssets="All" />
53+
<PackageReference Include="SonarAnalyzer.CSharp" Version="8.53.0.62665" PrivateAssets="All" />
5454
</ItemGroup>
5555

5656
<ItemGroup Label="Implicit usings"

src/.editorconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,5 @@
3636
##########################################
3737
# Custom - Code Analyzers Rules
3838
##########################################
39+
40+
dotnet_diagnostic.S1133.severity = none # S1133: Deprecated code should be removed

src/bunit.web/ComponentFactories/StubComponentFactory.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public bool CanCreate(Type componentType)
2222
public IComponent Create(Type componentType)
2323
{
2424
var typeToCreate = StubType.MakeGenericType(componentType);
25-
return (IComponent)Activator.CreateInstance(typeToCreate, new object?[] { replacementContent })!;
25+
return (IComponent)Activator.CreateInstance(typeToCreate, replacementContent)!;
2626
}
2727
}
2828
#endif

tests/.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,5 @@ dotnet_diagnostic.CA2007.severity = none # https://github.com/atc-net
4242

4343
dotnet_diagnostic.CA1819.severity = suggestion # CA1819: Properties should not return arrays
4444
dotnet_diagnostic.CA1849.severity = suggestion # CA1849: Call async methods when in an async method
45-
4645
dotnet_diagnostic.xUnit1026.severity = none # xUnit1026: Theory methods should use all of their parameters
46+
dotnet_diagnostic.S1144.severity = suggestion # S1144: Unused private types or members should be removed

tests/bunit.core.tests/ComponentParameterCollectionBuilderTests.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -696,6 +696,7 @@ public void Test314()
696696
action.ShouldNotThrow();
697697
}
698698

699+
#pragma warning disable S1144 // Unused private types or members should be removed
699700
private class Params : ComponentBase
700701
{
701702
public int Field = -1;
@@ -770,4 +771,5 @@ private sealed class ValidNamesComponent : ComponentBase
770771
[Parameter] public EventCallback<string> FacialExpressionChanged { get; set; }
771772
[Parameter] public Expression<Func<string>> FacialExpressionExpression { get; set; }
772773
}
774+
#pragma warning restore S1144 // Unused private types or members should be removed
773775
}

0 commit comments

Comments
 (0)