moq.analyzers icon indicating copy to clipboard operation
moq.analyzers copied to clipboard

Implement support for SimpleLambdaExpressionSyntax in delegate constructors

Open coderabbitai[bot] opened this issue 4 months ago • 2 comments
trafficstars

Currently, the CallbackSignatureShouldMatchMockedMethodAnalyzer skips simple lambda expressions when used within delegate constructors to avoid handling edge cases and maintain simplicity.

This enhancement would extend the analyzer to properly validate simple lambda expressions in delegate constructor scenarios, improving the completeness of callback signature validation.

Context:

  • File: src/Analyzers/CallbackSignatureShouldMatchMockedMethodAnalyzer.cs
  • Location: Around line 61

Related:

  • PR: https://github.com/rjmurillo/moq.analyzers/pull/513
  • Comment: https://github.com/rjmurillo/moq.analyzers/pull/513#discussion_r2202471874

Requested by: @rjmurillo

coderabbitai[bot] avatar Jul 12 '25 09:07 coderabbitai[bot]