Skip to content

Commit

Permalink
Merge pull request #6397 from mavasani/CompilationEndTagDiagnostic
Browse files Browse the repository at this point in the history
Add RSxxxx diagnostic for compilation end diagnostic descriptors without CompilationEnd custom tag
  • Loading branch information
mavasani authored Jan 4, 2023
2 parents b1d835f + 2a19c5b commit 60f592c
Show file tree
Hide file tree
Showing 21 changed files with 814 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ Rule ID | Category | Severity | Notes
RS1014 | MicrosoftCodeAnalysisCorrectness | Warning | ImmutableObjectMethodAnalyzer
RS1035 | MicrosoftCodeAnalysisCorrectness | Error | SymbolIsBannedInAnalyzersAnalyzer
RS1036 | MicrosoftCodeAnalysisCorrectness | Warning | SymbolIsBannedInAnalyzersAnalyzer
RS1037 | MicrosoftCodeAnalysisDesign | Warning | DiagnosticDescriptorCreationAnalyzer
Original file line number Diff line number Diff line change
Expand Up @@ -514,6 +514,15 @@
<data name="DefineDiagnosticDescriptionCorrectlyTitle" xml:space="preserve">
<value>Define diagnostic description correctly</value>
</data>
<data name="AddCompilationEndCustomTagDescription" xml:space="preserve">
<value>'DiagnosticDescriptor' assigned to field is used to report a compilation end diagnostic, but the 'DiagnosticDescriptor' constructor used to initialize it does not pass in the required custom tag "CompilationEnd". See documentation for 'WellKnownDiagnosticTags.CompilationEnd' for details.</value>
</data>
<data name="AddCompilationEndCustomTagMessage" xml:space="preserve">
<value>Add "CompilationEnd" custom tag to the diagnostic descriptor used to initialize field '{0}' as it is used to report a compilation end diagnostic</value>
</data>
<data name="AddCompilationEndCustomTagTitle" xml:space="preserve">
<value>Add "CompilationEnd" custom tag to compilation end diagnostic descriptor</value>
</data>
<data name="CompareSymbolsCorrectlyDescriptionGetHashCode" xml:space="preserve">
<value>Symbols should be compared for equality, not identity. An explicit call to 'GetHashCode' will likely result in the wrong behavior.</value>
</data>
Expand Down
1 change: 1 addition & 0 deletions src/Microsoft.CodeAnalysis.Analyzers/Core/DiagnosticIds.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ internal static class DiagnosticIds
public const string PreferIsKindRuleId = "RS1034";
public const string SymbolIsBannedInAnalyzersRuleId = "RS1035";
public const string NoSettingSpecifiedSymbolIsBannedInAnalyzersRuleId = "RS1036";
public const string AddCompilationEndCustomTagRuleId = "RS1037";

