Skip to content

Commit

Permalink
Merge v0.30 changes back to main (#320)
Browse files Browse the repository at this point in the history
Catch up main with v0.3.0 release branch

- **New Features**
  - Added two new analyzer rules for Moq:
    - Moq1400: Guidance on explicitly choosing mocking behavior
    - Moq1410: Recommendation for setting Strict mocking behavior

- **Documentation**
  - Updated README.md with new analyzer rule details
  - Updated documentation for Moq1410 rule

- **Chores**
  - Updated AnalyzerReleases.Shipped.md with new rule information
  - Removed "New Rules" section from AnalyzerReleases.Unshipped.md

Co-authored-by: @MattKotsenas
  • Loading branch information
rjmurillo authored Jan 22, 2025
1 parent 76d8b8e commit 94613fe
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ something is wrong with your Moq configuration.
* Moq1200: Setup should be used only for overridable members
* Moq1201: Setup of async methods should use `.ReturnsAsync` instance instead of `.Result`
* Moq1300: Mock.As() should take interfaces
* Moq1400: Explicitly choose a mocking behavior instead of relying on the default (Loose) behavior
* Moq1410: Explicitly set the Strict mocking behavior

See [docs/rules](./docs/rules/README.md) for full documentation.

Expand Down
2 changes: 0 additions & 2 deletions docs/rules/Moq1410.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# Moq1410: Explicitly set the Strict mocking behavior

# Moq1410: Explicitly set the Strict mocking behavior

| Item | Value |
| -------- | ------- |
| Enabled | True |
Expand Down
9 changes: 9 additions & 0 deletions src/Analyzers/AnalyzerReleases.Shipped.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,12 @@ Moq1300 | Moq | Error | AsShouldBeUsedOnlyForInterfaceAnalyzer, [Documentation](
Rule ID | Category | Severity | Notes
--------|----------|----------|-------
Moq1201 | Moq | Error | SetupShouldNotIncludeAsyncResultAnalyzer, [Documentation](https://github.com/rjmurillo/moq.analyzers/blob/main/docs/rules/Moq1201.md)

## Release 0.3.0

### New Rules

Rule ID | Category | Severity | Notes
--------|----------|----------|-------
Moq1400 | Moq | Warning | SetExplicitMockBehaviorAnalyzer, [Documentation](https://github.com/rjmurillo/moq.analyzers/blob/main/docs/rules/Moq1400.md)
Moq1410 | Moq | Info | SetStrictMockBehaviorAnalyzer, [Documentation](https://github.com/rjmurillo/moq.analyzers/blob/main/docs/rules/Moq1410.md)
7 changes: 0 additions & 7 deletions src/Analyzers/AnalyzerReleases.Unshipped.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,2 @@
; Unshipped analyzer release
; https://github.com/dotnet/roslyn-analyzers/blob/main/src/Microsoft.CodeAnalysis.Analyzers/ReleaseTrackingAnalyzers.Help.md

### New Rules

Rule ID | Category | Severity | Notes
--------|----------|----------|-------
Moq1400 | Moq | Warning | SetExplicitMockBehaviorAnalyzer, [Documentation](https://github.com/rjmurillo/moq.analyzers/blob/main/docs/rules/Moq1400.md)
Moq1410 | Moq | Info | SetStrictMockBehaviorAnalyzer, [Documentation](https://github.com/rjmurillo/moq.analyzers/blob/main/docs/rules/Moq1410.md)

0 comments on commit 94613fe

Please sign in to comment.