fix(analyzers): report RCS1046 for async void methods - #1790
Merged
Conversation
Async methods without the Async suffix were only reported when the return type was awaitable, so async void methods were skipped. Fixes #1770 Co-authored-by: Cursor <cursoragent@cursor.com>
This was referenced Aug 16, 2026
Open
This was referenced Aug 19, 2026
Bump Roslynator.Formatting.Analyzers from 4.15.0 to 4.16.1
OPCFoundation/UA-.NETStandard-Samples#776
Open
vdolek
pushed a commit
to EvilBrainsTechnology/EvilCase
that referenced
this pull request
Aug 20, 2026
Updated [Roslynator.Analyzers](https://github.com/dotnet/roslynator) from 4.16.0 to 4.16.1. <details> <summary>Release notes</summary> _Sourced from [Roslynator.Analyzers's releases](https://github.com/dotnet/roslynator/releases)._ ## 4.16.1 ### Fixed - Fix analyzer [RCS1060](https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1060) to not report a file that contains only multiple partial declarations of the same type ([PR](dotnet/roslynator#1798)) - Fix analyzer [RCS1231](https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1231) to not suggest `in` for `ref struct` parameters ([#1725](dotnet/roslynator#1725)) ([PR](dotnet/roslynator#1807)) - Fix analyzer [RCS1260](https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1260) false positive for `omit_when_single_line` on multi-line object/collection initializers ([#1439](dotnet/roslynator#1439)) ([PR](dotnet/roslynator#1808)) - Fix analyzer [RCS0036](https://josefpihrt.github.io/docs/roslynator/analyzers/RCS0036) to report blank lines between single-line declarations in records ([PR](dotnet/roslynator#1813)) - Fix analyzer [RCS1046](https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1046) to report `async void` methods without `Async` suffix ([PR](dotnet/roslynator#1790)) - Fix analyzer [RCS1265](https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1265) to not report catch clauses with a `when` filter ([PR](dotnet/roslynator#1789)) - Fix analyzer [RCS0034](https://josefpihrt.github.io/docs/roslynator/analyzers/RCS0034) for types with a primary constructor and multiple constraint clauses ([PR](dotnet/roslynator#1791)) - Fix analyzer [RCS1231](https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1231) to not report `CancellationToken` in sync methods returning `Task` ([PR](dotnet/roslynator#1802)) - [CLI] Fix GitLab output format to use relative paths, forward slashes, and 1-based line numbers ([PR](dotnet/roslynator#1792)) - [CLI] Fix `generate-doc` to omit internal interfaces from type declarations and the Implements section ([PR](dotnet/roslynator#1801)) Commits viewable in [compare view](dotnet/roslynator@v4.16.0...v4.16.1). </details> Updated [Roslynator.CodeAnalysis.Analyzers](https://github.com/dotnet/roslynator) from 4.16.0 to 4.16.1. <details> <summary>Release notes</summary> _Sourced from [Roslynator.CodeAnalysis.Analyzers's releases](https://github.com/dotnet/roslynator/releases)._ ## 4.16.1 ### Fixed - Fix analyzer [RCS1060](https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1060) to not report a file that contains only multiple partial declarations of the same type ([PR](dotnet/roslynator#1798)) - Fix analyzer [RCS1231](https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1231) to not suggest `in` for `ref struct` parameters ([#1725](dotnet/roslynator#1725)) ([PR](dotnet/roslynator#1807)) - Fix analyzer [RCS1260](https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1260) false positive for `omit_when_single_line` on multi-line object/collection initializers ([#1439](dotnet/roslynator#1439)) ([PR](dotnet/roslynator#1808)) - Fix analyzer [RCS0036](https://josefpihrt.github.io/docs/roslynator/analyzers/RCS0036) to report blank lines between single-line declarations in records ([PR](dotnet/roslynator#1813)) - Fix analyzer [RCS1046](https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1046) to report `async void` methods without `Async` suffix ([PR](dotnet/roslynator#1790)) - Fix analyzer [RCS1265](https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1265) to not report catch clauses with a `when` filter ([PR](dotnet/roslynator#1789)) - Fix analyzer [RCS0034](https://josefpihrt.github.io/docs/roslynator/analyzers/RCS0034) for types with a primary constructor and multiple constraint clauses ([PR](dotnet/roslynator#1791)) - Fix analyzer [RCS1231](https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1231) to not report `CancellationToken` in sync methods returning `Task` ([PR](dotnet/roslynator#1802)) - [CLI] Fix GitLab output format to use relative paths, forward slashes, and 1-based line numbers ([PR](dotnet/roslynator#1792)) - [CLI] Fix `generate-doc` to omit internal interfaces from type declarations and the Implements section ([PR](dotnet/roslynator#1801)) Commits viewable in [compare view](dotnet/roslynator@v4.16.0...v4.16.1). </details> Updated [Roslynator.Formatting.Analyzers](https://github.com/dotnet/roslynator) from 4.16.0 to 4.16.1. <details> <summary>Release notes</summary> _Sourced from [Roslynator.Formatting.Analyzers's releases](https://github.com/dotnet/roslynator/releases)._ ## 4.16.1 ### Fixed - Fix analyzer [RCS1060](https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1060) to not report a file that contains only multiple partial declarations of the same type ([PR](dotnet/roslynator#1798)) - Fix analyzer [RCS1231](https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1231) to not suggest `in` for `ref struct` parameters ([#1725](dotnet/roslynator#1725)) ([PR](dotnet/roslynator#1807)) - Fix analyzer [RCS1260](https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1260) false positive for `omit_when_single_line` on multi-line object/collection initializers ([#1439](dotnet/roslynator#1439)) ([PR](dotnet/roslynator#1808)) - Fix analyzer [RCS0036](https://josefpihrt.github.io/docs/roslynator/analyzers/RCS0036) to report blank lines between single-line declarations in records ([PR](dotnet/roslynator#1813)) - Fix analyzer [RCS1046](https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1046) to report `async void` methods without `Async` suffix ([PR](dotnet/roslynator#1790)) - Fix analyzer [RCS1265](https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1265) to not report catch clauses with a `when` filter ([PR](dotnet/roslynator#1789)) - Fix analyzer [RCS0034](https://josefpihrt.github.io/docs/roslynator/analyzers/RCS0034) for types with a primary constructor and multiple constraint clauses ([PR](dotnet/roslynator#1791)) - Fix analyzer [RCS1231](https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1231) to not report `CancellationToken` in sync methods returning `Task` ([PR](dotnet/roslynator#1802)) - [CLI] Fix GitLab output format to use relative paths, forward slashes, and 1-based line numbers ([PR](dotnet/roslynator#1792)) - [CLI] Fix `generate-doc` to omit internal interfaces from type declarations and the Implements section ([PR](dotnet/roslynator#1801)) Commits viewable in [compare view](dotnet/roslynator@v4.16.0...v4.16.1). </details> Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore <dependency name> major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself) - `@dependabot ignore <dependency name> minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself) - `@dependabot ignore <dependency name>` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself) - `@dependabot unignore <dependency name>` will remove all of the ignore conditions of the specified dependency - `@dependabot unignore <dependency name> <ignore condition>` will remove the ignore condition of the specified dependency and ignore conditions </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This was referenced Aug 20, 2026
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
async voidmethods whose names do not end withAsyncasync void Foo()Fixes #1770
Test plan
dotnet test src/Tests/Analyzers.Tests/Analyzers.Tests.csproj --filter FullyQualifiedName~RCS1046AsynchronousMethodNameShouldEndWithAsyncTestsMade with Cursor