rjmurillo / moq.analyzers

Set of analyzers for Moq mocking library
BSD 3-Clause "New" or "Revised" License
22 stars 2 forks source link

Add Mock.Of<T> and MockRepository support to ConstructorArgumentsShouldMatchAnalyzer #140

Closed rjmurillo closed 4 months ago

rjmurillo commented 4 months ago

The majority of this change is mechanical (moving code from one location to another, replacing magic strings with constants, etc.). There is a functional update that completely changes the ConstructorArgumentsShouldMatchAnalyzer:

image Baseline is an empty analyzer, control is the old interface constructor parameter analyzer, treatment is the new combined analyzer.

Changes

Misc:

Documentation:

Analyzers:

Benchmarks:

Test:

Note: while code coverage is improved, it's still below 95%. This is due to some guard cases that need coverage. For example, #141

Resolves #122 For Moq1001 and Moq1002, #85

codacy-production[bot] commented 4 months ago

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
:white_check_mark: +0.03% (target: -1.00%) :x: 93.67% (target: 95.00%)
Coverage variation details | | Coverable lines | Covered lines | Coverage | | ------------- | ------------- | ------------- | ------------- | | Common ancestor commit (cc48498eba55a4dd603b3b991b829247759e09a1) | 460 | 425 | 92.39% | | | Head commit (cd74ad0b85368b8856219bf0686b7a70095ed891) | 528 (+68) | 488 (+63) | 92.42% (**+0.03%**) | **Coverage variation** is the difference between the coverage for the head and common ancestor commits of the pull request branch: ` - `
Diff coverage details | | Coverable lines | Covered lines | Diff coverage | | ------------- | ------------- | ------------- | ------------- | | Pull request (#140) | 237 | 222 | **93.67%** | **Diff coverage** is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: `/ * 100%`

See your quality gate settings    Change summary preferences


:rocket: Don’t miss a bit, follow what’s new on Codacy.

Codacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more

codeclimate[bot] commented 4 months ago

Code Climate has analyzed commit 70cd7a80 and detected 37 issues on this pull request.

Here's the issue category breakdown:

Category Count
Complexity 15
Duplication 2
Style 20

View more on Code Climate.