Skip to content

Commit efe6438

Browse files
committed
Move SA1648 messages to resources
1 parent bb330fc commit efe6438

3 files changed

Lines changed: 41 additions & 11 deletions

File tree

StyleCop.Analyzers/StyleCop.Analyzers/DocumentationRules/DocumentationResources.Designer.cs

Lines changed: 27 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

StyleCop.Analyzers/StyleCop.Analyzers/DocumentationRules/DocumentationResources.resx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,15 @@
261261
<data name="SA1642SA1643CodeFix" xml:space="preserve">
262262
<value>Add standard text</value>
263263
</data>
264+
<data name="SA1648Description" xml:space="preserve">
265+
<value>&lt;inheritdoc&gt; has been used on an element that doesn't inherit from a base class or implement an interface.</value>
266+
</data>
267+
<data name="SA1648MessageFormat" xml:space="preserve">
268+
<value>inheritdoc must be used with inheriting class</value>
269+
</data>
270+
<data name="SA1648Title" xml:space="preserve">
271+
<value>inheritdoc must be used with inheriting class</value>
272+
</data>
264273
<data name="SA1649CodeFix" xml:space="preserve">
265274
<value>Rename file to match first type name</value>
266275
</data>

StyleCop.Analyzers/StyleCop.Analyzers/DocumentationRules/SA1648InheritDocMustBeUsedWithInheritingClass.cs

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,24 +15,18 @@ namespace StyleCop.Analyzers.DocumentationRules
1515
/// <c>&lt;inheritdoc&gt;</c> has been used on an element that doesn't inherit from a base class or implement an
1616
/// interface.
1717
/// </summary>
18-
/// <remarks>
19-
/// <para>Verifies that an <c>inheritdoc</c> tag is not used when the class or interface does not inherit from a
20-
/// base class or interface.</para>
21-
///
22-
/// <para>A violation of this rule occurs when the element having the <c>inheritdoc</c> tag doesn't inherit from a
23-
/// base case or implement an interface.</para>
24-
/// </remarks>
18+
/// <seealso href="https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1648.md">SA1648</seealso>
2519
[DiagnosticAnalyzer(LanguageNames.CSharp)]
2620
internal class SA1648InheritDocMustBeUsedWithInheritingClass : DiagnosticAnalyzer
2721
{
2822
/// <summary>
2923
/// The ID for diagnostics produced by the <see cref="SA1648InheritDocMustBeUsedWithInheritingClass"/> analyzer.
3024
/// </summary>
3125
public const string DiagnosticId = "SA1648";
32-
private const string Title = "inheritdoc must be used with inheriting class";
33-
private const string MessageFormat = "inheritdoc must be used with inheriting class";
34-
private const string Description = "<inheritdoc> has been used on an element that doesn't inherit from a base class or implement an interface.";
35-
private const string HelpLink = "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1648.md";
26+
private static readonly LocalizableString Title = new LocalizableResourceString(nameof(DocumentationResources.SA1648Title), DocumentationResources.ResourceManager, typeof(DocumentationResources));
27+
private static readonly LocalizableString MessageFormat = new LocalizableResourceString(nameof(DocumentationResources.SA1648MessageFormat), DocumentationResources.ResourceManager, typeof(DocumentationResources));
28+
private static readonly LocalizableString Description = new LocalizableResourceString(nameof(DocumentationResources.SA1648Description), DocumentationResources.ResourceManager, typeof(DocumentationResources));
29+
private static readonly string HelpLink = "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1648.md";
3630

3731
private static readonly DiagnosticDescriptor Descriptor =
3832
new DiagnosticDescriptor(DiagnosticId, Title, MessageFormat, AnalyzerCategory.DocumentationRules, DiagnosticSeverity.Warning, AnalyzerConstants.EnabledByDefault, Description, HelpLink);

0 commit comments

Comments
 (0)