// Release tracking analyzer IDs
public const string DeclareDiagnosticIdInAnalyzerReleaseRuleId = "RS2000";
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,21 @@
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="cs" original="../CodeAnalysisDiagnosticsResources.resx">
<body>
<trans-unit id="AddCompilationEndCustomTagDescription">
<source>'DiagnosticDescriptor' assigned to field is used to report a compilation end diagnostic, but the 'DiagnosticDescriptor' constructor used to initialize it does not pass in the required custom tag "CompilationEnd". See documentation for 'WellKnownDiagnosticTags.CompilationEnd' for details.</source>
<target state="new">'DiagnosticDescriptor' assigned to field is used to report a compilation end diagnostic, but the 'DiagnosticDescriptor' constructor used to initialize it does not pass in the required custom tag "CompilationEnd". See documentation for 'WellKnownDiagnosticTags.CompilationEnd' for details.</target>
<note />
</trans-unit>
<trans-unit id="AddCompilationEndCustomTagMessage">
<source>Add "CompilationEnd" custom tag to the diagnostic descriptor used to initialize field '{0}' as it is used to report a compilation end diagnostic</source>
<target state="new">Add "CompilationEnd" custom tag to the diagnostic descriptor used to initialize field '{0}' as it is used to report a compilation end diagnostic</target>
<note />
</trans-unit>
<trans-unit id="AddCompilationEndCustomTagTitle">
<source>Add "CompilationEnd" custom tag to compilation end diagnostic descriptor</source>
<target state="new">Add "CompilationEnd" custom tag to compilation end diagnostic descriptor</target>
<note />
</trans-unit>
<trans-unit id="AddEntryForDiagnosticIdInAnalyzerReleaseCodeFixTitle">
<source>Add rule entry to unshipped release file</source>
<target state="translated">Přidat položku pravidla k nevydanému souboru verze</target>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,21 @@
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="de" original="../CodeAnalysisDiagnosticsResources.resx">
<body>
<trans-unit id="AddCompilationEndCustomTagDescription">
<source>'DiagnosticDescriptor' assigned to field is used to report a compilation end diagnostic, but the 'DiagnosticDescriptor' constructor used to initialize it does not pass in the required custom tag "CompilationEnd". See documentation for 'WellKnownDiagnosticTags.CompilationEnd' for details.</source>
<target state="new">'DiagnosticDescriptor' assigned to field is used to report a compilation end diagnostic, but the 'DiagnosticDescriptor' constructor used to initialize it does not pass in the required custom tag "CompilationEnd". See documentation for 'WellKnownDiagnosticTags.CompilationEnd' for details.</target>
<note />
</trans-unit>
<trans-unit id="AddCompilationEndCustomTagMessage">
<source>Add "CompilationEnd" custom tag to the diagnostic descriptor used to initialize field '{0}' as it is used to report a compilation end diagnostic</source>
<target state="new">Add "CompilationEnd" custom tag to the diagnostic descriptor used to initialize field '{0}' as it is used to report a compilation end diagnostic</target>
<note />
</trans-unit>
<trans-unit id="AddCompilationEndCustomTagTitle">
<source>Add "CompilationEnd" custom tag to compilation end diagnostic descriptor</source>
<target state="new">Add "CompilationEnd" custom tag to compilation end diagnostic descriptor</target>
<note />
</trans-unit>
<trans-unit id="AddEntryForDiagnosticIdInAnalyzerReleaseCodeFixTitle">
<source>Add rule entry to unshipped release file</source>
<target state="translated">Regeleintrag der nicht veröffentlichten Releasedatei hinzufügen</target>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,21 @@
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="es" original="../CodeAnalysisDiagnosticsResources.resx">
<body>
<trans-unit id="AddCompilationEndCustomTagDescription">
<source>'DiagnosticDescriptor' assigned to field is used to report a compilation end diagnostic, but the 'DiagnosticDescriptor' constructor used to initialize it does not pass in the required custom tag "CompilationEnd". See documentation for 'WellKnownDiagnosticTags.CompilationEnd' for details.</source>
<target state="new">'DiagnosticDescriptor' assigned to field is used to report a compilation end diagnostic, but the 'DiagnosticDescriptor' constructor used to initialize it does not pass in the required custom tag "CompilationEnd". See documentation for 'WellKnownDiagnosticTags.CompilationEnd' for details.</target>
<note />
</trans-unit>
<trans-unit id="AddCompilationEndCustomTagMessage">
<source>Add "CompilationEnd" custom tag to the diagnostic descriptor used to initialize field '{0}' as it is used to report a compilation end diagnostic</source>
<target state="new">Add "CompilationEnd" custom tag to the diagnostic descriptor used to initialize field '{0}' as it is used to report a compilation end diagnostic</target>
<note />
</trans-unit>
<trans-unit id="AddCompilationEndCustomTagTitle">
<source>Add "CompilationEnd" custom tag to compilation end diagnostic descriptor</source>
<target state="new">Add "CompilationEnd" custom tag to compilation end diagnostic descriptor</target>
<note />
</trans-unit>
<trans-unit id="AddEntryForDiagnosticIdInAnalyzerReleaseCodeFixTitle">
<source>Add rule entry to unshipped release file</source>
<target state="translated">Agregar una entrada de regla a un archivo de versión no incluido</target>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,21 @@
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="fr" original="../CodeAnalysisDiagnosticsResources.resx">
<body>
<trans-unit id="AddCompilationEndCustomTagDescription">
<source>'DiagnosticDescriptor' assigned to field is used to report a compilation end diagnostic, but the 'DiagnosticDescriptor' constructor used to initialize it does not pass in the required custom tag "CompilationEnd". See documentation for 'WellKnownDiagnosticTags.CompilationEnd' for details.</source>
<target state="new">'DiagnosticDescriptor' assigned to field is used to report a compilation end diagnostic, but the 'DiagnosticDescriptor' constructor used to initialize it does not pass in the required custom tag "CompilationEnd". See documentation for 'WellKnownDiagnosticTags.CompilationEnd' for details.</target>
<note />
</trans-unit>
<trans-unit id="AddCompilationEndCustomTagMessage">
<source>Add "CompilationEnd" custom tag to the diagnostic descriptor used to initialize field '{0}' as it is used to report a compilation end diagnostic</source>
<target state="new">Add "CompilationEnd" custom tag to the diagnostic descriptor used to initialize field '{0}' as it is used to report a compilation end diagnostic</target>
<note />
</trans-unit>
<trans-unit id="AddCompilationEndCustomTagTitle">
<source>Add "CompilationEnd" custom tag to compilation end diagnostic descriptor</source>
<target state="new">Add "CompilationEnd" custom tag to compilation end diagnostic descriptor</target>
<note />
</trans-unit>
<trans-unit id="AddEntryForDiagnosticIdInAnalyzerReleaseCodeFixTitle">
<source>Add rule entry to unshipped release file</source>
<target state="translated">Ajouter une entrée de règle au fichier de version non fourni</target>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,21 @@
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="it" original="../CodeAnalysisDiagnosticsResources.resx">
<body>
<trans-unit id="AddCompilationEndCustomTagDescription">
<source>'DiagnosticDescriptor' assigned to field is used to report a compilation end diagnostic, but the 'DiagnosticDescriptor' constructor used to initialize it does not pass in the required custom tag "CompilationEnd". See documentation for 'WellKnownDiagnosticTags.CompilationEnd' for details.</source>
<target state="new">'DiagnosticDescriptor' assigned to field is used to report a compilation end diagnostic, but the 'DiagnosticDescriptor' constructor used to initialize it does not pass in the required custom tag "CompilationEnd". See documentation for 'WellKnownDiagnosticTags.CompilationEnd' for details.</target>
<note />
</trans-unit>
<trans-unit id="AddCompilationEndCustomTagMessage">
<source>Add "CompilationEnd" custom tag to the diagnostic descriptor used to initialize field '{0}' as it is used to report a compilation end diagnostic</source>
<target state="new">Add "CompilationEnd" custom tag to the diagnostic descriptor used to initialize field '{0}' as it is used to report a compilation end diagnostic</target>
<note />
</trans-unit>
<trans-unit id="AddCompilationEndCustomTagTitle">
<source>Add "CompilationEnd" custom tag to compilation end diagnostic descriptor</source>
<target state="new">Add "CompilationEnd" custom tag to compilation end diagnostic descriptor</target>
<note />
</trans-unit>
<trans-unit id="AddEntryForDiagnosticIdInAnalyzerReleaseCodeFixTitle">
<source>Add rule entry to unshipped release file</source>
<target state="translated">Aggiungere la voce della regola per il file di versione non distribuito</target>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,21 @@
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="ja" original="../CodeAnalysisDiagnosticsResources.resx">
<body>
<trans-unit id="AddCompilationEndCustomTagDescription">
<source>'DiagnosticDescriptor' assigned to field is used to report a compilation end diagnostic, but the 'DiagnosticDescriptor' constructor used to initialize it does not pass in the required custom tag "CompilationEnd". See documentation for 'WellKnownDiagnosticTags.CompilationEnd' for details.</source>
<target state="new">'DiagnosticDescriptor' assigned to field is used to report a compilation end diagnostic, but the 'DiagnosticDescriptor' constructor used to initialize it does not pass in the required custom tag "CompilationEnd". See documentation for 'WellKnownDiagnosticTags.CompilationEnd' for details.</target>
<note />
</trans-unit>
<trans-unit id="AddCompilationEndCustomTagMessage">
<source>Add "CompilationEnd" custom tag to the diagnostic descriptor used to initialize field '{0}' as it is used to report a compilation end diagnostic</source>
<target state="new">Add "CompilationEnd" custom tag to the diagnostic descriptor used to initialize field '{0}' as it is used to report a compilation end diagnostic</target>
<note />
</trans-unit>
<trans-unit id="AddCompilationEndCustomTagTitle">
<source>Add "CompilationEnd" custom tag to compilation end diagnostic descriptor</source>
<target state="new">Add "CompilationEnd" custom tag to compilation end diagnostic descriptor</target>
<note />
</trans-unit>
<trans-unit id="AddEntryForDiagnosticIdInAnalyzerReleaseCodeFixTitle">
<source>Add rule entry to unshipped release file</source>
<target state="translated">未出荷のリリース ファイルへのルール エントリの追加</target>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,21 @@
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="ko" original="../CodeAnalysisDiagnosticsResources.resx">
<body>
<trans-unit id="AddCompilationEndCustomTagDescription">
<source>'DiagnosticDescriptor' assigned to field is used to report a compilation end diagnostic, but the 'DiagnosticDescriptor' constructor used to initialize it does not pass in the required custom tag "CompilationEnd". See documentation for 'WellKnownDiagnosticTags.CompilationEnd' for details.</source>
<target state="new">'DiagnosticDescriptor' assigned to field is used to report a compilation end diagnostic, but the 'DiagnosticDescriptor' constructor used to initialize it does not pass in the required custom tag "CompilationEnd". See documentation for 'WellKnownDiagnosticTags.CompilationEnd' for details.</target>
<note />
</trans-unit>
<trans-unit id="AddCompilationEndCustomTagMessage">
<source>Add "CompilationEnd" custom tag to the diagnostic descriptor used to initialize field '{0}' as it is used to report a compilation end diagnostic</source>
<target state="new">Add "CompilationEnd" custom tag to the diagnostic descriptor used to initialize field '{0}' as it is used to report a compilation end diagnostic</target>
<note />
</trans-unit>
<trans-unit id="AddCompilationEndCustomTagTitle">
<source>Add "CompilationEnd" custom tag to compilation end diagnostic descriptor</source>
<target state="new">Add "CompilationEnd" custom tag to compilation end diagnostic descriptor</target>
<note />
</trans-unit>
<trans-unit id="AddEntryForDiagnosticIdInAnalyzerReleaseCodeFixTitle">
<source>Add rule entry to unshipped release file</source>
<target state="translated">제공되지 않은 릴리스 파일에 규칙 항목 추가</target>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,21 @@
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="pl" original="../CodeAnalysisDiagnosticsResources.resx">
<body>
<trans-unit id="AddCompilationEndCustomTagDescription">
<source>'DiagnosticDescriptor' assigned to field is used to report a compilation end diagnostic, but the 'DiagnosticDescriptor' constructor used to initialize it does not pass in the required custom tag "CompilationEnd". See documentation for 'WellKnownDiagnosticTags.CompilationEnd' for details.</source>
<target state="new">'DiagnosticDescriptor' assigned to field is used to report a compilation end diagnostic, but the 'DiagnosticDescriptor' constructor used to initialize it does not pass in the required custom tag "CompilationEnd". See documentation for 'WellKnownDiagnosticTags.CompilationEnd' for details.</target>
<note />
</trans-unit>
<trans-unit id="AddCompilationEndCustomTagMessage">
<source>Add "CompilationEnd" custom tag to the diagnostic descriptor used to initialize field '{0}' as it is used to report a compilation end diagnostic</source>
<target state="new">Add "CompilationEnd" custom tag to the diagnostic descriptor used to initialize field '{0}' as it is used to report a compilation end diagnostic</target>
<note />
</trans-unit>
<trans-unit id="AddCompilationEndCustomTagTitle">
<source>Add "CompilationEnd" custom tag to compilation end diagnostic descriptor</source>
<target state="new">Add "CompilationEnd" custom tag to compilation end diagnostic descriptor</target>
<note />
</trans-unit>
<trans-unit id="AddEntryForDiagnosticIdInAnalyzerReleaseCodeFixTitle">
<source>Add rule entry to unshipped release file</source>
<target state="translated">Dodaj wpis reguły do niedostarczonego pliku wydania</target>
Expand Down
Loading

0 comments on commit 60f592c

Please sign in to comment.