Skip to content

Add analyzer release tracking #84

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
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 76 additions & 0 deletions Source/Moq.Analyzers/AnalyzerReleases.Shipped.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
; Shipped analyzer releases
; https://github.com/dotnet/roslyn-analyzers/blob/main/src/Microsoft.CodeAnalysis.Analyzers/ReleaseTrackingAnalyzers.Help.md

## Release 0.0.1.22865

### New Rules

Rule ID | Category | Severity | Notes
--------|----------|----------|-------
Moq1101 | Moq | Warning | CallbackSignatureAnalyzer
Moq1002 | Moq | Warning | ShouldNotAllowParametersForMockedInterfaceAnalyzer
Moq1001 | Moq | Warning | ShouldNotMockSealedClassesAnalyzer

## Release 0.0.3.40797

### New Rules

Rule ID | Category | Severity | Notes
--------|----------|----------|-------
Moq1003 | Moq | Warning | MatchingConstructorParametersAnalyzer

### Changed Rules

Rule ID | Category | Severity | Notes
--------|----------|----------|-------
Moq1001 | Moq | Warning | NoMocksForSealedClassesAnalyzer
Moq1002 | Moq | Warning | NoParametersForMockedInterfacesAnalyzer

## Release 0.0.4.43043

### New Rules

Rule ID | Category | Severity | Notes
--------|----------|----------|-------
Moq1100 | Moq | Warning | CallbackSignatureShouldMatchMockedMethodAnalyzer
Moq1000 | Moq | Warning | ConstructorArgumentsShouldMatchAnalyzer

### Changed Rules

Rule ID | Category | Severity | Notes
--------|----------|----------|-------
Moq1001 | Moq | Warning | NoConstructorArgumentsForInterfaceMockAnalyzer
Moq1101 | Moq | Warning | NoMethodsInPropertySetupAnalyzer
Moq1000 | Moq | Warning | NoSealedClassMocksAnalyzer

## Release 0.0.6

### Changed Rules

Rule ID | Category | Severity | Notes
--------|----------|----------|-------
Moq1002 | Moq | Warning | ConstructorArgumentsShouldMatchAnalyzer

## Release 0.0.7

### New Rules

Rule ID | Category | Severity | Notes
--------|----------|----------|-------
Moq1200 | Moq | Error | SetupShouldBeUsedOnlyForOverridableMembersAnalyzer

## Release 0.0.8

### New Rules

Rule ID | Category | Severity | Notes
--------|----------|----------|-------
Moq1300 | Moq | Error | AsShouldBeUsedOnlyForInterfaceAnalyzer

## Release 0.0.9

### New Rules

Rule ID | Category | Severity | Notes
--------|----------|----------|-------
Moq1201 | Moq | Error | SetupShouldNotIncludeAsyncResultAnalyzer
17 changes: 17 additions & 0 deletions Source/Moq.Analyzers/AnalyzerReleases.Unshipped.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
; Unshipped analyzer release
; https://github.com/dotnet/roslyn-analyzers/blob/main/src/Microsoft.CodeAnalysis.Analyzers/ReleaseTrackingAnalyzers.Help.md

### Changed Rules

Documentation links added for every rule.

