Wow, it is an old thread! May I suggest removing RSPEC-4326 entirely or marking it as a deprecated rule? I think that the industry is slowly arriving at the conclusion that this rule is actually harmful.
The performance benefit claims are shown to be actually false, it is slower when you omit that await
None of the IDE-s (or the developers for that matter) are checking if there is a return asyncFn()
when wrapping the code in try-catch-finally - so the code is going to be broken
The documentation does not mention that a direct return breaks “finally” and “catch” blocks.
It is true that the warning is not raised in this case, but many people only remember to avoid return await
and do not even know about the try-catch try-finally exceptions.
And last, I had to explain it many times to colleagues, and some of them were referring to this sonar rule as the source of their confusion.