diff --git a/doc/AG0001.md b/doc/AG0001.md index 7233417..6f2ad01 100644 --- a/doc/AG0001.md +++ b/doc/AG0001.md @@ -4,6 +4,8 @@ ID: AG0001 Type: Code Smell +https://agoda-com.github.io/standards-c-sharp/di/attribute-based-registration.html + Direct usage of `DependencyResolver` creates tight coupling and makes code harder to test. Dependencies should be explicitly declared through constructor injection, which promotes: - Better testability through clear dependency declaration diff --git a/doc/AG0003.md b/doc/AG0003.md index b9bfca1..7ab9c86 100644 --- a/doc/AG0003.md +++ b/doc/AG0003.md @@ -4,6 +4,8 @@ ID: AG0003 Type: Code Smell +https://agoda-com.github.io/standards-c-sharp/services/framework-abstractions.html + Passing `System.Web.HttpContext` as a parameter creates tight coupling to the web infrastructure and makes unit testing significantly more difficult. Instead, pass only the specific HttpContext properties that your code actually needs. #### Don't diff --git a/doc/AG0004.md b/doc/AG0004.md index 706c81b..ba97c97 100644 --- a/doc/AG0004.md +++ b/doc/AG0004.md @@ -4,6 +4,8 @@ ID: AG0004 Type: Bug +https://agoda-com.github.io/standards-c-sharp/reflection/hard-coded-strings.html + Hard-coded strings to identify namespaces and types make refactoring risky and move type resolution errors from compile-time to runtime. Always use the `typeof` operator to reference types, which provides compile-time safety. #### Don't diff --git a/doc/AG0005.md b/doc/AG0005.md index fe1367d..2e0c187 100644 --- a/doc/AG0005.md +++ b/doc/AG0005.md @@ -4,6 +4,8 @@ ID: AG0005 Type: Code Smell +https://agoda-com.github.io/standards-c-sharp/testing/test-method-names-should-clearly-indicate-what-they-are-testing.html + Test method names should clearly communicate what is being tested, under what conditions, and the expected outcome. This makes tests serve as documentation and helps quickly identify what failed when tests break. Test names should follow this pattern: diff --git a/doc/AG0010.md b/doc/AG0010.md index 3bce3cf..462b95b 100644 --- a/doc/AG0010.md +++ b/doc/AG0010.md @@ -4,6 +4,8 @@ ID: AG0010 Type: Code Smell +https://agoda-com.github.io/standards-c-sharp/unit-testing/be-wary-of-refactoring-tests.html + Test fixture inheritance should be avoided as it creates hidden dependencies, makes tests harder to understand, and violates the test isolation principle. Each test class should be independent and self-contained. #### Don't diff --git a/doc/AG0011.md b/doc/AG0011.md index 4e193d3..1414a02 100644 --- a/doc/AG0011.md +++ b/doc/AG0011.md @@ -4,6 +4,8 @@ ID: AG0011 Type: Code Smell +https://agoda-com.github.io/standards-c-sharp/services/framework-abstractions.html + Direct access to `QueryString` collection bypasses ASP.NET model binding, which provides validation, type conversion, and security features. Always use model binding with action method parameters instead. #### Don't diff --git a/doc/AG0012.md b/doc/AG0012.md index bdf5858..387e9c2 100644 --- a/doc/AG0012.md +++ b/doc/AG0012.md @@ -4,6 +4,8 @@ ID: AG0012 Type: Bug +https://agoda-com.github.io/standards-c-sharp/testing/tests-as-a-specification.html + Each test method should contain at least one assertion to verify expected behavior. Tests without assertions don't validate anything and provide a false sense of security. #### Don't diff --git a/doc/AG0013.md b/doc/AG0013.md index 054d63d..604775c 100644 --- a/doc/AG0013.md +++ b/doc/AG0013.md @@ -4,6 +4,8 @@ ID: AG0013 Type: Code Smell +https://agoda-com.github.io/standards-c-sharp/unit-testing/use-test-cases-appropriately.html + Test methods with too many input parameters become difficult to understand and maintain. When test cases need many parameters, split them into smaller, more focused tests with clear intentions. #### Don't diff --git a/doc/AG0018.md b/doc/AG0018.md index db4610b..0f84a8e 100644 --- a/doc/AG0018.md +++ b/doc/AG0018.md @@ -6,6 +6,8 @@ Type: Code Smell ## Summary +https://agoda-com.github.io/standards-c-sharp/collections/choosing-collection-implementation.html + Public methods and properties that return IEnumerable-implementing types must be declared using specific interface types rather than concrete implementations. ## Explanation diff --git a/doc/AG0019.md b/doc/AG0019.md index 78dfecf..3b81d2b 100644 --- a/doc/AG0019.md +++ b/doc/AG0019.md @@ -6,6 +6,8 @@ Type: Code Smell ## Summary +https://agoda-com.github.io/standards-c-sharp/unit-testing/only-test-the-public-interface.html + The `InternalsVisibleTo` attribute should not be used as it violates encapsulation principles and creates tight coupling between test code and implementation details. ## Explanation diff --git a/doc/AG0020.md b/doc/AG0020.md index 0889ab1..6c7ea04 100644 --- a/doc/AG0020.md +++ b/doc/AG0020.md @@ -6,6 +6,8 @@ Type: Bug / Code Smell ## Summary +https://agoda-com.github.io/standards-c-sharp/collections/null-empty-enumerables.html + Methods or properties returning `IEnumerable` types should never return null. Instead, return an empty collection. ## Explanation diff --git a/doc/AG0021.md b/doc/AG0021.md index 819f008..2fd634a 100644 --- a/doc/AG0021.md +++ b/doc/AG0021.md @@ -6,6 +6,8 @@ Type: Code Smell / Performance ## Summary +https://agoda-com.github.io/standards-c-sharp/async/consume-async-method.html + Always use the asynchronous version of a method when available. Using synchronous methods when async alternatives exist can impact performance and scalability. ## Explanation diff --git a/doc/AG0022.md b/doc/AG0022.md index 4cb84f3..db866e4 100644 --- a/doc/AG0022.md +++ b/doc/AG0022.md @@ -6,6 +6,8 @@ Type: Code Smell / API Design ## Summary +https://agoda-com.github.io/standards-c-sharp/async/expose-async-method.html + When designing APIs that perform I/O or CPU-intensive work, expose only the asynchronous version of the method. Never provide both synchronous and asynchronous versions of the same functionality. ## Explanation diff --git a/doc/AG0023.md b/doc/AG0023.md index 1df3463..fcd2d28 100644 --- a/doc/AG0023.md +++ b/doc/AG0023.md @@ -6,6 +6,8 @@ Type: Performance / Code Smell ## Summary +https://agoda-com.github.io/standards-c-sharp/async/avoid-blocking.html + Never use `Thread.Sleep()` for delays in code. Instead, use the asynchronous `Task.Delay()` to avoid blocking threads. ## Explanation diff --git a/doc/AG0024.md b/doc/AG0024.md index bc075d9..1090443 100644 --- a/doc/AG0024.md +++ b/doc/AG0024.md @@ -6,6 +6,8 @@ Type: Code Smell / Best Practice ## Summary +https://agoda-com.github.io/standards-c-sharp/async/task-run.html + Avoid using `Task.Factory.StartNew` as it's complex and error-prone. Use `Task.Run` for most scenarios as it provides safer defaults and clearer semantics. ## Explanation diff --git a/doc/AG0025.md b/doc/AG0025.md index ff83800..6a53272 100644 --- a/doc/AG0025.md +++ b/doc/AG0025.md @@ -6,6 +6,8 @@ Type: Code Smell / Best Practice ## Summary +https://agoda-com.github.io/standards-c-sharp/async/never-task-continue-with.html + Avoid using `Task.ContinueWith` as it has subtle and non-intuitive behaviors. Use the `await` keyword instead, which is clearer and safer. ## Explanation diff --git a/doc/AG0026.md b/doc/AG0026.md index 4c29f76..0e849e7 100644 --- a/doc/AG0026.md +++ b/doc/AG0026.md @@ -6,6 +6,8 @@ Type: Code Style / Best Practice ## Summary +https://agoda-com.github.io/standards-c-sharp/gui-testing/css-selectors.html + In Selenium tests, use CSS selectors instead of XPath to locate elements. CSS selectors are more familiar, easier to read, and maintain. ## Explanation diff --git a/doc/AG0027.md b/doc/AG0027.md index a208280..f981e27 100644 --- a/doc/AG0027.md +++ b/doc/AG0027.md @@ -6,6 +6,8 @@ Type: Best Practice ## Summary +https://agoda-com.github.io/standards-c-sharp/gui-testing/data-selenium.html + Use the `data-selenium` attribute to identify elements in Selenium tests rather than relying on HTML structure, classes, or IDs. This makes tests more resilient to UI changes. ## Explanation diff --git a/doc/AG0030.md b/doc/AG0030.md index b5e3875..35207c1 100644 --- a/doc/AG0030.md +++ b/doc/AG0030.md @@ -6,6 +6,8 @@ Type: Bug Risk / Code Smell ## Summary +https://agoda-com.github.io/standards-c-sharp/code-style/dynamics.html + The `dynamic` type should not be used in C# code. It bypasses compile-time type checking and reduces code reliability. ## Explanation diff --git a/doc/AG0032.md b/doc/AG0032.md index a4506e0..e9987c3 100644 --- a/doc/AG0032.md +++ b/doc/AG0032.md @@ -6,6 +6,8 @@ Type: Bug / Performance ## Summary +https://agoda-com.github.io/standards-c-sharp/async/never-task-wait.html + Avoid using blocking Task methods like `Task.Wait()`, `Task.WaitAll()`, and `Task.WaitAny()`. These methods block threads and can cause deadlocks. ## Explanation diff --git a/doc/AG0033.md b/doc/AG0033.md index 4bc7d5c..67059f1 100644 --- a/doc/AG0033.md +++ b/doc/AG0033.md @@ -6,6 +6,8 @@ Type: Bug / Performance ## Summary +https://agoda-com.github.io/standards-c-sharp/async/await-task-result.html + Never use `Task.Result` to get the result of a Task. Use `await` instead. `Task.Result` blocks the current thread and can cause deadlocks. ## Explanation diff --git a/doc/AG0035.md b/doc/AG0035.md index da2f50b..6a11e4b 100644 --- a/doc/AG0035.md +++ b/doc/AG0035.md @@ -6,6 +6,8 @@ Type: Code Smell / Architecture ## Summary +https://agoda-com.github.io/standards-c-sharp/configuration/machine-name.html + Avoid using `MachineName` in your code logic. Using machine names creates tight coupling to infrastructure and can lead to environment-specific bugs. ## Explanation diff --git a/doc/AG0038.md b/doc/AG0038.md index 85efd34..76e9b61 100644 --- a/doc/AG0038.md +++ b/doc/AG0038.md @@ -6,6 +6,8 @@ Type: Code Smell ## Summary +https://agoda-com.github.io/standards-c-sharp/code-style/regions.html + The `#region` directive should not be used to organize code. If you feel the need for regions, it's a sign that your code needs refactoring. ## Explanation diff --git a/doc/AG0039.md b/doc/AG0039.md index 30c8f93..d847917 100644 --- a/doc/AG0039.md +++ b/doc/AG0039.md @@ -6,6 +6,8 @@ Type: Code Smell ## Summary +https://github.com/agoda-com/AgodaAnalyzers/blob/master/src/Agoda.Analyzers/RuleContent/AG0039MethodLineLengthAnalyzer.html + Methods should be kept reasonably short (recommended max 40 lines excluding whitespace). Long methods should be refactored into smaller, more focused methods while avoiding method chaining. ## Explanation diff --git a/doc/AG0040.md b/doc/AG0040.md index 5c00674..ca89b3b 100644 --- a/doc/AG0040.md +++ b/doc/AG0040.md @@ -6,6 +6,8 @@ Type: Bug Risk / Test Reliability ## Summary +https://playwright.dev/dotnet/docs/api/class-page#page-go-back + Avoid using `WaitUntilState.NetworkIdle` in Playwright tests as it creates flaky tests. Instead, use explicit web assertions to verify page readiness. ## Explanation diff --git a/src/Agoda.Analyzers/AgodaCustom/AG0001DependencyResolverMustNotBeUsed.cs b/src/Agoda.Analyzers/AgodaCustom/AG0001DependencyResolverMustNotBeUsed.cs index d3e30c5..2e6b4be 100644 --- a/src/Agoda.Analyzers/AgodaCustom/AG0001DependencyResolverMustNotBeUsed.cs +++ b/src/Agoda.Analyzers/AgodaCustom/AG0001DependencyResolverMustNotBeUsed.cs @@ -39,7 +39,7 @@ private static readonly LocalizableString Description DiagnosticSeverity.Warning, AnalyzerConstants.EnabledByDefault, Description, - "https://agoda-com.github.io/standards-c-sharp/di/attribute-based-registration.html", + $"https://github.com/agoda-com/AgodaAnalyzers/blob/master/doc/{DIAGNOSTIC_ID}.md", WellKnownDiagnosticTags.EditAndContinue); protected override IEnumerable Rules => new[] diff --git a/src/Agoda.Analyzers/AgodaCustom/AG0002PrivateMethodsShouldNotBeTested.cs b/src/Agoda.Analyzers/AgodaCustom/AG0002PrivateMethodsShouldNotBeTested.cs index 5d16df3..6fe79c2 100644 --- a/src/Agoda.Analyzers/AgodaCustom/AG0002PrivateMethodsShouldNotBeTested.cs +++ b/src/Agoda.Analyzers/AgodaCustom/AG0002PrivateMethodsShouldNotBeTested.cs @@ -33,7 +33,8 @@ private static readonly LocalizableString Description AnalyzerCategory.CustomQualityRules, DiagnosticSeverity.Warning, isEnabledByDefault: true, - description: Description + description: Description, + $"https://github.com/agoda-com/AgodaAnalyzers/blob/master/doc/{DIAGNOSTIC_ID}.md" ); public override ImmutableArray SupportedDiagnostics => ImmutableArray.Create(Rule); diff --git a/src/Agoda.Analyzers/AgodaCustom/AG0003HttpContextCannotBePassedAsMethodArgument.cs b/src/Agoda.Analyzers/AgodaCustom/AG0003HttpContextCannotBePassedAsMethodArgument.cs index 75e0ca7..574878a 100644 --- a/src/Agoda.Analyzers/AgodaCustom/AG0003HttpContextCannotBePassedAsMethodArgument.cs +++ b/src/Agoda.Analyzers/AgodaCustom/AG0003HttpContextCannotBePassedAsMethodArgument.cs @@ -34,8 +34,8 @@ private static readonly LocalizableString Description AnalyzerCategory.CustomQualityRules, DiagnosticSeverity.Warning, AnalyzerConstants.EnabledByDefault, - Description, - "https://agoda-com.github.io/standards-c-sharp/services/framework-abstractions.html", + Description, + $"https://github.com/agoda-com/AgodaAnalyzers/blob/master/doc/{DIAGNOSTIC_ID}.md", WellKnownDiagnosticTags.EditAndContinue); public override ImmutableArray SupportedDiagnostics => ImmutableArray.Create(Descriptor); diff --git a/src/Agoda.Analyzers/AgodaCustom/AG0004DoNotUseHardCodedStringsToIdentifyTypes.cs b/src/Agoda.Analyzers/AgodaCustom/AG0004DoNotUseHardCodedStringsToIdentifyTypes.cs index 011af20..9e1b3ea 100644 --- a/src/Agoda.Analyzers/AgodaCustom/AG0004DoNotUseHardCodedStringsToIdentifyTypes.cs +++ b/src/Agoda.Analyzers/AgodaCustom/AG0004DoNotUseHardCodedStringsToIdentifyTypes.cs @@ -34,8 +34,8 @@ public class AG0004DoNotUseHardCodedStringsToIdentifyTypes : DiagnosticAnalyzer AnalyzerCategory.CustomQualityRules, DiagnosticSeverity.Warning, AnalyzerConstants.EnabledByDefault, - Description, - "https://agoda-com.github.io/standards-c-sharp/reflection/hard-coded-strings.html", + Description, + $"https://github.com/agoda-com/AgodaAnalyzers/blob/master/doc/{DIAGNOSTIC_ID}.md", WellKnownDiagnosticTags.EditAndContinue); public override ImmutableArray SupportedDiagnostics => ImmutableArray.Create(Descriptor); diff --git a/src/Agoda.Analyzers/AgodaCustom/AG0005TestMethodNamesMustFollowConvention.cs b/src/Agoda.Analyzers/AgodaCustom/AG0005TestMethodNamesMustFollowConvention.cs index 3e5f643..620ca25 100644 --- a/src/Agoda.Analyzers/AgodaCustom/AG0005TestMethodNamesMustFollowConvention.cs +++ b/src/Agoda.Analyzers/AgodaCustom/AG0005TestMethodNamesMustFollowConvention.cs @@ -35,8 +35,8 @@ public class AG0005TestMethodNamesMustFollowConvention : DiagnosticAnalyzer AnalyzerCategory.CustomQualityRules, DiagnosticSeverity.Warning, AnalyzerConstants.EnabledByDefault, - Description, - "https://agoda-com.github.io/standards-c-sharp/testing/test-method-names-should-clearly-indicate-what-they-are-testing.html", + Description, + $"https://github.com/agoda-com/AgodaAnalyzers/blob/master/doc/{DIAGNOSTIC_ID}.md", WellKnownDiagnosticTags.EditAndContinue); // Test names must be in the format Xxxx_Yyyy or Xxxx_Yyyy_Zzzz diff --git a/src/Agoda.Analyzers/AgodaCustom/AG0006RegisteredComponentShouldHaveExactlyOnePublicConstructor.cs b/src/Agoda.Analyzers/AgodaCustom/AG0006RegisteredComponentShouldHaveExactlyOnePublicConstructor.cs index d487d52..1182c6d 100644 --- a/src/Agoda.Analyzers/AgodaCustom/AG0006RegisteredComponentShouldHaveExactlyOnePublicConstructor.cs +++ b/src/Agoda.Analyzers/AgodaCustom/AG0006RegisteredComponentShouldHaveExactlyOnePublicConstructor.cs @@ -37,8 +37,8 @@ public class AG0006RegisteredComponentShouldHaveExactlyOnePublicConstructor : Di AnalyzerCategory.CustomQualityRules, DiagnosticSeverity.Warning, AnalyzerConstants.EnabledByDefault, - Description, - null, + Description, + $"https://github.com/agoda-com/AgodaAnalyzers/blob/master/doc/{DIAGNOSTIC_ID}.md", WellKnownDiagnosticTags.EditAndContinue); public override void Initialize(AnalysisContext context) diff --git a/src/Agoda.Analyzers/AgodaCustom/AG0009IHttpContextAccessorCannotBePassedAsMethodArgument.cs b/src/Agoda.Analyzers/AgodaCustom/AG0009IHttpContextAccessorCannotBePassedAsMethodArgument.cs index 4e613da..588ffa7 100644 --- a/src/Agoda.Analyzers/AgodaCustom/AG0009IHttpContextAccessorCannotBePassedAsMethodArgument.cs +++ b/src/Agoda.Analyzers/AgodaCustom/AG0009IHttpContextAccessorCannotBePassedAsMethodArgument.cs @@ -30,7 +30,7 @@ public class AG0009IHttpContextAccessorCannotBePassedAsMethodArgument : Diagnost private static readonly DiagnosticDescriptor Descriptor = new DiagnosticDescriptor(DIAGNOSTIC_ID, Title, MessageFormat, AnalyzerCategory.CustomQualityRules, - DiagnosticSeverity.Warning, AnalyzerConstants.EnabledByDefault, Description, null, + DiagnosticSeverity.Warning, AnalyzerConstants.EnabledByDefault, Description, $"https://github.com/agoda-com/AgodaAnalyzers/blob/master/doc/{DIAGNOSTIC_ID}.md", WellKnownDiagnosticTags.EditAndContinue); public override ImmutableArray SupportedDiagnostics => ImmutableArray.Create(Descriptor); diff --git a/src/Agoda.Analyzers/AgodaCustom/AG0010PreventTestFixtureInheritance.cs b/src/Agoda.Analyzers/AgodaCustom/AG0010PreventTestFixtureInheritance.cs index fa55de5..d69dcdc 100644 --- a/src/Agoda.Analyzers/AgodaCustom/AG0010PreventTestFixtureInheritance.cs +++ b/src/Agoda.Analyzers/AgodaCustom/AG0010PreventTestFixtureInheritance.cs @@ -36,7 +36,7 @@ public class AG0010PreventTestFixtureInheritance : DiagnosticAnalyzer DiagnosticSeverity.Warning, AnalyzerConstants.EnabledByDefault, Description, - "https://agoda-com.github.io/standards-c-sharp/unit-testing/be-wary-of-refactoring-tests.html", + $"https://github.com/agoda-com/AgodaAnalyzers/blob/master/doc/{DIAGNOSTIC_ID}.md", WellKnownDiagnosticTags.EditAndContinue); public override void Initialize(AnalysisContext context) diff --git a/src/Agoda.Analyzers/AgodaCustom/AG0011NoDirectQueryStringAccess.cs b/src/Agoda.Analyzers/AgodaCustom/AG0011NoDirectQueryStringAccess.cs index 793d60c..a49c6c7 100644 --- a/src/Agoda.Analyzers/AgodaCustom/AG0011NoDirectQueryStringAccess.cs +++ b/src/Agoda.Analyzers/AgodaCustom/AG0011NoDirectQueryStringAccess.cs @@ -33,7 +33,7 @@ public class AG0011NoDirectQueryStringAccess : PropertyInvocationAnalyzerBase DiagnosticSeverity.Error, AnalyzerConstants.EnabledByDefault, DescriptionContentLoader.GetAnalyzerDescription(nameof(AG0011NoDirectQueryStringAccess)), - "https://agoda-com.github.io/standards-c-sharp/services/framework-abstractions.html", + $"https://github.com/agoda-com/AgodaAnalyzers/blob/master/doc/{DIAGNOSTIC_ID}.md", WellKnownDiagnosticTags.EditAndContinue); protected override IEnumerable Rules => new[] diff --git a/src/Agoda.Analyzers/AgodaCustom/AG0012TestMethodMustContainAtLeastOneAssertion.cs b/src/Agoda.Analyzers/AgodaCustom/AG0012TestMethodMustContainAtLeastOneAssertion.cs index 9ae1f00..cea7766 100644 --- a/src/Agoda.Analyzers/AgodaCustom/AG0012TestMethodMustContainAtLeastOneAssertion.cs +++ b/src/Agoda.Analyzers/AgodaCustom/AG0012TestMethodMustContainAtLeastOneAssertion.cs @@ -36,7 +36,7 @@ private static readonly LocalizableString Description DiagnosticSeverity.Warning, AnalyzerConstants.EnabledByDefault, Description, - "https://agoda-com.github.io/standards-c-sharp/testing/tests-as-a-specification.html", + $"https://github.com/agoda-com/AgodaAnalyzers/blob/master/doc/{DIAGNOSTIC_ID}.md", WellKnownDiagnosticTags.EditAndContinue); public override ImmutableArray SupportedDiagnostics { get; } = ImmutableArray.Create(Descriptor); diff --git a/src/Agoda.Analyzers/AgodaCustom/AG0013LimitNumberOfTestMethodParametersTo5.cs b/src/Agoda.Analyzers/AgodaCustom/AG0013LimitNumberOfTestMethodParametersTo5.cs index d327b40..c7b15f8 100644 --- a/src/Agoda.Analyzers/AgodaCustom/AG0013LimitNumberOfTestMethodParametersTo5.cs +++ b/src/Agoda.Analyzers/AgodaCustom/AG0013LimitNumberOfTestMethodParametersTo5.cs @@ -31,8 +31,8 @@ public AG0013LimitNumberOfTestMethodParametersTo5() AnalyzerCategory.CustomQualityRules, DiagnosticSeverity.Warning, AnalyzerConstants.EnabledByDefault, - DescriptionContentLoader.GetAnalyzerDescription(nameof(AG0013LimitNumberOfTestMethodParametersTo5)), - "https://agoda-com.github.io/standards-c-sharp/unit-testing/use-test-cases-appropriately.html", + DescriptionContentLoader.GetAnalyzerDescription(nameof(AG0013LimitNumberOfTestMethodParametersTo5)), + $"https://github.com/agoda-com/AgodaAnalyzers/blob/master/doc/{DIAGNOSTIC_ID}.md", WellKnownDiagnosticTags.EditAndContinue ); } diff --git a/src/Agoda.Analyzers/AgodaCustom/AG0018PermitOnlyCertainPubliclyExposedEnumerables.cs b/src/Agoda.Analyzers/AgodaCustom/AG0018PermitOnlyCertainPubliclyExposedEnumerables.cs index 3256c63..52d05a1 100644 --- a/src/Agoda.Analyzers/AgodaCustom/AG0018PermitOnlyCertainPubliclyExposedEnumerables.cs +++ b/src/Agoda.Analyzers/AgodaCustom/AG0018PermitOnlyCertainPubliclyExposedEnumerables.cs @@ -48,8 +48,8 @@ private static readonly LocalizableString Description AnalyzerCategory.CustomQualityRules, DiagnosticSeverity.Warning, AnalyzerConstants.EnabledByDefault, - Description, - "https://agoda-com.github.io/standards-c-sharp/collections/choosing-collection-implementation.html", + Description, + $"https://github.com/agoda-com/AgodaAnalyzers/blob/master/doc/{DIAGNOSTIC_ID}.md", WellKnownDiagnosticTags.EditAndContinue); public override ImmutableArray SupportedDiagnostics { get; } = ImmutableArray.Create(Descriptor); diff --git a/src/Agoda.Analyzers/AgodaCustom/AG0019PreventUseOfInternalsVisibleToAttribute.cs b/src/Agoda.Analyzers/AgodaCustom/AG0019PreventUseOfInternalsVisibleToAttribute.cs index 50fd877..12d7da1 100644 --- a/src/Agoda.Analyzers/AgodaCustom/AG0019PreventUseOfInternalsVisibleToAttribute.cs +++ b/src/Agoda.Analyzers/AgodaCustom/AG0019PreventUseOfInternalsVisibleToAttribute.cs @@ -29,7 +29,7 @@ public AG0019PreventUseOfInternalsVisibleToAttribute() DiagnosticSeverity.Error, AnalyzerConstants.EnabledByDefault, DescriptionContentLoader.GetAnalyzerDescription(nameof(AG0019PreventUseOfInternalsVisibleToAttribute)), - "https://agoda-com.github.io/standards-c-sharp/unit-testing/only-test-the-public-interface.html", + $"https://github.com/agoda-com/AgodaAnalyzers/blob/master/doc/{DIAGNOSTIC_ID}.md", WellKnownDiagnosticTags.EditAndContinue); } diff --git a/src/Agoda.Analyzers/AgodaCustom/AG0020AvoidReturningNullEnumerables.cs b/src/Agoda.Analyzers/AgodaCustom/AG0020AvoidReturningNullEnumerables.cs index 2319f58..19b2e24 100644 --- a/src/Agoda.Analyzers/AgodaCustom/AG0020AvoidReturningNullEnumerables.cs +++ b/src/Agoda.Analyzers/AgodaCustom/AG0020AvoidReturningNullEnumerables.cs @@ -34,8 +34,8 @@ private static readonly LocalizableString Description AnalyzerCategory.CustomQualityRules, DiagnosticSeverity.Warning, AnalyzerConstants.EnabledByDefault, - Description, - "https://agoda-com.github.io/standards-c-sharp/collections/null-empty-enumerables.html", + Description, + $"https://github.com/agoda-com/AgodaAnalyzers/blob/master/doc/{DIAGNOSTIC_ID}.md", WellKnownDiagnosticTags.EditAndContinue); public override void Initialize(AnalysisContext context) diff --git a/src/Agoda.Analyzers/AgodaCustom/AG0021PreferAsyncMethods.cs b/src/Agoda.Analyzers/AgodaCustom/AG0021PreferAsyncMethods.cs index ab9f761..1e4f9fc 100644 --- a/src/Agoda.Analyzers/AgodaCustom/AG0021PreferAsyncMethods.cs +++ b/src/Agoda.Analyzers/AgodaCustom/AG0021PreferAsyncMethods.cs @@ -35,8 +35,8 @@ public class AG0021PreferAsyncMethods : DiagnosticAnalyzer AnalyzerCategory.CustomQualityRules, DiagnosticSeverity.Info, AnalyzerConstants.EnabledByDefault, - Description, - "https://agoda-com.github.io/standards-c-sharp/async/consume-async-method.html", + Description, + $"https://github.com/agoda-com/AgodaAnalyzers/blob/master/doc/{DIAGNOSTIC_ID}.md", WellKnownDiagnosticTags.EditAndContinue); public override void Initialize(AnalysisContext context) diff --git a/src/Agoda.Analyzers/AgodaCustom/AG0022DoNotExposeBothSyncAndAsyncVersionsOfMethods.cs b/src/Agoda.Analyzers/AgodaCustom/AG0022DoNotExposeBothSyncAndAsyncVersionsOfMethods.cs index a9a4cb2..3cfad9d 100644 --- a/src/Agoda.Analyzers/AgodaCustom/AG0022DoNotExposeBothSyncAndAsyncVersionsOfMethods.cs +++ b/src/Agoda.Analyzers/AgodaCustom/AG0022DoNotExposeBothSyncAndAsyncVersionsOfMethods.cs @@ -39,8 +39,8 @@ public class AG0022DoNotExposeBothSyncAndAsyncVersionsOfMethods : DiagnosticAnal AnalyzerCategory.CustomQualityRules, DiagnosticSeverity.Warning, AnalyzerConstants.EnabledByDefault, - Description, - "https://agoda-com.github.io/standards-c-sharp/async/expose-async-method.html", + Description, + $"https://github.com/agoda-com/AgodaAnalyzers/blob/master/doc/{DIAGNOSTIC_ID}.md", WellKnownDiagnosticTags.EditAndContinue); public override ImmutableArray SupportedDiagnostics => ImmutableArray.Create(Descriptor); diff --git a/src/Agoda.Analyzers/AgodaCustom/AG0023PreventUseOfThreadSleep.cs b/src/Agoda.Analyzers/AgodaCustom/AG0023PreventUseOfThreadSleep.cs index d545b43..295e8b6 100644 --- a/src/Agoda.Analyzers/AgodaCustom/AG0023PreventUseOfThreadSleep.cs +++ b/src/Agoda.Analyzers/AgodaCustom/AG0023PreventUseOfThreadSleep.cs @@ -35,7 +35,7 @@ public class AG0023PreventUseOfThreadSleep : MethodInvocationAnalyzerBase DiagnosticSeverity.Warning, AnalyzerConstants.EnabledByDefault, nameof(AG0023PreventUseOfThreadSleep), - "https://agoda-com.github.io/standards-c-sharp/async/avoid-blocking.html", + $"https://github.com/agoda-com/AgodaAnalyzers/blob/master/doc/{DIAGNOSTIC_ID}.md", WellKnownDiagnosticTags.EditAndContinue); diff --git a/src/Agoda.Analyzers/AgodaCustom/AG0024PreventUseOfTaskFactoryStartNew.cs b/src/Agoda.Analyzers/AgodaCustom/AG0024PreventUseOfTaskFactoryStartNew.cs index b1c7c6b..5943fb9 100644 --- a/src/Agoda.Analyzers/AgodaCustom/AG0024PreventUseOfTaskFactoryStartNew.cs +++ b/src/Agoda.Analyzers/AgodaCustom/AG0024PreventUseOfTaskFactoryStartNew.cs @@ -32,7 +32,7 @@ public class AG0024PreventUseOfTaskFactoryStartNew : DiagnosticAnalyzer DiagnosticSeverity.Warning, AnalyzerConstants.EnabledByDefault, Description, - "https://agoda-com.github.io/standards-c-sharp/async/task-run.html", + $"https://github.com/agoda-com/AgodaAnalyzers/blob/master/doc/{DIAGNOSTIC_ID}.md", WellKnownDiagnosticTags.EditAndContinue); public override ImmutableArray SupportedDiagnostics => ImmutableArray.Create(Descriptor); diff --git a/src/Agoda.Analyzers/AgodaCustom/AG0025PreventUseOfTaskContinue.cs b/src/Agoda.Analyzers/AgodaCustom/AG0025PreventUseOfTaskContinue.cs index 5e631a7..4f4e451 100644 --- a/src/Agoda.Analyzers/AgodaCustom/AG0025PreventUseOfTaskContinue.cs +++ b/src/Agoda.Analyzers/AgodaCustom/AG0025PreventUseOfTaskContinue.cs @@ -36,8 +36,8 @@ public class AG0025PreventUseOfTaskContinue : MethodInvocationAnalyzerBase AnalyzerCategory.CustomQualityRules, DiagnosticSeverity.Warning, AnalyzerConstants.EnabledByDefault, - Description, - "https://agoda-com.github.io/standards-c-sharp/async/never-task-continue-with.html", + Description, + $"https://github.com/agoda-com/AgodaAnalyzers/blob/master/doc/{DIAGNOSTIC_ID}.md", WellKnownDiagnosticTags.EditAndContinue); protected override IEnumerable Rules => new[] diff --git a/src/Agoda.Analyzers/AgodaCustom/AG0026EnsureOnlyCssSelectorIsUsedToFindElements.cs b/src/Agoda.Analyzers/AgodaCustom/AG0026EnsureOnlyCssSelectorIsUsedToFindElements.cs index 3483ed3..ae370de 100644 --- a/src/Agoda.Analyzers/AgodaCustom/AG0026EnsureOnlyCssSelectorIsUsedToFindElements.cs +++ b/src/Agoda.Analyzers/AgodaCustom/AG0026EnsureOnlyCssSelectorIsUsedToFindElements.cs @@ -25,7 +25,7 @@ public class AG0026EnsureOnlyCssSelectorIsUsedToFindElements : MethodInvocationA DiagnosticSeverity.Warning, AnalyzerConstants.EnabledByDefault, DescriptionContentLoader.GetAnalyzerDescription(nameof(AG0026EnsureOnlyCssSelectorIsUsedToFindElements)), - "https://agoda-com.github.io/standards-c-sharp/gui-testing/css-selectors.html", + $"https://github.com/agoda-com/AgodaAnalyzers/blob/master/doc/{DIAGNOSTIC_ID}.md", WellKnownDiagnosticTags.EditAndContinue); protected override IEnumerable Rules => TestMethodHelpers.PermittedSeleniumAccessors; diff --git a/src/Agoda.Analyzers/AgodaCustom/AG0027EnsureOnlyDataSeleniumIsUsedToFindElements.cs b/src/Agoda.Analyzers/AgodaCustom/AG0027EnsureOnlyDataSeleniumIsUsedToFindElements.cs index fa6855a..662f9db 100644 --- a/src/Agoda.Analyzers/AgodaCustom/AG0027EnsureOnlyDataSeleniumIsUsedToFindElements.cs +++ b/src/Agoda.Analyzers/AgodaCustom/AG0027EnsureOnlyDataSeleniumIsUsedToFindElements.cs @@ -33,7 +33,7 @@ public class AG0027EnsureOnlyDataSeleniumIsUsedToFindElements : DiagnosticAnalyz DiagnosticSeverity.Warning, AnalyzerConstants.EnabledByDefault, DescriptionContentLoader.GetAnalyzerDescription(nameof(AG0027EnsureOnlyDataSeleniumIsUsedToFindElements)), - "https://agoda-com.github.io/standards-c-sharp/gui-testing/data-selenium.html", + $"https://github.com/agoda-com/AgodaAnalyzers/blob/master/doc/{DIAGNOSTIC_ID}.md", WellKnownDiagnosticTags.EditAndContinue); public override ImmutableArray SupportedDiagnostics => ImmutableArray.Create(Descriptor); diff --git a/src/Agoda.Analyzers/AgodaCustom/AG0030PreventUseOfDynamics.cs b/src/Agoda.Analyzers/AgodaCustom/AG0030PreventUseOfDynamics.cs index 693e71d..43511b4 100644 --- a/src/Agoda.Analyzers/AgodaCustom/AG0030PreventUseOfDynamics.cs +++ b/src/Agoda.Analyzers/AgodaCustom/AG0030PreventUseOfDynamics.cs @@ -35,7 +35,7 @@ public class AG0030PreventUseOfDynamics : DiagnosticAnalyzer DiagnosticSeverity.Warning, AnalyzerConstants.EnabledByDefault, Description, - "https://agoda-com.github.io/standards-c-sharp/code-style/dynamics.html", + $"https://github.com/agoda-com/AgodaAnalyzers/blob/master/doc/{DIAGNOSTIC_ID}.md", WellKnownDiagnosticTags.EditAndContinue); public override void Initialize(AnalysisContext context) diff --git a/src/Agoda.Analyzers/AgodaCustom/AG0032PreventUseOfBlockingTaskMethods.cs b/src/Agoda.Analyzers/AgodaCustom/AG0032PreventUseOfBlockingTaskMethods.cs index 440b936..5ca2289 100644 --- a/src/Agoda.Analyzers/AgodaCustom/AG0032PreventUseOfBlockingTaskMethods.cs +++ b/src/Agoda.Analyzers/AgodaCustom/AG0032PreventUseOfBlockingTaskMethods.cs @@ -36,7 +36,7 @@ public class AG0032PreventUseOfBlockingTaskMethods : PropertyInvocationAnalyzerB DiagnosticSeverity.Error, AnalyzerConstants.EnabledByDefault, DescriptionContentLoader.GetAnalyzerDescription(nameof(AG0032PreventUseOfBlockingTaskMethods)), - "https://agoda-com.github.io/standards-c-sharp/async/never-task-wait.html", + $"https://github.com/agoda-com/AgodaAnalyzers/blob/master/doc/{DIAGNOSTIC_ID}.md", WellKnownDiagnosticTags.EditAndContinue); protected override IEnumerable Rules => new[] diff --git a/src/Agoda.Analyzers/AgodaCustom/AG0033PreventUseOfTaskResult.cs b/src/Agoda.Analyzers/AgodaCustom/AG0033PreventUseOfTaskResult.cs index 97a7330..a57d11e 100644 --- a/src/Agoda.Analyzers/AgodaCustom/AG0033PreventUseOfTaskResult.cs +++ b/src/Agoda.Analyzers/AgodaCustom/AG0033PreventUseOfTaskResult.cs @@ -36,7 +36,7 @@ public class AG0033PreventUseOfTaskResult : PropertyInvocationAnalyzerBase DiagnosticSeverity.Error, AnalyzerConstants.EnabledByDefault, DescriptionContentLoader.GetAnalyzerDescription(nameof(AG0033PreventUseOfTaskResult)), - "https://agoda-com.github.io/standards-c-sharp/async/await-task-result.html", + $"https://github.com/agoda-com/AgodaAnalyzers/blob/master/doc/{DIAGNOSTIC_ID}.md", WellKnownDiagnosticTags.EditAndContinue); protected override IEnumerable Rules => new[] diff --git a/src/Agoda.Analyzers/AgodaCustom/AG0035PreventUseOfMachineName.cs b/src/Agoda.Analyzers/AgodaCustom/AG0035PreventUseOfMachineName.cs index 6c38230..de86f45 100644 --- a/src/Agoda.Analyzers/AgodaCustom/AG0035PreventUseOfMachineName.cs +++ b/src/Agoda.Analyzers/AgodaCustom/AG0035PreventUseOfMachineName.cs @@ -31,7 +31,7 @@ public class AG0035PreventUseOfMachineName : PropertyInvocationAnalyzerBase DiagnosticSeverity.Error, AnalyzerConstants.EnabledByDefault, DescriptionContentLoader.GetAnalyzerDescription(nameof(AG0035PreventUseOfMachineName)), - "https://agoda-com.github.io/standards-c-sharp/configuration/machine-name.html", + $"https://github.com/agoda-com/AgodaAnalyzers/blob/master/doc/{DIAGNOSTIC_ID}.md", WellKnownDiagnosticTags.EditAndContinue); protected override IEnumerable Rules => new[] diff --git a/src/Agoda.Analyzers/AgodaCustom/AG0037EnsureSeleniumTestHasOwnedByAttribute.cs b/src/Agoda.Analyzers/AgodaCustom/AG0037EnsureSeleniumTestHasOwnedByAttribute.cs index 2856fa5..f874e32 100644 --- a/src/Agoda.Analyzers/AgodaCustom/AG0037EnsureSeleniumTestHasOwnedByAttribute.cs +++ b/src/Agoda.Analyzers/AgodaCustom/AG0037EnsureSeleniumTestHasOwnedByAttribute.cs @@ -42,7 +42,7 @@ public class AG0037EnsureSeleniumTestHasOwnedByAttribute : DiagnosticAnalyzer DiagnosticSeverity.Error, AnalyzerConstants.EnabledByDefault, DescriptionContentLoader.GetAnalyzerDescription(nameof(AG0037EnsureSeleniumTestHasOwnedByAttribute)), - null, + $"https://github.com/agoda-com/AgodaAnalyzers/blob/master/doc/{DIAGNOSTIC_ID}.md", WellKnownDiagnosticTags.EditAndContinue); public override ImmutableArray SupportedDiagnostics => ImmutableArray.Create(Descriptor); diff --git a/src/Agoda.Analyzers/AgodaCustom/AG0038PreventUseOfRegionPreprocessorDirective.cs b/src/Agoda.Analyzers/AgodaCustom/AG0038PreventUseOfRegionPreprocessorDirective.cs index 3e15b85..9246c08 100644 --- a/src/Agoda.Analyzers/AgodaCustom/AG0038PreventUseOfRegionPreprocessorDirective.cs +++ b/src/Agoda.Analyzers/AgodaCustom/AG0038PreventUseOfRegionPreprocessorDirective.cs @@ -34,8 +34,8 @@ private static readonly LocalizableString Description AnalyzerCategory.CustomQualityRules, DiagnosticSeverity.Warning, AnalyzerConstants.EnabledByDefault, - Description, - "https://agoda-com.github.io/standards-c-sharp/code-style/regions.html", + Description, + $"https://github.com/agoda-com/AgodaAnalyzers/blob/master/doc/{DIAGNOSTIC_ID}.md", WellKnownDiagnosticTags.EditAndContinue); public override ImmutableArray SupportedDiagnostics => ImmutableArray.Create(Descriptor); diff --git a/src/Agoda.Analyzers/AgodaCustom/AG0039MethodLineLengthAnalyzer.cs b/src/Agoda.Analyzers/AgodaCustom/AG0039MethodLineLengthAnalyzer.cs index e9f5df6..b9866c5 100644 --- a/src/Agoda.Analyzers/AgodaCustom/AG0039MethodLineLengthAnalyzer.cs +++ b/src/Agoda.Analyzers/AgodaCustom/AG0039MethodLineLengthAnalyzer.cs @@ -39,7 +39,7 @@ private static readonly LocalizableString Description Category, DiagnosticSeverity.Hidden, // THis rule should be opt in and not on by default isEnabledByDefault: true, - helpLinkUri: "https://github.com/agoda-com/AgodaAnalyzers/blob/master/src/Agoda.Analyzers/RuleContent/AG0039MethodLineLengthAnalyzer.html"); + helpLinkUri: $"https://github.com/agoda-com/AgodaAnalyzers/blob/master/doc/{DIAGNOSTIC_ID}.md"); public override ImmutableArray SupportedDiagnostics { get { return ImmutableArray.Create(Descriptor); } } diff --git a/src/Agoda.Analyzers/AgodaCustom/AG0040WaitUntilStateNetworkIdleMustNotBeUsed.cs b/src/Agoda.Analyzers/AgodaCustom/AG0040WaitUntilStateNetworkIdleMustNotBeUsed.cs index 46edcdc..26f5824 100644 --- a/src/Agoda.Analyzers/AgodaCustom/AG0040WaitUntilStateNetworkIdleMustNotBeUsed.cs +++ b/src/Agoda.Analyzers/AgodaCustom/AG0040WaitUntilStateNetworkIdleMustNotBeUsed.cs @@ -34,7 +34,7 @@ private static readonly LocalizableString Description DiagnosticSeverity.Error, AnalyzerConstants.EnabledByDefault, Description, - "https://playwright.dev/dotnet/docs/api/class-page#page-go-back", + $"https://github.com/agoda-com/AgodaAnalyzers/blob/master/doc/{DIAGNOSTIC_ID}.md", WellKnownDiagnosticTags.EditAndContinue); protected override IEnumerable Rules => new[] diff --git a/src/Agoda.Analyzers/AgodaCustom/AG0041CodeFixProvider.cs b/src/Agoda.Analyzers/AgodaCustom/AG0041CodeFixProvider.cs index 7df9a3c..588be5d 100644 --- a/src/Agoda.Analyzers/AgodaCustom/AG0041CodeFixProvider.cs +++ b/src/Agoda.Analyzers/AgodaCustom/AG0041CodeFixProvider.cs @@ -17,7 +17,7 @@ public class AG0041CodeFixProvider : CodeFixProvider { private const string Title = "Use message template"; - public sealed override ImmutableArray FixableDiagnosticIds => ImmutableArray.Create(AG0041LogTemplateAnalyzer.DiagnosticId); + public sealed override ImmutableArray FixableDiagnosticIds => ImmutableArray.Create(AG0041LogTemplateAnalyzer.DIAGNOSTIC_ID); public sealed override FixAllProvider GetFixAllProvider() => WellKnownFixAllProviders.BatchFixer; diff --git a/src/Agoda.Analyzers/AgodaCustom/AG0041LogTemplateAnalyzer.cs b/src/Agoda.Analyzers/AgodaCustom/AG0041LogTemplateAnalyzer.cs index 4f665f5..1d7b296 100644 --- a/src/Agoda.Analyzers/AgodaCustom/AG0041LogTemplateAnalyzer.cs +++ b/src/Agoda.Analyzers/AgodaCustom/AG0041LogTemplateAnalyzer.cs @@ -11,19 +11,19 @@ namespace Agoda.Analyzers.AgodaCustom [DiagnosticAnalyzer(LanguageNames.CSharp)] public class AG0041LogTemplateAnalyzer : DiagnosticAnalyzer { - public const string DiagnosticId = "AG0041"; + public const string DIAGNOSTIC_ID = "AG0041"; private static readonly LocalizableString Title = new LocalizableResourceString(nameof(CustomRulesResources.AG0041Title), CustomRulesResources.ResourceManager, typeof(CustomRulesResources)); private static readonly LocalizableString MessageFormat = new LocalizableResourceString(nameof(CustomRulesResources.AG0041Title), CustomRulesResources.ResourceManager, typeof(CustomRulesResources)); private const string Category = "Best Practices"; - internal static readonly DiagnosticDescriptor Rule = new DiagnosticDescriptor(DiagnosticId, + internal static readonly DiagnosticDescriptor Rule = new DiagnosticDescriptor(DIAGNOSTIC_ID, Title, MessageFormat, Category, DiagnosticSeverity.Warning, isEnabledByDefault: true, - helpLinkUri: "https://github.com/agoda-com/AgodaAnalyzers/blob/master/doc/AG0041.md"); + helpLinkUri: $"https://github.com/agoda-com/AgodaAnalyzers/blob/master/doc/{DIAGNOSTIC_ID}.md"); public override ImmutableArray SupportedDiagnostics => ImmutableArray.Create(Rule); diff --git a/src/Agoda.Analyzers/AgodaCustom/AG0042ElementHandlerShouldNotBeUsed.cs b/src/Agoda.Analyzers/AgodaCustom/AG0042ElementHandlerShouldNotBeUsed.cs index d6ac217..1b0053a 100644 --- a/src/Agoda.Analyzers/AgodaCustom/AG0042ElementHandlerShouldNotBeUsed.cs +++ b/src/Agoda.Analyzers/AgodaCustom/AG0042ElementHandlerShouldNotBeUsed.cs @@ -32,7 +32,7 @@ private static readonly LocalizableString Description DiagnosticSeverity.Warning, AnalyzerConstants.EnabledByDefault, Description, - "https://github.com/agoda-com/AgodaAnalyzers/blob/master/doc/AG0042.md", + $"https://github.com/agoda-com/AgodaAnalyzers/blob/master/doc/{DIAGNOSTIC_ID}.md", WellKnownDiagnosticTags.EditAndContinue); public override ImmutableArray SupportedDiagnostics => ImmutableArray.Create(Descriptor); diff --git a/src/Agoda.Analyzers/AgodaCustom/AG0043NoBuildServiceProvider.cs b/src/Agoda.Analyzers/AgodaCustom/AG0043NoBuildServiceProvider.cs index 152a414..e68c25b 100644 --- a/src/Agoda.Analyzers/AgodaCustom/AG0043NoBuildServiceProvider.cs +++ b/src/Agoda.Analyzers/AgodaCustom/AG0043NoBuildServiceProvider.cs @@ -35,7 +35,7 @@ private static readonly LocalizableString Description DiagnosticSeverity.Error, AnalyzerConstants.EnabledByDefault, Description, - "https://github.com/agoda-com/AgodaAnalyzers/blob/master/doc/AG0043.md", + $"https://github.com/agoda-com/AgodaAnalyzers/blob/master/doc/{DIAGNOSTIC_ID}.md", WellKnownDiagnosticTags.EditAndContinue); public override ImmutableArray SupportedDiagnostics => ImmutableArray.Create(Descriptor); diff --git a/src/Agoda.Analyzers/AgodaCustom/AG0044ForceOptionShouldNotBeUsed.cs b/src/Agoda.Analyzers/AgodaCustom/AG0044ForceOptionShouldNotBeUsed.cs index a1dc3f8..82db1ce 100644 --- a/src/Agoda.Analyzers/AgodaCustom/AG0044ForceOptionShouldNotBeUsed.cs +++ b/src/Agoda.Analyzers/AgodaCustom/AG0044ForceOptionShouldNotBeUsed.cs @@ -36,7 +36,7 @@ public class AG0044ForceOptionShouldNotBeUsed : DiagnosticAnalyzer DiagnosticSeverity.Warning, isEnabledByDefault: true, description: Description, - "https://github.com/agoda-com/AgodaAnalyzers/blob/master/doc/AG0044.md", + $"https://github.com/agoda-com/AgodaAnalyzers/blob/master/doc/{DIAGNOSTIC_ID}.md", WellKnownDiagnosticTags.EditAndContinue); public override ImmutableArray SupportedDiagnostics => ImmutableArray.Create(Rule);