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

Set of analyzers for Moq mocking library

Results 24 moq.analyzers issues
Sort by recently updated
recently updated
newest added

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

dependencies
releasable
build

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); ```...

triage

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...

triage

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...

github_actions
releasable

> 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...

help wanted
triage
analyzers

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

housekeeping
.NET

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...

bug
.NET
analyzers

```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); ```...

bug
.NET
analyzers