moq.analyzers
moq.analyzers copied to clipboard
Set of analyzers for Moq mocking library
The package that is available on nuget.org (and here on GitHub) does not show up in the Visual Studio Solution explorer under "Analyzers". I think the reason for this is...
Current analyzer uses fake "new T(args)" to understand whether constructor exists. It does not work for abstract classes because they cannot be instantiated directly.
This is to help dogfood the Effective C# Analyzer package
Analyzer Moq1100 is incorrectly firing in the following case: ```cs public interface IFoo { bool DoSomething(object? bar); } var mock = new Mock(); mock.Setup(m => m.DoSomething(It.IsAny())).Returns((object? bar) => true); ```...
Tracking issue for #170. Once GitHub Actions supports the required `rollForward` strategies (tracked at https://github.com/actions/setup-dotnet/issues/448), we should switch from our current disable to `latestPatch`. Alternatively, we can use renovate to...
Add SuperLinter base configuration ## Summary by CodeRabbit - **New Features** - Introduced an automated linting workflow to enhance code quality checks during development. - **Impact** - The new linting...
> It feels like this code shouldn't be needed? I haven't gotten to the usage yet, but assuming we do need this, it feels like we should file + link...
Benchmark support added in #109, this should be expanded to all analyzers. Once all analyzers have benchmark baselines, the baseline file from #119 should be moved forward to evaluate performance
Analyzer Moq1200 is incorrectly firing in the following case ```csharp public interface IFoo { Task DoSomethingAsync(); } var mock = new Mock(); mock.Setup(foo => foo.DoSomethingAsync().Result).Returns(true); ``` The analyzer indicates the...
```csharp public interface IFoo { Task DoSomethingAsync(); } var mock = new Mock(); // Preferred way 4.16+ mock.Setup(foo => foo.DoSomethingAsync().Result).Returns(true); // Preferred way earlier than 4.16 mock.Setup(foo => foo.DoSomethingAsync()).ReturnsAsync(true); ```...