-
Notifications
You must be signed in to change notification settings - Fork 4
Remove ECS0200 suppression and update WellKnownTypes to not trigger ECS0600 #236
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
06ea6bc
Remove ECS0200 suppression and update WellKnownTypes to not trigger E…
rjmurillo 424f04d
Remove redundant else
rjmurillo a4e7819
Update WellKnownTypeNames based on PR feedback
rjmurillo afcafb6
Update well known type names to be more perscriptive
rjmurillo 8b16498
Update documentation for well known Moq names type
rjmurillo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,74 @@ | ||
| namespace Moq.Analyzers.Common; | ||
rjmurillo marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| /// <summary> | ||
| /// Provides well-known names and fully qualified names for commonly used Moq types, namespaces, and members. | ||
| /// </summary> | ||
| internal static class WellKnownMoqNames | ||
| { | ||
| /// <summary> | ||
| /// Represents the namespace for the Moq library. | ||
| /// </summary> | ||
| internal static readonly string MoqNamespace = "Moq"; | ||
|
|
||
| /// <summary> | ||
| /// Symbol name for Moq. | ||
| /// </summary> | ||
| internal static readonly string MoqSymbolName = "Moq"; | ||
|
|
||
| /// <summary> | ||
| /// The name of the 'Moq.Mock' type. | ||
| /// </summary> | ||
| internal static readonly string MockTypeName = "Mock"; | ||
|
|
||
| /// <summary> | ||
| /// The name of the 'Moq.MockBehavior' type. | ||
| /// This type specifies the behavior of the mock (Strict, Loose, etc.). | ||
| /// </summary> | ||
| internal static readonly string MockBehaviorTypeName = "MockBehavior"; | ||
|
|
||
| /// <summary> | ||
| /// The name of the 'Moq.MockFactory' type. | ||
| /// This factory is used for creating multiple mock objects with a shared configuration. | ||
| /// </summary> | ||
| internal static readonly string MockFactoryTypeName = "MockFactory"; | ||
|
|
||
rjmurillo marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| /// <summary> | ||
| /// Fully qualified name for the 'Moq.Mock' type. | ||
| /// </summary> | ||
| internal static readonly string FullyQualifiedMoqMockTypeName = $"{MoqNamespace}.{MockTypeName}"; | ||
|
|
||
| /// <summary> | ||
| /// Fully qualified name for the generic version of 'Moq.Mock{T}'. | ||
| /// Represents mocks for specific types. | ||
| /// </summary> | ||
| internal static readonly string FullyQualifiedMoqMock1TypeName = $"{FullyQualifiedMoqMockTypeName}`1"; | ||
|
|
||
| /// <summary> | ||
| /// Fully qualified name for the 'Moq.MockBehavior' type. | ||
| /// </summary> | ||
| internal static readonly string FullyQualifiedMoqBehaviorTypeName = $"{MoqNamespace}.{MockBehaviorTypeName}"; | ||
|
|
||
| /// <summary> | ||
| /// Fully qualified name for the 'Moq.MockRepository' type. | ||
| /// This type acts as a container for multiple mocks and shared mock configurations. | ||
| /// </summary> | ||
| internal static readonly string FullyQualifiedMoqRepositoryTypeName = $"{MoqNamespace}.MockRepository"; | ||
|
|
||
rjmurillo marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| /// <summary> | ||
| /// Represents the method name for the `As` method in Moq. | ||
| /// This method is used to cast mocks to interfaces. | ||
| /// </summary> | ||
| internal static readonly string AsMethodName = "As"; | ||
|
|
||
| /// <summary> | ||
| /// Represents the method name for the `Create` method in Moq. | ||
| /// This method is used to create instances of mocks. | ||
| /// </summary> | ||
| internal static readonly string CreateMethodName = "Create"; | ||
|
|
||
| /// <summary> | ||
| /// Represents the method name for the `Of` method in Moq. | ||
| /// This method is used to create a mock from a type without directly specifying the constructor. | ||
| /// </summary> | ||
| internal static readonly string OfMethodName = "Of"; | ||
| } | ||
This file was deleted.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.