Rule ID | Category | Severity | Notes
--------|----------|----------|-------
Moq1000 | Moq | Warning | NoSealedClassMocksAnalyzer, [Documentation](https://github.com/rjmurillo/moq.analyzers/blob/main/docs/rules/Moq1000.md)
Moq1001 | Moq | Warning | NoConstructorArgumentsForInterfaceMockAnalyzer, [Documentation](https://github.com/rjmurillo/moq.analyzers/blob/main/docs/rules/Moq1001.md)
Moq1002 | Moq | Warning | ConstructorArgumentsShouldMatchAnalyzer, [Documentation](https://github.com/rjmurillo/moq.analyzers/blob/main/docs/rules/Moq1002.md)
Moq1100 | Moq | Warning | CallbackSignatureShouldMatchMockedMethodAnalyzer, [Documentation](https://github.com/rjmurillo/moq.analyzers/blob/main/docs/rules/Moq1100.md)
Moq1101 | Moq | Warning | NoMethodsInPropertySetupAnalyzer, [Documentation](https://github.com/rjmurillo/moq.analyzers/blob/main/docs/rules/Moq1101.md)
Moq1200 | Moq | Error | SetupShouldBeUsedOnlyForOverridableMembersAnalyzer, [Documentation](https://github.com/rjmurillo/moq.analyzers/blob/main/docs/rules/Moq1200.md)
Moq1201 | Moq | Error | SetupShouldNotIncludeAsyncResultAnalyzer, [Documentation](https://github.com/rjmurillo/moq.analyzers/blob/main/docs/rules/Moq1201.md)
Moq1300 | Moq | Error | AsShouldBeUsedOnlyForInterfaceAnalyzer, [Documentation](https://github.com/rjmurillo/moq.analyzers/blob/main/docs/rules/Moq1300.md)
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@ public class AsShouldBeUsedOnlyForInterfaceAnalyzer : DiagnosticAnalyzer
{
private static readonly MoqMethodDescriptorBase MoqAsMethodDescriptor = new MoqAsMethodDescriptor();

private static readonly DiagnosticDescriptor Rule = new DiagnosticDescriptor(
private static readonly DiagnosticDescriptor Rule = new(
Diagnostics.AsShouldBeUsedOnlyForInterfaceId,
Diagnostics.AsShouldBeUsedOnlyForInterfaceTitle,
Diagnostics.AsShouldBeUsedOnlyForInterfaceMessage,
Diagnostics.Category,
DiagnosticSeverity.Error,
isEnabledByDefault: true);
isEnabledByDefault: true,
helpLinkUri: $"https://github.com/rjmurillo/moq.analyzers/blob/main/docs/rules/{Diagnostics.AsShouldBeUsedOnlyForInterfaceId}.md");

public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(Rule);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@ namespace Moq.Analyzers;
[DiagnosticAnalyzer(LanguageNames.CSharp)]
public class CallbackSignatureShouldMatchMockedMethodAnalyzer : DiagnosticAnalyzer
{
private static readonly DiagnosticDescriptor Rule = new DiagnosticDescriptor(
private static readonly DiagnosticDescriptor Rule = new(
Diagnostics.CallbackSignatureShouldMatchMockedMethodId,
Diagnostics.CallbackSignatureShouldMatchMockedMethodTitle,
Diagnostics.CallbackSignatureShouldMatchMockedMethodMessage,
Diagnostics.Category,
DiagnosticSeverity.Warning,
isEnabledByDefault: true);
isEnabledByDefault: true,
helpLinkUri: $"https://github.com/rjmurillo/moq.analyzers/blob/main/docs/rules/{Diagnostics.CallbackSignatureShouldMatchMockedMethodId}.md");

public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@ namespace Moq.Analyzers;
[DiagnosticAnalyzer(LanguageNames.CSharp)]
public class ConstructorArgumentsShouldMatchAnalyzer : DiagnosticAnalyzer
{
private static readonly DiagnosticDescriptor Rule = new DiagnosticDescriptor(
private static readonly DiagnosticDescriptor Rule = new(
Diagnostics.ConstructorArgumentsShouldMatchId,
Diagnostics.ConstructorArgumentsShouldMatchTitle,
Diagnostics.ConstructorArgumentsShouldMatchMessage,
Diagnostics.Category,
DiagnosticSeverity.Warning,
isEnabledByDefault: true);
isEnabledByDefault: true,
helpLinkUri: $"https://github.com/rjmurillo/moq.analyzers/blob/main/docs/rules/{Diagnostics.ConstructorArgumentsShouldMatchId}.md");

public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@ namespace Moq.Analyzers;
[DiagnosticAnalyzer(LanguageNames.CSharp)]
public class NoConstructorArgumentsForInterfaceMockAnalyzer : DiagnosticAnalyzer
{
private static readonly DiagnosticDescriptor Rule = new DiagnosticDescriptor(
private static readonly DiagnosticDescriptor Rule = new(
Diagnostics.NoConstructorArgumentsForInterfaceMockId,
Diagnostics.NoConstructorArgumentsForInterfaceMockTitle,
Diagnostics.NoConstructorArgumentsForInterfaceMockMessage,
Diagnostics.Category,
DiagnosticSeverity.Warning,
isEnabledByDefault: true);
isEnabledByDefault: true,
helpLinkUri: $"https://github.com/rjmurillo/moq.analyzers/blob/main/docs/rules/{Diagnostics.NoConstructorArgumentsForInterfaceMockId}.md");

public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics
{
Expand Down
5 changes: 3 additions & 2 deletions Source/Moq.Analyzers/NoMethodsInPropertySetupAnalyzer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@ namespace Moq.Analyzers;
[DiagnosticAnalyzer(LanguageNames.CSharp)]
public class NoMethodsInPropertySetupAnalyzer : DiagnosticAnalyzer
{
private static readonly DiagnosticDescriptor Rule = new DiagnosticDescriptor(
private static readonly DiagnosticDescriptor Rule = new(
Diagnostics.NoMethodsInPropertySetupId,
Diagnostics.NoMethodsInPropertySetupTitle,
Diagnostics.NoMethodsInPropertySetupMessage,
Diagnostics.Category,
DiagnosticSeverity.Warning,
isEnabledByDefault: true);
isEnabledByDefault: true,
helpLinkUri: $"https://github.com/rjmurillo/moq.analyzers/blob/main/docs/rules/{Diagnostics.NoMethodsInPropertySetupId}.md");

public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics
{
Expand Down
5 changes: 3 additions & 2 deletions Source/Moq.Analyzers/NoSealedClassMocksAnalyzer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@ namespace Moq.Analyzers;
[DiagnosticAnalyzer(LanguageNames.CSharp)]
public class NoSealedClassMocksAnalyzer : DiagnosticAnalyzer
{
private static readonly DiagnosticDescriptor Rule = new DiagnosticDescriptor(
private static readonly DiagnosticDescriptor Rule = new(
Diagnostics.NoSealedClassMocksId,
Diagnostics.NoSealedClassMocksTitle,
Diagnostics.NoSealedClassMocksMessage,
Diagnostics.Category,
DiagnosticSeverity.Warning,
isEnabledByDefault: true);
isEnabledByDefault: true,
helpLinkUri: $"https://github.com/rjmurillo/moq.analyzers/blob/main/docs/rules/{Diagnostics.NoSealedClassMocksId}.md");

public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@ namespace Moq.Analyzers;
[DiagnosticAnalyzer(LanguageNames.CSharp)]
public class SetupShouldBeUsedOnlyForOverridableMembersAnalyzer : DiagnosticAnalyzer
{
private static readonly DiagnosticDescriptor Rule = new DiagnosticDescriptor(
private static readonly DiagnosticDescriptor Rule = new(
Diagnostics.SetupShouldBeUsedOnlyForOverridableMembersId,
Diagnostics.SetupShouldBeUsedOnlyForOverridableMembersTitle,
Diagnostics.SetupShouldBeUsedOnlyForOverridableMembersMessage,
Diagnostics.Category,
DiagnosticSeverity.Error,
isEnabledByDefault: true);
isEnabledByDefault: true,
helpLinkUri: $"https://github.com/rjmurillo/moq.analyzers/blob/main/docs/rules/{Diagnostics.SetupShouldBeUsedOnlyForOverridableMembersId}.md");

public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(Rule);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@
[DiagnosticAnalyzer(LanguageNames.CSharp)]
public class SetupShouldNotIncludeAsyncResultAnalyzer : DiagnosticAnalyzer
{
private static readonly DiagnosticDescriptor Rule = new DiagnosticDescriptor(
private static readonly DiagnosticDescriptor Rule = new(
Diagnostics.SetupShouldNotIncludeAsyncResultId,
Diagnostics.SetupShouldNotIncludeAsyncResultTitle,
Diagnostics.SetupShouldNotIncludeAsyncResultMessage,
Diagnostics.Category,
DiagnosticSeverity.Error,
isEnabledByDefault: true);
isEnabledByDefault: true,
helpLinkUri: $"https://github.com/rjmurillo/moq.analyzers/blob/main/docs/rules/{Diagnostics.SetupShouldNotIncludeAsyncResultId}.md");

public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(Rule);

Expand Down