rjmurillo / moq.analyzers

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

Add more analyzers and bump Meziantou.Analzer to latest version #89

Closed rjmurillo closed 2 weeks ago

rjmurillo commented 2 weeks ago

Several changes:

  1. Add several new analyzers to check for code correctness and style
  1. Added suppressions for some of the new rules as they'll need more extensive refactoring to satisfy (e.g., methods have multiple responsibilities, there's too much coupling, poor encapsulation, etc.). Tracked in #90
  2. Bump Meziantou.Analyzer to 2.0.157
rjmurillo commented 2 weeks ago

We're pretty close to being able to turn on WarningsAsErrors (which I think is valuable) and these add a whole bunch of new items, some of dubious value (do we really need another compiler warning for TODO, or that f isn't a good variable name?)

Can we add these and be clean on them at the same time, or suppress violations inline and file TODOs?

I can do two things:

  1. Wait until you've cleaned up the existing warnings as errors and then rebase
  2. For the newly added analyzers, get into a clean state (this is quite reasonable)

edit: for the second item, new commits will be pushed. For items not cleaned up, they're tracked in #90

MattKotsenas commented 2 weeks ago

If you get done before me you don't need to wait. I think 2 is more important than 1.

codacy-production[bot] commented 2 weeks ago

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
:white_check_mark: -0.47% (target: -1.00%) :x: 84.62% (target: 95.00%)
Coverage variation details | | Coverable lines | Covered lines | Coverage | | ------------- | ------------- | ------------- | ------------- | | Common ancestor commit (2a0c0e12b1cf658e8e4dfeff85f6078f45121b23) | 398 | 371 | 93.22% | | | Head commit (a205575de10020f51e9ee149b5ae2e55d604fbbf) | 400 (+2) | 371 (+0) | 92.75% (**-0.47%**) | **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 (#89) | 26 | 22 | **84.62%** | **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

MattKotsenas commented 2 weeks ago

@rjmurillo, this is ready to merge, but the code coverage is blocking merge. Either address, or feel free to lower the threshold for now while we have a lot of churn. I'd be OK with making this informational and not blocking while it's just us.