Skip to content

Commit

Permalink
.NET 9 preparation
Browse files Browse the repository at this point in the history
- Move rule suppressions to `ruleset` file.
- Disable CA1515.
- Remove redundant package references.
- Suppress IDE0130.
  • Loading branch information
martincostello committed Jul 10, 2024
1 parent 3d45921 commit a5d060d
Show file tree
Hide file tree
Showing 10 changed files with 9 additions and 3 deletions.
2 changes: 2 additions & 0 deletions AwsLambdaTestServer.ruleset
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
<IncludeAll Action="Warning" />
<Rules AnalyzerId="Microsoft.Analyzers.ManagedCodeAnalysis" RuleNamespace="Microsoft.Rules.Managed">
<Rule Id="CA1303" Action="None" />
<Rule Id="CA1515" Action="None" />
<Rule Id="CA1848" Action="None" />
</Rules>
<Rules AnalyzerId="StyleCop.Analyzers" RuleNamespace="StyleCop.Analyzers">
<Rule Id="AD0001" Action="None" />
Expand Down
1 change: 0 additions & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
<LangVersion>latest</LangVersion>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<NeutralLanguage>en-US</NeutralLanguage>
<NoWarn>$(NoWarn);CA1848</NoWarn>
<Nullable>enable</Nullable>
<PackageIcon></PackageIcon>
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
Expand Down
1 change: 0 additions & 1 deletion samples/MathsFunctions.Tests/MathsFunctions.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
<Content Include="xunit.runner.json" CopyToOutputDirectory="PreserveNewest" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.TestHost" />
<PackageReference Include="Microsoft.NET.Test.Sdk" />
<PackageReference Include="Shouldly" />
<PackageReference Include="xRetry" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
<ItemGroup>
<AdditionalFiles Include="PublicAPI\PublicAPI.Shipped.txt" />
<AdditionalFiles Include="PublicAPI\PublicAPI.Unshipped.txt" />
</ItemGroup>
<ItemGroup Condition="Exists('PublicAPI\$(TargetFramework)')">
<AdditionalFiles Include="PublicAPI\$(TargetFramework)\PublicAPI.Shipped.txt" />
<AdditionalFiles Include="PublicAPI\$(TargetFramework)\PublicAPI.Unshipped.txt" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
<PackageReference Include="Amazon.Lambda.Serialization.Json" />
<PackageReference Include="AWSSDK.SQS" />
<PackageReference Include="MartinCostello.Logging.XUnit" />
<PackageReference Include="Microsoft.AspNetCore.TestHost" />
<PackageReference Include="Microsoft.NET.Test.Sdk" />
<PackageReference Include="NSubstitute" />
<PackageReference Include="Shouldly" />
Expand Down
1 change: 1 addition & 0 deletions tests/AwsLambdaTestServer.Tests/ReverseFunction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using Amazon.Lambda.RuntimeSupport;
using Amazon.Lambda.Serialization.Json;

#pragma warning disable IDE0130
namespace MyFunctions;

public static class ReverseFunction
Expand Down
1 change: 1 addition & 0 deletions tests/AwsLambdaTestServer.Tests/ReverseFunctionTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using System.Text.Json;
using MartinCostello.Testing.AwsLambdaTestServer;

#pragma warning disable IDE0130
namespace MyFunctions;

public static class ReverseFunctionTests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using System.Text.Json;
using MartinCostello.Testing.AwsLambdaTestServer;

#pragma warning disable IDE0130
namespace MyFunctions;

public static class ReverseFunctionWithCustomOptionsTests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;

#pragma warning disable IDE0130
namespace MyFunctions;

public class ReverseFunctionWithLoggingTests(ITestOutputHelper outputHelper) : ITestOutputHelperAccessor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using System.Text.Json;
using MartinCostello.Testing.AwsLambdaTestServer;

#pragma warning disable IDE0130
namespace MyFunctions;

public static class ReverseFunctionWithMobileSdkTests
Expand Down

0 comments on commit a5d060d

Please sign in to comment.