Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update analyzers #51058

Merged
merged 4 commits into from
Mar 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
</PropertyGroup>
<PropertyGroup>
<!-- Versions used by several individual references below -->
<RoslynDiagnosticsNugetPackageVersion>3.3.2-beta1.20562.1</RoslynDiagnosticsNugetPackageVersion>
<RoslynDiagnosticsNugetPackageVersion>3.3.3-beta1.21105.3</RoslynDiagnosticsNugetPackageVersion>
<MicrosoftCodeAnalysisNetAnalyzersVersion>6.0.0-preview1.21054.10</MicrosoftCodeAnalysisNetAnalyzersVersion>
<MicrosoftCodeAnalysisTestingVersion>1.0.1-beta1.20623.3</MicrosoftCodeAnalysisTestingVersion>
<CodeStyleAnalyzerVersion>3.8.0</CodeStyleAnalyzerVersion>
Expand Down Expand Up @@ -66,7 +66,7 @@
packages we will keep it untied to the RoslynDiagnosticsNugetPackageVersion we use for
other analyzers to ensure it stays on a release version.
-->
<MicrosoftCodeAnalysisAnalyzersVersion>3.0.0</MicrosoftCodeAnalysisAnalyzersVersion>
<MicrosoftCodeAnalysisAnalyzersVersion>3.3.2</MicrosoftCodeAnalysisAnalyzersVersion>
<MicrosoftCodeAnalysisBuildTasksVersion>2.0.0-rc2-61102-09</MicrosoftCodeAnalysisBuildTasksVersion>
<MicrosoftCodeAnalysisCSharpAnalyzerTestingXUnitVersion>$(MicrosoftCodeAnalysisTestingVersion)</MicrosoftCodeAnalysisCSharpAnalyzerTestingXUnitVersion>
<MicrosoftCodeAnalysisCSharpCodeFixTestingXUnitVersion>$(MicrosoftCodeAnalysisTestingVersion)</MicrosoftCodeAnalysisCSharpCodeFixTestingXUnitVersion>
Expand Down
4 changes: 4 additions & 0 deletions eng/config/globalconfigs/NonShipping.globalconfig
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ dotnet_diagnostic.RS1019.severity = none
dotnet_diagnostic.RS1025.severity = none
# Enable concurrent execution - suppress for non-shipping/test projects
dotnet_diagnostic.RS1026.severity = none
# Define diagnostic message correctly
dotnet_diagnostic.RS1032.severity = none
# Define diagnostic description correctly
dotnet_diagnostic.RS1033.severity = none
# Do not use generic CodeAction.Create to create CodeAction - not useful for tests
dotnet_diagnostic.RS0005.severity = none
# Do not call 'GetTestAccessor()' from production code: does not apply to tests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@
<comment>{Locked="readonly"} "readonly" is C# keyword and should not be localized.</comment>
</data>
<data name="Struct_contains_assignment_to_this_outside_of_constructor_Make_readonly_fields_writable" xml:space="preserve">
<value>Struct contains assignment to 'this' outside of constructor. Make readonly fields writable</value>
<value>Struct contains assignment to 'this' outside of constructor. Make readonly fields writable.</value>
<comment>{Locked="Struct"}{Locked="this"} these are C#/VB keywords and should not be localized.</comment>
</data>
<data name="Deconstruct_variable_declaration" xml:space="preserve">
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/Analyzers/Core/Analyzers/AnalyzersResources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
<value>Remove unused member</value>
</data>
<data name="Private_member_0_is_unused" xml:space="preserve">
<value>Private member '{0}' is unused.</value>
<value>Private member '{0}' is unused</value>
</data>
<data name="Remove_unused_private_members" xml:space="preserve">
<value>Remove unused private members</value>
Expand All @@ -133,7 +133,7 @@
<value>Remove unread private members</value>
</data>
<data name="Private_member_0_can_be_removed_as_the_value_assigned_to_it_is_never_read" xml:space="preserve">
<value>Private member '{0}' can be removed as the value assigned to it is never read.</value>
<value>Private member '{0}' can be removed as the value assigned to it is never read</value>
</data>
<data name="Private_method_0_can_be_removed_as_it_is_never_invoked" xml:space="preserve">
<value>Private method '{0}' can be removed as it is never invoked.</value>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,6 @@ internal abstract class AbstractValidateFormatStringDiagnosticAnalyzer<TSyntaxKi
AnalyzersResources.ResourceManager,
typeof(AnalyzersResources));

private static readonly LocalizableString Description = new LocalizableResourceString(
nameof(AnalyzersResources.Invalid_format_string),
AnalyzersResources.ResourceManager,
typeof(AnalyzersResources));

#pragma warning disable RS0030 // Do not used banned APIs - We cannot use AbstractBuiltInCodeStyleDiagnosticAnalyzer nor AbstractCodeQualityDiagnosticAnalyzer.
// This analyzer is run against generated code while the abstract base classes mentioned doesn't. The rule is also not documented.
// There is even a current work to remove the rule completely in favor of CA2241.
Expand All @@ -43,7 +38,6 @@ internal abstract class AbstractValidateFormatStringDiagnosticAnalyzer<TSyntaxKi
DiagnosticCategory.Compiler,
DiagnosticSeverity.Info,
isEnabledByDefault: true,
description: Description,
customTags: EnforceOnBuildValues.ValidateFormatString.ToCustomTag());
#pragma warning restore RS0030 // Do not used banned APIs

Expand Down
8 changes: 4 additions & 4 deletions src/Analyzers/Core/Analyzers/xlf/AnalyzersResources.cs.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions src/Analyzers/Core/Analyzers/xlf/AnalyzersResources.de.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading