diff --git a/Source/Moq.Analyzers/AnalyzerReleases.Shipped.md b/Source/Moq.Analyzers/AnalyzerReleases.Shipped.md new file mode 100644 index 00000000..9486a405 --- /dev/null +++ b/Source/Moq.Analyzers/AnalyzerReleases.Shipped.md @@ -0,0 +1,61 @@ +; 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 + +## Release 0.0.4.43043 + +### New Rules + +Rule ID | Category | Severity | Notes +--------|----------|----------|------- +Moq1100 | Moq | Warning | CallbackSignatureShouldMatchMockedMethodAnalyzer +Moq1000 | Moq | Warning | ConstructorArgumentsShouldMatchAnalyzer + +## Release 0.0.6 + +### Removed Rules + +Rule ID | Category | Severity | Notes +--------|----------|----------|------- +Moq1003 | 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 diff --git a/Source/Moq.Analyzers/AnalyzerReleases.Unshipped.md b/Source/Moq.Analyzers/AnalyzerReleases.Unshipped.md new file mode 100644 index 00000000..6eea6190 --- /dev/null +++ b/Source/Moq.Analyzers/AnalyzerReleases.Unshipped.md @@ -0,0 +1,2 @@ +; Unshipped analyzer release +; https://github.com/dotnet/roslyn-analyzers/blob/main/src/Microsoft.CodeAnalysis.Analyzers/ReleaseTrackingAnalyzers.Help.md diff --git a/Source/Moq.Analyzers/AsShouldBeUsedOnlyForInterfaceAnalyzer.cs b/Source/Moq.Analyzers/AsShouldBeUsedOnlyForInterfaceAnalyzer.cs index d1edfa2a..a63be606 100644 --- a/Source/Moq.Analyzers/AsShouldBeUsedOnlyForInterfaceAnalyzer.cs +++ b/Source/Moq.Analyzers/AsShouldBeUsedOnlyForInterfaceAnalyzer.cs @@ -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 SupportedDiagnostics => ImmutableArray.Create(Rule); diff --git a/Source/Moq.Analyzers/CallbackSignatureShouldMatchMockedMethodAnalyzer.cs b/Source/Moq.Analyzers/CallbackSignatureShouldMatchMockedMethodAnalyzer.cs index 2b294dae..5212b0ec 100644 --- a/Source/Moq.Analyzers/CallbackSignatureShouldMatchMockedMethodAnalyzer.cs +++ b/Source/Moq.Analyzers/CallbackSignatureShouldMatchMockedMethodAnalyzer.cs @@ -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 SupportedDiagnostics { diff --git a/Source/Moq.Analyzers/ConstructorArgumentsShouldMatchAnalyzer.cs b/Source/Moq.Analyzers/ConstructorArgumentsShouldMatchAnalyzer.cs index 2f68714b..5e7fb836 100644 --- a/Source/Moq.Analyzers/ConstructorArgumentsShouldMatchAnalyzer.cs +++ b/Source/Moq.Analyzers/ConstructorArgumentsShouldMatchAnalyzer.cs @@ -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 SupportedDiagnostics { diff --git a/Source/Moq.Analyzers/NoConstructorArgumentsForInterfaceMockAnalyzer.cs b/Source/Moq.Analyzers/NoConstructorArgumentsForInterfaceMockAnalyzer.cs index 1f477f6a..46da7c41 100644 --- a/Source/Moq.Analyzers/NoConstructorArgumentsForInterfaceMockAnalyzer.cs +++ b/Source/Moq.Analyzers/NoConstructorArgumentsForInterfaceMockAnalyzer.cs @@ -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 SupportedDiagnostics { diff --git a/Source/Moq.Analyzers/NoMethodsInPropertySetupAnalyzer.cs b/Source/Moq.Analyzers/NoMethodsInPropertySetupAnalyzer.cs index c17d929d..1c870bee 100644 --- a/Source/Moq.Analyzers/NoMethodsInPropertySetupAnalyzer.cs +++ b/Source/Moq.Analyzers/NoMethodsInPropertySetupAnalyzer.cs @@ -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 SupportedDiagnostics { diff --git a/Source/Moq.Analyzers/NoSealedClassMocksAnalyzer.cs b/Source/Moq.Analyzers/NoSealedClassMocksAnalyzer.cs index fbd06adf..6f252d5d 100644 --- a/Source/Moq.Analyzers/NoSealedClassMocksAnalyzer.cs +++ b/Source/Moq.Analyzers/NoSealedClassMocksAnalyzer.cs @@ -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 SupportedDiagnostics { diff --git a/Source/Moq.Analyzers/SetupShouldBeUsedOnlyForOverridableMembersAnalyzer.cs b/Source/Moq.Analyzers/SetupShouldBeUsedOnlyForOverridableMembersAnalyzer.cs index d6971626..8d24a676 100644 --- a/Source/Moq.Analyzers/SetupShouldBeUsedOnlyForOverridableMembersAnalyzer.cs +++ b/Source/Moq.Analyzers/SetupShouldBeUsedOnlyForOverridableMembersAnalyzer.cs @@ -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 SupportedDiagnostics => ImmutableArray.Create(Rule); diff --git a/Source/Moq.Analyzers/SetupShouldNotIncludeAsyncResultAnalyzer.cs b/Source/Moq.Analyzers/SetupShouldNotIncludeAsyncResultAnalyzer.cs index cc294de5..0cf4b111 100644 --- a/Source/Moq.Analyzers/SetupShouldNotIncludeAsyncResultAnalyzer.cs +++ b/Source/Moq.Analyzers/SetupShouldNotIncludeAsyncResultAnalyzer.cs @@ -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 SupportedDiagnostics => ImmutableArray.Create(Rule);