Skip to content

Commit

Permalink
Bump Akka.Analyzers from 0.2.1 to 0.2.2 (#7073)
Browse files Browse the repository at this point in the history
Co-authored-by: Aaron Stannard <aaron@petabridge.com>
  • Loading branch information
Arkatufus and Aaronontheweb authored Jan 26, 2024
1 parent bdc46f2 commit 1b30145
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<MultiNodeAdapterVersion>1.5.13</MultiNodeAdapterVersion>
<MicrosoftLibVersion>[6.0.*,)</MicrosoftLibVersion>
<MsExtVersion>[6.0.*,)</MsExtVersion>
<AkkaAnalyzerVersion>0.2.1</AkkaAnalyzerVersion>
<AkkaAnalyzerVersion>0.2.2</AkkaAnalyzerVersion>
<AkkaPackageTags>akka;actors;actor model;Akka;concurrency</AkkaPackageTags>
</PropertyGroup>
<PropertyGroup>
Expand Down
1 change: 1 addition & 0 deletions src/benchmark/PingPong/ClientAsyncActor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
using Akka.Actor;

#pragma warning disable 1998 //async method lacks an await
#pragma warning disable AK1003 // ReceiveAsync lacks an await

namespace PingPong
{
Expand Down
4 changes: 4 additions & 0 deletions src/core/Akka.Tests/Actor/ReceiveTimeoutSpec.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ public AsyncTimeoutActor(TestLatch timeoutLatch, TimeSpan? timeout)

Context.SetReceiveTimeout(timeout.GetValueOrDefault());

#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously
#pragma warning disable AK1003
ReceiveAsync<ReceiveTimeout>(async _ =>
{
log.Info($"Received {nameof(ReceiveTimeout)}");
Expand All @@ -92,6 +94,8 @@ public AsyncTimeoutActor(TestLatch timeoutLatch, TimeSpan? timeout)
{
log.Info($"Received {nameof(Tick)}");
});
#pragma warning restore AK1003
#pragma warning restore CS1998 // Async method lacks 'await' operators and will run synchronously
}

}
Expand Down
2 changes: 2 additions & 0 deletions src/core/Akka.Tests/Actor/SupervisorHierarchySpec.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,12 @@ private class ResumerAsync : TestReceiveActor
public ResumerAsync()
{
#pragma warning disable CS1998
#pragma warning disable AK1003
ReceiveAsync<string>(s => s.StartsWith("spawn:"), async s => Sender.Tell(Context.ActorOf<ResumerAsync>(s.Substring(6))));
ReceiveAsync<string>(s => s.Equals("spawn"), async _ => Sender.Tell(Context.ActorOf<ResumerAsync>()));
ReceiveAsync<string>(s => s.Equals("fail"), async _ => { throw new Exception("expected"); });
ReceiveAsync<string>(s => s.Equals("ping"), async _ => Sender.Tell("pong"));
#pragma warning restore AK1003
#pragma warning restore CS1998
}

Expand Down
4 changes: 3 additions & 1 deletion src/core/Akka.Tests/Dispatch/AsyncAwaitSpec.cs
Original file line number Diff line number Diff line change
Expand Up @@ -429,11 +429,13 @@ public class AsyncFailingActor : ReceiveActor
public AsyncFailingActor()
{
#pragma warning disable CS1998
#pragma warning disable AK1003
ReceiveAsync<string>(async _ =>
#pragma warning restore CS1998
{
ThrowException();
});
#pragma warning restore AK1003
#pragma warning restore CS1998
}

protected override void PreRestart(Exception reason, object message)
Expand Down

0 comments on commit 1b30145

Please sign in to comment.