Skip to content

Commit

Permalink
Fix the PosInfoMoq1005 rule to Design and Warning level.
Browse files Browse the repository at this point in the history
  • Loading branch information
GillesTourreau committed Oct 24, 2024
1 parent 74df299 commit ded1fb1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Moq.Analyzers/AnalyzerReleases.Shipped.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
### New Rules
Rule ID | Category | Severity | Notes
--------|----------|----------|-------
PosInfoMoq1005 | Compilation | Error | Defines the generic argument of the `SetupSet()` method with the type of the mocked property.
PosInfoMoq1005 | Design | Warning | Defines the generic argument of the `SetupSet()` method with the type of the mocked property.
PosInfoMoq2014 | Compilation | Error | The `Callback()` delegate expression must not return a value.
PosInfoMoq2015 | Compilation | Error | The `Protected().Setup()` method must match the return type of the mocked method.
PosInfoMoq2016 | Compilation | Error | `Mock<T>` constructor with factory lambda expression can be used only with classes.
Expand Down
4 changes: 2 additions & 2 deletions src/Moq.Analyzers/Analyzers/SetupSetAnalyzer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ public class SetupSetAnalyzer : DiagnosticAnalyzer
"PosInfoMoq1005",
"Defines the generic argument of the SetupSet() method with the type of the mocked property",
"Defines the generic argument of the SetupSet() method with the type of the mocked property",
"Compilation",
DiagnosticSeverity.Error,
"Design",
DiagnosticSeverity.Warning,
isEnabledByDefault: true,
description: "The SetupSet<T>() method must be used when setting up a mocked property.",
helpLinkUri: "https://posinformatique.github.io/PosInformatique.Moq.Analyzers/docs/Compilation/PosInfoMoq1005.html");
Expand Down

0 comments on commit ded1fb1

Please sign in to comment.