Skip to content

Commit

Permalink
Merge pull request #5018 from dotnet/merges/main-to-release/6.0.1xx-p…
Browse files Browse the repository at this point in the history
…review4

Merge main to release/6.0.1xx-preview4
  • Loading branch information
mavasani authored Apr 14, 2021
2 parents be17383 + acf8240 commit e30830b
Show file tree
Hide file tree
Showing 105 changed files with 1,111 additions and 936 deletions.
5 changes: 5 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ indent_style = space
# https://github.com/dotnet/roslyn-analyzers/issues/3389
dotnet_diagnostic.RS1024.severity = none

# IDE0078: Use pattern matching
# https://github.com/dotnet/roslyn/issues/51691
# https://github.com/dotnet/roslyn/issues/51693
dotnet_diagnostic.IDE0078.severity = silent

# Code files
[*.{cs,csx,vb,vbx}]
indent_size = 4
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: Bug report
about: Report a bug, false-positive or false-negative
about: Report a bug, false-positive or false-negative for a CAxxxx rule. For IDExxxx, please open an issue in dotnet/roslyn repository.
title: ''
labels: ''
assignees: ''
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ See [VERSIONING.md](.//VERSIONING.md) for the versioning scheme for all analyzer

Recommended Analyzer Package Version: [![NuGet](https://img.shields.io/nuget/v/Microsoft.CodeAnalysis.NetAnalyzers.svg)](https://www.nuget.org/packages/Microsoft.CodeAnalysis.NetAnalyzers)

Required Visual Studio Version: **Visual Studio 2019 16.8 RTW or later**
Required Visual Studio Version: **Visual Studio 2019 16.9 RTW or later**

Required .NET SDK Version: **.NET 5.0 SDK or later**

Expand Down
2 changes: 1 addition & 1 deletion eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<!-- Use the correct compiler version -->
<UsingToolMicrosoftNetCompilers>true</UsingToolMicrosoftNetCompilers>
<!-- Dependencies from https://github.com/dotnet/roslyn -->
<MicrosoftNETCoreCompilersPackageVersion>3.8.0</MicrosoftNETCoreCompilersPackageVersion>
<MicrosoftNETCoreCompilersPackageVersion>3.9.0</MicrosoftNETCoreCompilersPackageVersion>
<MicrosoftNetCompilersToolsetVersion>$(MicrosoftNETCoreCompilersPackageVersion)</MicrosoftNetCompilersToolsetVersion>
<CodeStyleAnalyersVersion>$(MicrosoftNETCoreCompilersPackageVersion)</CodeStyleAnalyersVersion>
<!-- Roslyn -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public sealed class ClassIsNotDiagnosticAnalyzer : DiagnosticAnalyzer
private static readonly LocalizableString s_localizableTitleNotDiagnosticAnalyzer = new LocalizableResourceString(nameof(CodeAnalysisDiagnosticsResources.ClassIsNotDiagnosticAnalyzerTitle), CodeAnalysisDiagnosticsResources.ResourceManager, typeof(CodeAnalysisDiagnosticsResources));
private static readonly LocalizableString s_localizableMessageNotDiagnosticAnalyzer = new LocalizableResourceString(nameof(CodeAnalysisDiagnosticsResources.ClassIsNotDiagnosticAnalyzerMessage), CodeAnalysisDiagnosticsResources.ResourceManager, typeof(CodeAnalysisDiagnosticsResources));

public static readonly DiagnosticDescriptor Rule = new DiagnosticDescriptor(
public static readonly DiagnosticDescriptor Rule = new(
DiagnosticIds.TypeIsNotDiagnosticAnalyzerRuleId,
s_localizableTitleNotDiagnosticAnalyzer,
s_localizableMessageNotDiagnosticAnalyzer,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ public sealed partial class DiagnosticDescriptorCreationAnalyzer : DiagnosticAna
/// <summary>
/// RS1031 (<inheritdoc cref="CodeAnalysisDiagnosticsResources.DefineDiagnosticTitleCorrectlyTitle"/>)
/// </summary>
public static readonly DiagnosticDescriptor DefineDiagnosticTitleCorrectlyRule = new DiagnosticDescriptor(
public static readonly DiagnosticDescriptor DefineDiagnosticTitleCorrectlyRule = new(
DiagnosticIds.DefineDiagnosticTitleCorrectlyRuleId,
s_localizableDefineDiagnosticTitleCorrectlyTitle,
s_localizableDefineDiagnosticTitleCorrectlyMessage,
Expand All @@ -183,7 +183,7 @@ public sealed partial class DiagnosticDescriptorCreationAnalyzer : DiagnosticAna
/// <summary>
/// RS1032 (<inheritdoc cref="CodeAnalysisDiagnosticsResources.DefineDiagnosticMessageCorrectlyTitle"/>)
/// </summary>
public static readonly DiagnosticDescriptor DefineDiagnosticMessageCorrectlyRule = new DiagnosticDescriptor(
public static readonly DiagnosticDescriptor DefineDiagnosticMessageCorrectlyRule = new(
DiagnosticIds.DefineDiagnosticMessageCorrectlyRuleId,
s_localizableDefineDiagnosticMessageCorrectlyTitle,
s_localizableDefineDiagnosticMessageCorrectlyMessage,
Expand All @@ -195,7 +195,7 @@ public sealed partial class DiagnosticDescriptorCreationAnalyzer : DiagnosticAna
/// <summary>
/// RS1033 (<inheritdoc cref="CodeAnalysisDiagnosticsResources.DefineDiagnosticDescriptionCorrectlyTitle"/>)
/// </summary>
public static readonly DiagnosticDescriptor DefineDiagnosticDescriptionCorrectlyRule = new DiagnosticDescriptor(
public static readonly DiagnosticDescriptor DefineDiagnosticDescriptionCorrectlyRule = new(
DiagnosticIds.DefineDiagnosticDescriptionCorrectlyRuleId,
s_localizableDefineDiagnosticDescriptionCorrectlyTitle,
s_localizableDefineDiagnosticDescriptionCorrectlyMessage,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public sealed partial class DiagnosticDescriptorCreationAnalyzer
/// <summary>
/// RS1018 (<inheritdoc cref="CodeAnalysisDiagnosticsResources.DiagnosticIdMustBeInSpecifiedFormatTitle"/>)
/// </summary>
public static readonly DiagnosticDescriptor DiagnosticIdMustBeInSpecifiedFormatRule = new DiagnosticDescriptor(
public static readonly DiagnosticDescriptor DiagnosticIdMustBeInSpecifiedFormatRule = new(
DiagnosticIds.DiagnosticIdMustBeInSpecifiedFormatRuleId,
s_localizableDiagnosticIdMustBeInSpecifiedFormatTitle,
s_localizableDiagnosticIdMustBeInSpecifiedFormatMessage,
Expand All @@ -48,7 +48,7 @@ public sealed partial class DiagnosticDescriptorCreationAnalyzer
/// <summary>
/// RS1020 (<inheritdoc cref="CodeAnalysisDiagnosticsResources.UseCategoriesFromSpecifiedRangeTitle"/>)
/// </summary>
public static readonly DiagnosticDescriptor UseCategoriesFromSpecifiedRangeRule = new DiagnosticDescriptor(
public static readonly DiagnosticDescriptor UseCategoriesFromSpecifiedRangeRule = new(
DiagnosticIds.UseCategoriesFromSpecifiedRangeRuleId,
s_localizableUseCategoriesFromSpecifiedRangeTitle,
s_localizableUseCategoriesFromSpecifiedRangeMessage,
Expand All @@ -61,7 +61,7 @@ public sealed partial class DiagnosticDescriptorCreationAnalyzer
/// <summary>
/// RS1021 (<inheritdoc cref="CodeAnalysisDiagnosticsResources.AnalyzerCategoryAndIdRangeFileInvalidTitle"/>)
/// </summary>
public static readonly DiagnosticDescriptor AnalyzerCategoryAndIdRangeFileInvalidRule = new DiagnosticDescriptor(
public static readonly DiagnosticDescriptor AnalyzerCategoryAndIdRangeFileInvalidRule = new(
DiagnosticIds.AnalyzerCategoryAndIdRangeFileInvalidRuleId,
s_localizableAnalyzerCategoryAndIdRangeFileInvalidTitle,
s_localizableAnalyzerCategoryAndIdRangeFileInvalidMessage,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public sealed class DoNotUseCompilationGetSemanticModelAnalyzer : DiagnosticAnal
private static readonly LocalizableString s_localizableMessage = new LocalizableResourceString(nameof(CodeAnalysisDiagnosticsResources.DoNotUseCompilationGetSemanticModelMessage), CodeAnalysisDiagnosticsResources.ResourceManager, typeof(CodeAnalysisDiagnosticsResources));
private static readonly LocalizableString s_localizableDescription = new LocalizableResourceString(nameof(CodeAnalysisDiagnosticsResources.DoNotUseCompilationGetSemanticModelDescription), CodeAnalysisDiagnosticsResources.ResourceManager, typeof(CodeAnalysisDiagnosticsResources));

public static readonly DiagnosticDescriptor Rule = new DiagnosticDescriptor(
public static readonly DiagnosticDescriptor Rule = new(
DiagnosticIds.DoNotUseCompilationGetSemanticModelRuleId,
s_localizableTitle,
s_localizableMessage,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public sealed partial class DefineDiagnosticDescriptorArgumentsCorrectlyFix : Co
{
private sealed class CustomFixAllProvider : FixAllProvider
{
public static CustomFixAllProvider Instance = new CustomFixAllProvider();
public static CustomFixAllProvider Instance = new();

private CustomFixAllProvider()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,22 +259,22 @@
</trans-unit>
<trans-unit id="PreferIsKindDescription">
<source>Prefer 'syntax.IsKind(kind)' to 'syntax.Kind() == kind' when checking syntax kinds. Code using 'IsKind' is slightly more efficient at runtime, so consistent use of this form where applicable helps improve performance in complex analysis scenarios.</source>
<target state="new">Prefer 'syntax.IsKind(kind)' to 'syntax.Kind() == kind' when checking syntax kinds. Code using 'IsKind' is slightly more efficient at runtime, so consistent use of this form where applicable helps improve performance in complex analysis scenarios.</target>
<target state="translated">Při kontrole typů syntaxe upřednostňovat syntax.IsKind(kind) před syntax.Kind() == kind. Kód, který používá IsKind, je za běhu o něco efektivnější, proto konzistentní používání tohoto tvaru tam, kde je to možné, pomáhá zlepšit výkon ve scénářích komplexní analýzy.</target>
<note />
</trans-unit>
<trans-unit id="PreferIsKindFix">
<source>Use 'IsKind' instead of 'Kind'</source>
<target state="new">Use 'IsKind' instead of 'Kind'</target>
<target state="translated">Použijte IsKind místo Kind.</target>
<note />
</trans-unit>
<trans-unit id="PreferIsKindMessage">
<source>Prefer 'IsKind' for checking syntax kinds</source>
<target state="new">Prefer 'IsKind' for checking syntax kinds</target>
<target state="translated">Při kontrole typů syntaxí upřednostňujte IsKind.</target>
<note />
</trans-unit>
<trans-unit id="PreferIsKindTitle">
<source>Prefer 'IsKind' for checking syntax kinds</source>
<target state="new">Prefer 'IsKind' for checking syntax kinds</target>
<target state="translated">Při kontrole typů syntaxí upřednostňovat IsKind</target>
<note />
</trans-unit>
<trans-unit id="ProvideCustomTagsInDescriptorDescription">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,22 +259,22 @@
</trans-unit>
<trans-unit id="PreferIsKindDescription">
<source>Prefer 'syntax.IsKind(kind)' to 'syntax.Kind() == kind' when checking syntax kinds. Code using 'IsKind' is slightly more efficient at runtime, so consistent use of this form where applicable helps improve performance in complex analysis scenarios.</source>
<target state="new">Prefer 'syntax.IsKind(kind)' to 'syntax.Kind() == kind' when checking syntax kinds. Code using 'IsKind' is slightly more efficient at runtime, so consistent use of this form where applicable helps improve performance in complex analysis scenarios.</target>
<target state="translated">Bei der Überprüfung von Syntaxarten ist "syntax.IsKind(kind)" der Syntax "syntax.Kind() == kind" vorzuziehen. Der Code mit "IsKind" ist zur Laufzeit etwas effizienter, daher trägt die konsistente Verwendung dieser Form in komplexen Analyseszenarios zur Verbesserung der Leistung bei.</target>
<note />
</trans-unit>
<trans-unit id="PreferIsKindFix">
<source>Use 'IsKind' instead of 'Kind'</source>
<target state="new">Use 'IsKind' instead of 'Kind'</target>
<target state="translated">"IsKind" anstelle von "Kind" verwenden</target>
<note />
</trans-unit>
<trans-unit id="PreferIsKindMessage">
<source>Prefer 'IsKind' for checking syntax kinds</source>
<target state="new">Prefer 'IsKind' for checking syntax kinds</target>
<target state="translated">"IsKind" für die Überprüfung von Syntaxarten bevorzugen</target>
<note />
</trans-unit>
<trans-unit id="PreferIsKindTitle">
<source>Prefer 'IsKind' for checking syntax kinds</source>
<target state="new">Prefer 'IsKind' for checking syntax kinds</target>
<target state="translated">"IsKind" für die Überprüfung von Syntaxarten bevorzugen</target>
<note />
</trans-unit>
<trans-unit id="ProvideCustomTagsInDescriptorDescription">
Expand Down Expand Up @@ -557,7 +557,7 @@
</trans-unit>
<trans-unit id="OverrideGetFixAllProviderDescription">
<source>A CodeFixProvider should provide FixAll support to enable users to fix multiple instances of the underlying diagnostic with a single code fix. See documentation at https://github.com/dotnet/roslyn/blob/main/docs/analyzers/FixAllProvider.md for further details.</source>
<target state="translated">Ein CodeFixProvider sollte FixAll-Unterstützung bereitstellen, um mehrere Instanzen der zugrunde liegenden Diagnose mit einer einzigen Codefehlerbehebung zu korrigieren. Weitere Informationen finden Sie in der Dokumentation unter https://github.com/dotnet/roslyn/blob/main/docs/analyzers/FixAllProvider.md.</target>
<target state="translated">Ein CodeFixProvider muss FixAll-Unterstützung bereitstellen, damit mehrere Instanzen der zugrunde liegenden Diagnose mit einer einzigen Codefehlerbehebung korrigiert werden können. Weitere Informationen finden Sie in der Dokumentation unter https://github.com/dotnet/roslyn/blob/main/docs/analyzers/FixAllProvider.md.</target>
<note />
</trans-unit>
<trans-unit id="OverrideGetFixAllProviderCodeFixTitle">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,22 +259,22 @@
</trans-unit>
<trans-unit id="PreferIsKindDescription">
<source>Prefer 'syntax.IsKind(kind)' to 'syntax.Kind() == kind' when checking syntax kinds. Code using 'IsKind' is slightly more efficient at runtime, so consistent use of this form where applicable helps improve performance in complex analysis scenarios.</source>
<target state="new">Prefer 'syntax.IsKind(kind)' to 'syntax.Kind() == kind' when checking syntax kinds. Code using 'IsKind' is slightly more efficient at runtime, so consistent use of this form where applicable helps improve performance in complex analysis scenarios.</target>
<target state="translated">Use preferentemente "syntax.IsKind(kind)" antes que "syntax.Kind() == kind" al comprobar las variantes de sintaxis. El código que usa "IsKind" es algo más eficaz en tiempo de ejecución, por lo que el uso coherente de esta forma, cuando proceda, ayuda a mejorar el rendimiento en los escenarios de análisis complejos.</target>
<note />
</trans-unit>
<trans-unit id="PreferIsKindFix">
<source>Use 'IsKind' instead of 'Kind'</source>
<target state="new">Use 'IsKind' instead of 'Kind'</target>
<target state="translated">Usar "IsKind" en lugar de "Kind"</target>
<note />
</trans-unit>
<trans-unit id="PreferIsKindMessage">
<source>Prefer 'IsKind' for checking syntax kinds</source>
<target state="new">Prefer 'IsKind' for checking syntax kinds</target>
<target state="translated">Preferir "IsKind" para comprobar las variantes de sintaxis</target>
<note />
</trans-unit>
<trans-unit id="PreferIsKindTitle">
<source>Prefer 'IsKind' for checking syntax kinds</source>
<target state="new">Prefer 'IsKind' for checking syntax kinds</target>
<target state="translated">Preferir "IsKind" para comprobar las variantes de sintaxis</target>
<note />
</trans-unit>
<trans-unit id="ProvideCustomTagsInDescriptorDescription">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@
</trans-unit>
<trans-unit id="EnableAnalyzerReleaseTrackingRuleDescription">
<source>Enabling release tracking for analyzer packages helps in tracking and documenting the analyzer diagnostics that ship and/or change with each analyzer release. See details at https://github.com/dotnet/roslyn-analyzers/blob/main/src/Microsoft.CodeAnalysis.Analyzers/ReleaseTrackingAnalyzers.Help.md.</source>
<target state="translated">L'activation du suivi de version pour les packages d'analyseurs permet de suivre et de documenter les diagnostics d'analyseurs qui sont fournis et/ou changés avec chaque version d'analyseur. Consultez les détails sur https://github.com/dotnet/roslyn-analyzers/blob/main/src/Microsoft.CodeAnalysis.Analyzers/ReleaseTrackingAnalyzers.Help.md.</target>
<target state="translated">L'activation du suivi de version pour les packages d'analyseurs permet de suivre et de documenter les diagnostics d'analyseurs qui sont fournis et/ou changés pour chaque version d'analyseur. Consultez les détails sur https://github.com/dotnet/roslyn-analyzers/blob/main/src/Microsoft.CodeAnalysis.Analyzers/ReleaseTrackingAnalyzers.Help.md.</target>
<note />
</trans-unit>
<trans-unit id="EnableAnalyzerReleaseTrackingRuleMessage">
Expand Down Expand Up @@ -259,22 +259,22 @@
</trans-unit>
<trans-unit id="PreferIsKindDescription">
<source>Prefer 'syntax.IsKind(kind)' to 'syntax.Kind() == kind' when checking syntax kinds. Code using 'IsKind' is slightly more efficient at runtime, so consistent use of this form where applicable helps improve performance in complex analysis scenarios.</source>
<target state="new">Prefer 'syntax.IsKind(kind)' to 'syntax.Kind() == kind' when checking syntax kinds. Code using 'IsKind' is slightly more efficient at runtime, so consistent use of this form where applicable helps improve performance in complex analysis scenarios.</target>
<target state="translated">Utilisez 'syntax.IsKind(kind)' au lieu de 'syntax.Kind() == kind' pour la vérification des genres de syntaxe. Dans la mesure où le code utilisant 'IsKind' est légèrement plus efficace au moment de l'exécution, l'utilisation systématique de cette forme permet d'améliorer les performances dans les scénarios d'analyse complexes.</target>
<note />
</trans-unit>
<trans-unit id="PreferIsKindFix">
<source>Use 'IsKind' instead of 'Kind'</source>
<target state="new">Use 'IsKind' instead of 'Kind'</target>
<target state="translated">Utilisez 'IsKind' au lieu de 'Kind'</target>
<note />
</trans-unit>
<trans-unit id="PreferIsKindMessage">
<source>Prefer 'IsKind' for checking syntax kinds</source>
<target state="new">Prefer 'IsKind' for checking syntax kinds</target>
<target state="translated">Préférez 'IsKind' pour la vérification des genres de syntaxe</target>
<note />
</trans-unit>
<trans-unit id="PreferIsKindTitle">
<source>Prefer 'IsKind' for checking syntax kinds</source>
<target state="new">Prefer 'IsKind' for checking syntax kinds</target>
<target state="translated">Préférez 'IsKind' pour la vérification des genres de syntaxe</target>
<note />
</trans-unit>
<trans-unit id="ProvideCustomTagsInDescriptorDescription">
Expand Down
Loading

0 comments on commit e30830b

Please sign in to comment.