From 53e55f3907f078bb36ef567a014853e217d3e6f0 Mon Sep 17 00:00:00 2001 From: Josef Pihrt Date: Mon, 28 Nov 2022 00:10:26 +0100 Subject: [PATCH] Release 4.2.0 (#1003) --- ChangeLog.md | 2 + docs/Configuration.md | 15 +++++- docs/api.txt | 29 +++++++--- docs/api/README.md | 7 +++ .../README.md | 1 + .../CSharpDiagnosticVerifier-2/README.md | 1 + .../CSharpRefactoringVerifier-1/README.md | 1 + .../-ctor/README.md | 15 ++++++ .../README.md | 48 +++++++++++++++++ .../-ctor/README.md | 15 ++++++ .../MSTestDiagnosticVerifier-2/README.md | 54 +++++++++++++++++++ .../-ctor/README.md | 15 ++++++ .../MSTestRefactoringVerifier-1/README.md | 48 +++++++++++++++++ .../Testing/CSharp/MSTest/README.md | 14 +++++ src/Analyzers/README.md | 4 +- src/Directory.Build.props | 24 ++++----- src/Formatting.Analyzers/README.md | 1 + src/Tests/README.md | 7 +++ src/VisualStudio/Properties/AssemblyInfo.cs | 2 +- .../source.extension.vsixmanifest | 2 +- src/VisualStudioCode/package/CHANGELOG.md | 35 ++++++++++++ .../package/package-lock.json | 4 +- src/VisualStudioCode/package/package.json | 2 +- .../src/configurationFiles.generated.ts | 15 +++++- tools/build.cmd | 4 +- tools/build_vscode.cmd | 2 +- tools/generate_cli_documentation.cmd | 2 +- tools/generate_documentation.cmd | 5 +- tools/reinstall_dotnet_cli_debug.cmd | 2 +- 29 files changed, 341 insertions(+), 35 deletions(-) create mode 100644 docs/api/Roslynator/Testing/CSharp/MSTest/MSTestCompilerDiagnosticFixVerifier-1/-ctor/README.md create mode 100644 docs/api/Roslynator/Testing/CSharp/MSTest/MSTestCompilerDiagnosticFixVerifier-1/README.md create mode 100644 docs/api/Roslynator/Testing/CSharp/MSTest/MSTestDiagnosticVerifier-2/-ctor/README.md create mode 100644 docs/api/Roslynator/Testing/CSharp/MSTest/MSTestDiagnosticVerifier-2/README.md create mode 100644 docs/api/Roslynator/Testing/CSharp/MSTest/MSTestRefactoringVerifier-1/-ctor/README.md create mode 100644 docs/api/Roslynator/Testing/CSharp/MSTest/MSTestRefactoringVerifier-1/README.md create mode 100644 docs/api/Roslynator/Testing/CSharp/MSTest/README.md diff --git a/ChangeLog.md b/ChangeLog.md index c0770789e4..07d7de58a9 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [4.2.0] - 2022-11-27 + ### Added - Add Arm64 VS 2022 extension support ([#990](https://github.com/JosefPihrt/Roslynator/pull/990) by @snickler). diff --git a/docs/Configuration.md b/docs/Configuration.md index 09929292d4..7f662cd422 100644 --- a/docs/Configuration.md +++ b/docs/Configuration.md @@ -75,6 +75,9 @@ roslynator_arrow_token_new_line = after|before roslynator_binary_operator_new_line = after|before # Applicable to: rcs0027 +roslynator_blank_line_after_file_scoped_namespace_declaration = true|false +# Applicable to: rcs0060 + roslynator_blank_line_between_closing_brace_and_switch_section = true|false # Applicable to: rcs0014, rcs1036 @@ -326,6 +329,10 @@ dotnet_diagnostic.rcs0058.severity = none dotnet_diagnostic.rcs0059.severity = none # Options: roslynator_null_conditional_operator_new_line +# Add/remove line after file scoped namespace declaration +dotnet_diagnostic.rcs0060.severity = none +# Options: roslynator_blank_line_after_file_scoped_namespace_declaration + # Add braces (when expression spans over multiple lines) dotnet_diagnostic.rcs1001.severity = suggestion @@ -508,7 +515,7 @@ dotnet_diagnostic.rcs1078.severity = none dotnet_diagnostic.rcs1079.severity = none # Use 'Count/Length' property instead of 'Any' method -dotnet_diagnostic.rcs1080.severity = suggestion +dotnet_diagnostic.rcs1080.severity = none # Split variable declaration dotnet_diagnostic.rcs1081.severity = none @@ -933,6 +940,12 @@ dotnet_diagnostic.rcs1253.severity = none dotnet_diagnostic.rcs1254.severity = suggestion # Options: roslynator_enum_flag_value_style +# Simplify argument null check +dotnet_diagnostic.rcs1255.severity = none + +# Invalid argument null check +dotnet_diagnostic.rcs1256.severity = suggestion + # Use pattern matching dotnet_diagnostic.rcs9001.severity = silent diff --git a/docs/api.txt b/docs/api.txt index 78b8f35f30..bbe9e0e750 100644 --- a/docs/api.txt +++ b/docs/api.txt @@ -1,10 +1,11 @@ -assembly Roslynator.Core, Version=4.1.2.0, Culture=neutral, PublicKeyToken=926ea54d246a765e -assembly Roslynator.CSharp, Version=4.1.2.0, Culture=neutral, PublicKeyToken=926ea54d246a765e -assembly Roslynator.CSharp.Workspaces, Version=4.1.2.0, Culture=neutral, PublicKeyToken=926ea54d246a765e -assembly Roslynator.Testing.Common, Version=4.1.2.0, Culture=neutral, PublicKeyToken=926ea54d246a765e -assembly Roslynator.Testing.CSharp, Version=4.1.2.0, Culture=neutral, PublicKeyToken=926ea54d246a765e -assembly Roslynator.Testing.CSharp.Xunit, Version=4.1.2.0, Culture=neutral, PublicKeyToken=926ea54d246a765e -assembly Roslynator.Workspaces.Core, Version=4.1.2.0, Culture=neutral, PublicKeyToken=926ea54d246a765e +assembly Roslynator.Core, Version=4.2.0.0, Culture=neutral, PublicKeyToken=926ea54d246a765e +assembly Roslynator.CSharp, Version=4.2.0.0, Culture=neutral, PublicKeyToken=926ea54d246a765e +assembly Roslynator.CSharp.Workspaces, Version=4.2.0.0, Culture=neutral, PublicKeyToken=926ea54d246a765e +assembly Roslynator.Testing.Common, Version=4.2.0.0, Culture=neutral, PublicKeyToken=926ea54d246a765e +assembly Roslynator.Testing.CSharp, Version=4.2.0.0, Culture=neutral, PublicKeyToken=926ea54d246a765e +assembly Roslynator.Testing.CSharp.MSTest, Version=4.2.0.0, Culture=neutral, PublicKeyToken=926ea54d246a765e +assembly Roslynator.Testing.CSharp.Xunit, Version=4.2.0.0, Culture=neutral, PublicKeyToken=926ea54d246a765e +assembly Roslynator.Workspaces.Core, Version=4.2.0.0, Culture=neutral, PublicKeyToken=926ea54d246a765e namespace Roslynator @@ -1769,6 +1770,20 @@ namespace Roslynator.Testing.CSharp public CSharpTestOptions WithMetadataReferences(IEnumerable values); public CSharpTestOptions WithParseOptions(CSharpParseOptions parseOptions); +namespace Roslynator.Testing.CSharp.MSTest + + public abstract class MSTestCompilerDiagnosticFixVerifier : CSharpCompilerDiagnosticFixVerifier where TFixProvider : CodeFixProvider, new() + + protected MSTestCompilerDiagnosticFixVerifier(); + + public abstract class MSTestDiagnosticVerifier : CSharpDiagnosticVerifier where TAnalyzer : DiagnosticAnalyzer, new() where TFixProvider : CodeFixProvider, new() + + protected MSTestDiagnosticVerifier(); + + public abstract class MSTestRefactoringVerifier : CSharpRefactoringVerifier where TRefactoringProvider : CodeRefactoringProvider, new() + + protected MSTestRefactoringVerifier(); + namespace Roslynator.Testing.CSharp.Xunit public abstract class XunitCompilerDiagnosticFixVerifier : CSharpCompilerDiagnosticFixVerifier where TFixProvider : CodeFixProvider, new() diff --git a/docs/api/README.md b/docs/api/README.md index 364eee6297..2cd7046aae 100644 --- a/docs/api/README.md +++ b/docs/api/README.md @@ -96,6 +96,10 @@ * [CSharpDiagnosticVerifier\](Roslynator/Testing/CSharp/CSharpDiagnosticVerifier-2/README.md) * [CSharpRefactoringVerifier\](Roslynator/Testing/CSharp/CSharpRefactoringVerifier-1/README.md) * [CSharpTestOptions](Roslynator/Testing/CSharp/CSharpTestOptions/README.md) +* [Roslynator.Testing.CSharp.MSTest](Roslynator/Testing/CSharp/MSTest/README.md) + * [MSTestCompilerDiagnosticFixVerifier\](Roslynator/Testing/CSharp/MSTest/MSTestCompilerDiagnosticFixVerifier-1/README.md) + * [MSTestDiagnosticVerifier\](Roslynator/Testing/CSharp/MSTest/MSTestDiagnosticVerifier-2/README.md) + * [MSTestRefactoringVerifier\](Roslynator/Testing/CSharp/MSTest/MSTestRefactoringVerifier-1/README.md) * [Roslynator.Testing.CSharp.Xunit](Roslynator/Testing/CSharp/Xunit/README.md) * [XunitCompilerDiagnosticFixVerifier\](Roslynator/Testing/CSharp/Xunit/XunitCompilerDiagnosticFixVerifier-1/README.md) * [XunitDiagnosticVerifier\](Roslynator/Testing/CSharp/Xunit/XunitDiagnosticVerifier-2/README.md) @@ -111,12 +115,15 @@ *   [•](#class-hierarchy-System_Object "Object")   [CodeVerifier](Roslynator/Testing/CodeVerifier/README.md) *   [•](#class-hierarchy-System_Object "Object")   [•](#class-hierarchy-Roslynator_Testing_CodeVerifier "CodeVerifier")   [CompilerDiagnosticFixVerifier\](Roslynator/Testing/CompilerDiagnosticFixVerifier-1/README.md) *   [•](#class-hierarchy-System_Object "Object")   [•](#class-hierarchy-Roslynator_Testing_CodeVerifier "CodeVerifier")   [•](#class-hierarchy-Roslynator_Testing_CompilerDiagnosticFixVerifier_1 "CompilerDiagnosticFixVerifier")   [CSharpCompilerDiagnosticFixVerifier\](Roslynator/Testing/CSharp/CSharpCompilerDiagnosticFixVerifier-1/README.md) +*   [•](#class-hierarchy-System_Object "Object")   [•](#class-hierarchy-Roslynator_Testing_CodeVerifier "CodeVerifier")   [•](#class-hierarchy-Roslynator_Testing_CompilerDiagnosticFixVerifier_1 "CompilerDiagnosticFixVerifier")   [•](#class-hierarchy-Roslynator_Testing_CSharp_CSharpCompilerDiagnosticFixVerifier_1 "CSharpCompilerDiagnosticFixVerifier")   [MSTestCompilerDiagnosticFixVerifier\](Roslynator/Testing/CSharp/MSTest/MSTestCompilerDiagnosticFixVerifier-1/README.md) *   [•](#class-hierarchy-System_Object "Object")   [•](#class-hierarchy-Roslynator_Testing_CodeVerifier "CodeVerifier")   [•](#class-hierarchy-Roslynator_Testing_CompilerDiagnosticFixVerifier_1 "CompilerDiagnosticFixVerifier")   [•](#class-hierarchy-Roslynator_Testing_CSharp_CSharpCompilerDiagnosticFixVerifier_1 "CSharpCompilerDiagnosticFixVerifier")   [XunitCompilerDiagnosticFixVerifier\](Roslynator/Testing/CSharp/Xunit/XunitCompilerDiagnosticFixVerifier-1/README.md) *   [•](#class-hierarchy-System_Object "Object")   [•](#class-hierarchy-Roslynator_Testing_CodeVerifier "CodeVerifier")   [DiagnosticVerifier\](Roslynator/Testing/DiagnosticVerifier-2/README.md) *   [•](#class-hierarchy-System_Object "Object")   [•](#class-hierarchy-Roslynator_Testing_CodeVerifier "CodeVerifier")   [•](#class-hierarchy-Roslynator_Testing_DiagnosticVerifier_2 "DiagnosticVerifier")   [CSharpDiagnosticVerifier\](Roslynator/Testing/CSharp/CSharpDiagnosticVerifier-2/README.md) +*   [•](#class-hierarchy-System_Object "Object")   [•](#class-hierarchy-Roslynator_Testing_CodeVerifier "CodeVerifier")   [•](#class-hierarchy-Roslynator_Testing_DiagnosticVerifier_2 "DiagnosticVerifier")   [•](#class-hierarchy-Roslynator_Testing_CSharp_CSharpDiagnosticVerifier_2 "CSharpDiagnosticVerifier")   [MSTestDiagnosticVerifier\](Roslynator/Testing/CSharp/MSTest/MSTestDiagnosticVerifier-2/README.md) *   [•](#class-hierarchy-System_Object "Object")   [•](#class-hierarchy-Roslynator_Testing_CodeVerifier "CodeVerifier")   [•](#class-hierarchy-Roslynator_Testing_DiagnosticVerifier_2 "DiagnosticVerifier")   [•](#class-hierarchy-Roslynator_Testing_CSharp_CSharpDiagnosticVerifier_2 "CSharpDiagnosticVerifier")   [XunitDiagnosticVerifier\](Roslynator/Testing/CSharp/Xunit/XunitDiagnosticVerifier-2/README.md) *   [•](#class-hierarchy-System_Object "Object")   [•](#class-hierarchy-Roslynator_Testing_CodeVerifier "CodeVerifier")   [RefactoringVerifier\](Roslynator/Testing/RefactoringVerifier-1/README.md) *   [•](#class-hierarchy-System_Object "Object")   [•](#class-hierarchy-Roslynator_Testing_CodeVerifier "CodeVerifier")   [•](#class-hierarchy-Roslynator_Testing_RefactoringVerifier_1 "RefactoringVerifier")   [CSharpRefactoringVerifier\](Roslynator/Testing/CSharp/CSharpRefactoringVerifier-1/README.md) +*   [•](#class-hierarchy-System_Object "Object")   [•](#class-hierarchy-Roslynator_Testing_CodeVerifier "CodeVerifier")   [•](#class-hierarchy-Roslynator_Testing_RefactoringVerifier_1 "RefactoringVerifier")   [•](#class-hierarchy-Roslynator_Testing_CSharp_CSharpRefactoringVerifier_1 "CSharpRefactoringVerifier")   [MSTestRefactoringVerifier\](Roslynator/Testing/CSharp/MSTest/MSTestRefactoringVerifier-1/README.md) *   [•](#class-hierarchy-System_Object "Object")   [•](#class-hierarchy-Roslynator_Testing_CodeVerifier "CodeVerifier")   [•](#class-hierarchy-Roslynator_Testing_RefactoringVerifier_1 "RefactoringVerifier")   [•](#class-hierarchy-Roslynator_Testing_CSharp_CSharpRefactoringVerifier_1 "CSharpRefactoringVerifier")   [XunitRefactoringVerifier\](Roslynator/Testing/CSharp/Xunit/XunitRefactoringVerifier-1/README.md) *   [•](#class-hierarchy-System_Object "Object")   [CompilerDiagnosticFixTestData](Roslynator/Testing/CompilerDiagnosticFixTestData/README.md) *   [•](#class-hierarchy-System_Object "Object")   [DiagnosticTestData](Roslynator/Testing/DiagnosticTestData/README.md) diff --git a/docs/api/Roslynator/Testing/CSharp/CSharpCompilerDiagnosticFixVerifier-1/README.md b/docs/api/Roslynator/Testing/CSharp/CSharpCompilerDiagnosticFixVerifier-1/README.md index 0983ae519c..a9a7bb5910 100644 --- a/docs/api/Roslynator/Testing/CSharp/CSharpCompilerDiagnosticFixVerifier-1/README.md +++ b/docs/api/Roslynator/Testing/CSharp/CSharpCompilerDiagnosticFixVerifier-1/README.md @@ -23,6 +23,7 @@ public abstract class CSharpCompilerDiagnosticFixVerifier : Roslyn ### Derived +* [MSTestCompilerDiagnosticFixVerifier\](../MSTest/MSTestCompilerDiagnosticFixVerifier-1/README.md) * [XunitCompilerDiagnosticFixVerifier\](../Xunit/XunitCompilerDiagnosticFixVerifier-1/README.md) ## Properties diff --git a/docs/api/Roslynator/Testing/CSharp/CSharpDiagnosticVerifier-2/README.md b/docs/api/Roslynator/Testing/CSharp/CSharpDiagnosticVerifier-2/README.md index 18ca3e2c49..702f9147cd 100644 --- a/docs/api/Roslynator/Testing/CSharp/CSharpDiagnosticVerifier-2/README.md +++ b/docs/api/Roslynator/Testing/CSharp/CSharpDiagnosticVerifier-2/README.md @@ -27,6 +27,7 @@ public abstract class CSharpDiagnosticVerifier : Roslyn ### Derived +* [MSTestDiagnosticVerifier\](../MSTest/MSTestDiagnosticVerifier-2/README.md) * [XunitDiagnosticVerifier\](../Xunit/XunitDiagnosticVerifier-2/README.md) ## Properties diff --git a/docs/api/Roslynator/Testing/CSharp/CSharpRefactoringVerifier-1/README.md b/docs/api/Roslynator/Testing/CSharp/CSharpRefactoringVerifier-1/README.md index 36c20db3ab..86d3af60eb 100644 --- a/docs/api/Roslynator/Testing/CSharp/CSharpRefactoringVerifier-1/README.md +++ b/docs/api/Roslynator/Testing/CSharp/CSharpRefactoringVerifier-1/README.md @@ -23,6 +23,7 @@ public abstract class CSharpRefactoringVerifier : Roslynat ### Derived +* [MSTestRefactoringVerifier\](../MSTest/MSTestRefactoringVerifier-1/README.md) * [XunitRefactoringVerifier\](../Xunit/XunitRefactoringVerifier-1/README.md) ## Properties diff --git a/docs/api/Roslynator/Testing/CSharp/MSTest/MSTestCompilerDiagnosticFixVerifier-1/-ctor/README.md b/docs/api/Roslynator/Testing/CSharp/MSTest/MSTestCompilerDiagnosticFixVerifier-1/-ctor/README.md new file mode 100644 index 0000000000..ff43a7505d --- /dev/null +++ b/docs/api/Roslynator/Testing/CSharp/MSTest/MSTestCompilerDiagnosticFixVerifier-1/-ctor/README.md @@ -0,0 +1,15 @@ +# MSTestCompilerDiagnosticFixVerifier\(\) Constructor + +[Home](../../../../../../README.md) + +**Containing Type**: [MSTestCompilerDiagnosticFixVerifier\](../README.md) + +**Assembly**: Roslynator\.Testing\.CSharp\.MSTest\.dll + + +Initializes a new instance of [MSTestCompilerDiagnosticFixVerifier\](../README.md) + +```csharp +protected MSTestCompilerDiagnosticFixVerifier() +``` + diff --git a/docs/api/Roslynator/Testing/CSharp/MSTest/MSTestCompilerDiagnosticFixVerifier-1/README.md b/docs/api/Roslynator/Testing/CSharp/MSTest/MSTestCompilerDiagnosticFixVerifier-1/README.md new file mode 100644 index 0000000000..86c5d5ee84 --- /dev/null +++ b/docs/api/Roslynator/Testing/CSharp/MSTest/MSTestCompilerDiagnosticFixVerifier-1/README.md @@ -0,0 +1,48 @@ +# MSTestCompilerDiagnosticFixVerifier\ Class + +[Home](../../../../../README.md) • [Constructors](#constructors) • [Properties](#properties) • [Methods](#methods) + +**Namespace**: [Roslynator.Testing.CSharp.MSTest](../README.md) + +**Assembly**: Roslynator\.Testing\.CSharp\.MSTest\.dll + + +Represents a verifier for C\# compiler diagnostics\. + +```csharp +public abstract class MSTestCompilerDiagnosticFixVerifier : Roslynator.Testing.CSharp.CSharpCompilerDiagnosticFixVerifier where TFixProvider : Microsoft.CodeAnalysis.CodeFixes.CodeFixProvider, new() +``` + +### Type Parameters + +**TFixProvider** + +### Inheritance + +[Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [CodeVerifier](../../../CodeVerifier/README.md) → [CompilerDiagnosticFixVerifier\](../../../CompilerDiagnosticFixVerifier-1/README.md) → [CSharpCompilerDiagnosticFixVerifier\](../../CSharpCompilerDiagnosticFixVerifier-1/README.md) → MSTestCompilerDiagnosticFixVerifier\ + +## Constructors + +| Constructor | Summary | +| ----------- | ------- | +| [MSTestCompilerDiagnosticFixVerifier()](-ctor/README.md) | Initializes a new instance of [MSTestCompilerDiagnosticFixVerifier\](./README.md) | + +## Properties + +| Property | Summary | +| -------- | ------- | +| [CommonOptions](../../CSharpCompilerDiagnosticFixVerifier-1/CommonOptions/README.md) | Gets common test options\. \(Inherited from [CSharpCompilerDiagnosticFixVerifier\](../../CSharpCompilerDiagnosticFixVerifier-1/README.md)\) | +| [Options](../../CSharpCompilerDiagnosticFixVerifier-1/Options/README.md) | Gets a test options\. \(Inherited from [CSharpCompilerDiagnosticFixVerifier\](../../CSharpCompilerDiagnosticFixVerifier-1/README.md)\) | + +## Methods + +| Method | Summary | +| ------ | ------- | +| [Equals(Object)](https://docs.microsoft.com/en-us/dotnet/api/system.object.equals) | \(Inherited from [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object)\) | +| [GetHashCode()](https://docs.microsoft.com/en-us/dotnet/api/system.object.gethashcode) | \(Inherited from [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object)\) | +| [GetType()](https://docs.microsoft.com/en-us/dotnet/api/system.object.gettype) | \(Inherited from [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object)\) | +| [MemberwiseClone()](https://docs.microsoft.com/en-us/dotnet/api/system.object.memberwiseclone) | \(Inherited from [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object)\) | +| [ToString()](https://docs.microsoft.com/en-us/dotnet/api/system.object.tostring) | \(Inherited from [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object)\) | +| [VerifyFixAsync(CompilerDiagnosticFixTestData, ExpectedTestState, TestOptions, CancellationToken)](../../../CompilerDiagnosticFixVerifier-1/VerifyFixAsync/README.md) | Verifies that specified source will produce compiler diagnostic\. \(Inherited from [CompilerDiagnosticFixVerifier\](../../../CompilerDiagnosticFixVerifier-1/README.md)\) | +| [VerifyNoFixAsync(CompilerDiagnosticFixTestData, TestOptions, CancellationToken)](../../../CompilerDiagnosticFixVerifier-1/VerifyNoFixAsync/README.md) | Verifies that specified source will not produce compiler diagnostic\. \(Inherited from [CompilerDiagnosticFixVerifier\](../../../CompilerDiagnosticFixVerifier-1/README.md)\) | + diff --git a/docs/api/Roslynator/Testing/CSharp/MSTest/MSTestDiagnosticVerifier-2/-ctor/README.md b/docs/api/Roslynator/Testing/CSharp/MSTest/MSTestDiagnosticVerifier-2/-ctor/README.md new file mode 100644 index 0000000000..5fc701a87a --- /dev/null +++ b/docs/api/Roslynator/Testing/CSharp/MSTest/MSTestDiagnosticVerifier-2/-ctor/README.md @@ -0,0 +1,15 @@ +# MSTestDiagnosticVerifier\(\) Constructor + +[Home](../../../../../../README.md) + +**Containing Type**: [MSTestDiagnosticVerifier\](../README.md) + +**Assembly**: Roslynator\.Testing\.CSharp\.MSTest\.dll + + +Initializes a new instance of [MSTestDiagnosticVerifier\](../README.md)\. + +```csharp +protected MSTestDiagnosticVerifier() +``` + diff --git a/docs/api/Roslynator/Testing/CSharp/MSTest/MSTestDiagnosticVerifier-2/README.md b/docs/api/Roslynator/Testing/CSharp/MSTest/MSTestDiagnosticVerifier-2/README.md new file mode 100644 index 0000000000..602d6350ff --- /dev/null +++ b/docs/api/Roslynator/Testing/CSharp/MSTest/MSTestDiagnosticVerifier-2/README.md @@ -0,0 +1,54 @@ +# MSTestDiagnosticVerifier\ Class + +[Home](../../../../../README.md) • [Constructors](#constructors) • [Properties](#properties) • [Methods](#methods) + +**Namespace**: [Roslynator.Testing.CSharp.MSTest](../README.md) + +**Assembly**: Roslynator\.Testing\.CSharp\.MSTest\.dll + + +Represents a verifier for a C\# diagnostic that is produced by [DiagnosticAnalyzer](https://docs.microsoft.com/en-us/dotnet/api/microsoft.codeanalysis.diagnostics.diagnosticanalyzer)\. + +```csharp +public abstract class MSTestDiagnosticVerifier : Roslynator.Testing.CSharp.CSharpDiagnosticVerifier + where TAnalyzer : Microsoft.CodeAnalysis.Diagnostics.DiagnosticAnalyzer, new() + where TFixProvider : Microsoft.CodeAnalysis.CodeFixes.CodeFixProvider, new() +``` + +### Type Parameters + +**TAnalyzer** + +**TFixProvider** + +### Inheritance + +[Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [CodeVerifier](../../../CodeVerifier/README.md) → [DiagnosticVerifier\](../../../DiagnosticVerifier-2/README.md) → [CSharpDiagnosticVerifier\](../../CSharpDiagnosticVerifier-2/README.md) → MSTestDiagnosticVerifier\ + +## Constructors + +| Constructor | Summary | +| ----------- | ------- | +| [MSTestDiagnosticVerifier()](-ctor/README.md) | Initializes a new instance of [MSTestDiagnosticVerifier\](./README.md)\. | + +## Properties + +| Property | Summary | +| -------- | ------- | +| [CommonOptions](../../CSharpDiagnosticVerifier-2/CommonOptions/README.md) | Gets common test options\. \(Inherited from [CSharpDiagnosticVerifier\](../../CSharpDiagnosticVerifier-2/README.md)\) | +| [Options](../../CSharpDiagnosticVerifier-2/Options/README.md) | Gets a test options\. \(Inherited from [CSharpDiagnosticVerifier\](../../CSharpDiagnosticVerifier-2/README.md)\) | + +## Methods + +| Method | Summary | +| ------ | ------- | +| [Equals(Object)](https://docs.microsoft.com/en-us/dotnet/api/system.object.equals) | \(Inherited from [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object)\) | +| [GetHashCode()](https://docs.microsoft.com/en-us/dotnet/api/system.object.gethashcode) | \(Inherited from [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object)\) | +| [GetType()](https://docs.microsoft.com/en-us/dotnet/api/system.object.gettype) | \(Inherited from [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object)\) | +| [MemberwiseClone()](https://docs.microsoft.com/en-us/dotnet/api/system.object.memberwiseclone) | \(Inherited from [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object)\) | +| [ToString()](https://docs.microsoft.com/en-us/dotnet/api/system.object.tostring) | \(Inherited from [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object)\) | +| [VerifyDiagnosticAndFixAsync(DiagnosticTestData, ExpectedTestState, TestOptions, CancellationToken)](../../../DiagnosticVerifier-2/VerifyDiagnosticAndFixAsync/README.md) | Verifies that specified source will produce specified diagnostic and that the diagnostic will be fixed\. \(Inherited from [DiagnosticVerifier\](../../../DiagnosticVerifier-2/README.md)\) | +| [VerifyDiagnosticAndNoFixAsync(DiagnosticTestData, TestOptions, CancellationToken)](../../../DiagnosticVerifier-2/VerifyDiagnosticAndNoFixAsync/README.md) | Verifies that specified source will produce specified diagnostic and that the diagnostic will not be fixed\. \(Inherited from [DiagnosticVerifier\](../../../DiagnosticVerifier-2/README.md)\) | +| [VerifyDiagnosticAsync(DiagnosticTestData, TestOptions, CancellationToken)](../../../DiagnosticVerifier-2/VerifyDiagnosticAsync/README.md) | Verifies that specified source will produce specified diagnostic\(s\)\. \(Inherited from [DiagnosticVerifier\](../../../DiagnosticVerifier-2/README.md)\) | +| [VerifyNoDiagnosticAsync(DiagnosticTestData, TestOptions, CancellationToken)](../../../DiagnosticVerifier-2/VerifyNoDiagnosticAsync/README.md) | Verifies that specified source will not produce specified diagnostic\. \(Inherited from [DiagnosticVerifier\](../../../DiagnosticVerifier-2/README.md)\) | + diff --git a/docs/api/Roslynator/Testing/CSharp/MSTest/MSTestRefactoringVerifier-1/-ctor/README.md b/docs/api/Roslynator/Testing/CSharp/MSTest/MSTestRefactoringVerifier-1/-ctor/README.md new file mode 100644 index 0000000000..f57d6c463c --- /dev/null +++ b/docs/api/Roslynator/Testing/CSharp/MSTest/MSTestRefactoringVerifier-1/-ctor/README.md @@ -0,0 +1,15 @@ +# MSTestRefactoringVerifier\(\) Constructor + +[Home](../../../../../../README.md) + +**Containing Type**: [MSTestRefactoringVerifier\](../README.md) + +**Assembly**: Roslynator\.Testing\.CSharp\.MSTest\.dll + + +Initializes a new instance of [MSTestRefactoringVerifier\](../README.md)\. + +```csharp +protected MSTestRefactoringVerifier() +``` + diff --git a/docs/api/Roslynator/Testing/CSharp/MSTest/MSTestRefactoringVerifier-1/README.md b/docs/api/Roslynator/Testing/CSharp/MSTest/MSTestRefactoringVerifier-1/README.md new file mode 100644 index 0000000000..f9bfb047b3 --- /dev/null +++ b/docs/api/Roslynator/Testing/CSharp/MSTest/MSTestRefactoringVerifier-1/README.md @@ -0,0 +1,48 @@ +# MSTestRefactoringVerifier\ Class + +[Home](../../../../../README.md) • [Constructors](#constructors) • [Properties](#properties) • [Methods](#methods) + +**Namespace**: [Roslynator.Testing.CSharp.MSTest](../README.md) + +**Assembly**: Roslynator\.Testing\.CSharp\.MSTest\.dll + + +Represents verifier for a C\# code refactoring\. + +```csharp +public abstract class MSTestRefactoringVerifier : Roslynator.Testing.CSharp.CSharpRefactoringVerifier where TRefactoringProvider : Microsoft.CodeAnalysis.CodeRefactorings.CodeRefactoringProvider, new() +``` + +### Type Parameters + +**TRefactoringProvider** + +### Inheritance + +[Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [CodeVerifier](../../../CodeVerifier/README.md) → [RefactoringVerifier\](../../../RefactoringVerifier-1/README.md) → [CSharpRefactoringVerifier\](../../CSharpRefactoringVerifier-1/README.md) → MSTestRefactoringVerifier\ + +## Constructors + +| Constructor | Summary | +| ----------- | ------- | +| [MSTestRefactoringVerifier()](-ctor/README.md) | Initializes a new instance of [MSTestRefactoringVerifier\](./README.md)\. | + +## Properties + +| Property | Summary | +| -------- | ------- | +| [CommonOptions](../../CSharpRefactoringVerifier-1/CommonOptions/README.md) | Gets common test options\. \(Inherited from [CSharpRefactoringVerifier\](../../CSharpRefactoringVerifier-1/README.md)\) | +| [Options](../../CSharpRefactoringVerifier-1/Options/README.md) | Gets a test options\. \(Inherited from [CSharpRefactoringVerifier\](../../CSharpRefactoringVerifier-1/README.md)\) | + +## Methods + +| Method | Summary | +| ------ | ------- | +| [Equals(Object)](https://docs.microsoft.com/en-us/dotnet/api/system.object.equals) | \(Inherited from [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object)\) | +| [GetHashCode()](https://docs.microsoft.com/en-us/dotnet/api/system.object.gethashcode) | \(Inherited from [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object)\) | +| [GetType()](https://docs.microsoft.com/en-us/dotnet/api/system.object.gettype) | \(Inherited from [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object)\) | +| [MemberwiseClone()](https://docs.microsoft.com/en-us/dotnet/api/system.object.memberwiseclone) | \(Inherited from [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object)\) | +| [ToString()](https://docs.microsoft.com/en-us/dotnet/api/system.object.tostring) | \(Inherited from [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object)\) | +| [VerifyNoRefactoringAsync(RefactoringTestData, TestOptions, CancellationToken)](../../../RefactoringVerifier-1/VerifyNoRefactoringAsync/README.md) | Verifies that refactoring will not be applied using specified **TRefactoringProvider**\. \(Inherited from [RefactoringVerifier\](../../../RefactoringVerifier-1/README.md)\) | +| [VerifyRefactoringAsync(RefactoringTestData, ExpectedTestState, TestOptions, CancellationToken)](../../../RefactoringVerifier-1/VerifyRefactoringAsync/README.md) | Verifies that refactoring will be applied correctly using specified **TRefactoringProvider**\. \(Inherited from [RefactoringVerifier\](../../../RefactoringVerifier-1/README.md)\) | + diff --git a/docs/api/Roslynator/Testing/CSharp/MSTest/README.md b/docs/api/Roslynator/Testing/CSharp/MSTest/README.md new file mode 100644 index 0000000000..572ecdf0a2 --- /dev/null +++ b/docs/api/Roslynator/Testing/CSharp/MSTest/README.md @@ -0,0 +1,14 @@ +# Roslynator\.Testing\.CSharp\.MSTest Namespace + +[Home](../../../../README.md) • [Classes](#classes) + +**Containing Namespace**: [Roslynator.Testing.CSharp](../README.md) + +## Classes + +| Class | Summary | +| ----- | ------- | +| [MSTestCompilerDiagnosticFixVerifier\](MSTestCompilerDiagnosticFixVerifier-1/README.md) | Represents a verifier for C\# compiler diagnostics\. | +| [MSTestDiagnosticVerifier\](MSTestDiagnosticVerifier-2/README.md) | Represents a verifier for a C\# diagnostic that is produced by [DiagnosticAnalyzer](https://docs.microsoft.com/en-us/dotnet/api/microsoft.codeanalysis.diagnostics.diagnosticanalyzer)\. | +| [MSTestRefactoringVerifier\](MSTestRefactoringVerifier-1/README.md) | Represents verifier for a C\# code refactoring\. | + diff --git a/src/Analyzers/README.md b/src/Analyzers/README.md index 0ff7b82eb9..74bd6ba0f4 100644 --- a/src/Analyzers/README.md +++ b/src/Analyzers/README.md @@ -65,7 +65,7 @@ | RCS1077 | [Optimize LINQ method call](../../docs/analyzers/RCS1077.md) | Info | | RCS1078 | [Use "" or 'string.Empty'](../../docs/analyzers/RCS1078.md) | None | | RCS1079 | [Throwing of new NotImplementedException](../../docs/analyzers/RCS1079.md) | None | -| RCS1080 | [Use 'Count/Length' property instead of 'Any' method](../../docs/analyzers/RCS1080.md) | Info | +| RCS1080 | [Use 'Count/Length' property instead of 'Any' method](../../docs/analyzers/RCS1080.md) | None | | RCS1081 | [Split variable declaration](../../docs/analyzers/RCS1081.md) | None | | RCS1084 | [Use coalesce expression instead of conditional expression](../../docs/analyzers/RCS1084.md) | Info | | RCS1085 | [Use auto-implemented property](../../docs/analyzers/RCS1085.md) | Info | @@ -207,6 +207,8 @@ | RCS1252 | [Normalize usage of infinite loop](../../docs/analyzers/RCS1252.md) | None | | RCS1253 | [Format documentation comment summary](../../docs/analyzers/RCS1253.md) | None | | RCS1254 | [Normalize format of enum flag value](../../docs/analyzers/RCS1254.md) | Info | +| RCS1255 | [Simplify argument null check](../../docs/analyzers/RCS1255.md) | None | +| RCS1256 | [Invalid argument null check](../../docs/analyzers/RCS1256.md) | Info | *\(Generated with [DotMarkdown](http://github.com/JosefPihrt/DotMarkdown)\)* \ No newline at end of file diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 0f1e960927..4128d4ac64 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -11,18 +11,18 @@ - 4.1.2.0 - 4.1.2 - 4.1.2.0 - 4.1.2 - 0.4.0.0 - 0.4.0 - 4.1.2.0 - 4.1.2 - 4.1.2.0 - 4.1.2 - 4.1.2.0 - 4.1.2 + 4.2.0.0 + 4.2.0 + 4.2.0.0 + 4.2.0 + 0.5.0.0 + 0.5.0 + 4.2.0.0 + 4.2.0 + 4.2.0.0 + 4.2.0 + 4.2.0.0 + 4.2.0 2.0.0 1.0.0 diff --git a/src/Formatting.Analyzers/README.md b/src/Formatting.Analyzers/README.md index e81ecb8837..647b215515 100644 --- a/src/Formatting.Analyzers/README.md +++ b/src/Formatting.Analyzers/README.md @@ -55,6 +55,7 @@ | RCS0057 | [Normalize whitespace at the beginning of a file](../../docs/analyzers/RCS0057.md) | None | | RCS0058 | [Normalize whitespace at the end of a file](../../docs/analyzers/RCS0058.md) | None | | RCS0059 | [Place new line after/before null-conditional operator](../../docs/analyzers/RCS0059.md) | None | +| RCS0060 | [Add/remove line after file scoped namespace declaration](../../docs/analyzers/RCS0060.md) | None | *\(Generated with [DotMarkdown](http://github.com/JosefPihrt/DotMarkdown)\)* \ No newline at end of file diff --git a/src/Tests/README.md b/src/Tests/README.md index 5888d54142..41f9c4e116 100644 --- a/src/Tests/README.md +++ b/src/Tests/README.md @@ -21,6 +21,10 @@ * [CSharpDiagnosticVerifier\](../../docs/api/Roslynator/Testing/CSharp/CSharpDiagnosticVerifier-2/README.md) * [CSharpRefactoringVerifier\](../../docs/api/Roslynator/Testing/CSharp/CSharpRefactoringVerifier-1/README.md) * [CSharpTestOptions](../../docs/api/Roslynator/Testing/CSharp/CSharpTestOptions/README.md) +* [Roslynator.Testing.CSharp.MSTest](../../docs/api/Roslynator/Testing/CSharp/MSTest/README.md) + * [MSTestCompilerDiagnosticFixVerifier\](../../docs/api/Roslynator/Testing/CSharp/MSTest/MSTestCompilerDiagnosticFixVerifier-1/README.md) + * [MSTestDiagnosticVerifier\](../../docs/api/Roslynator/Testing/CSharp/MSTest/MSTestDiagnosticVerifier-2/README.md) + * [MSTestRefactoringVerifier\](../../docs/api/Roslynator/Testing/CSharp/MSTest/MSTestRefactoringVerifier-1/README.md) * [Roslynator.Testing.CSharp.Xunit](../../docs/api/Roslynator/Testing/CSharp/Xunit/README.md) * [XunitCompilerDiagnosticFixVerifier\](../../docs/api/Roslynator/Testing/CSharp/Xunit/XunitCompilerDiagnosticFixVerifier-1/README.md) * [XunitDiagnosticVerifier\](../../docs/api/Roslynator/Testing/CSharp/Xunit/XunitDiagnosticVerifier-2/README.md) @@ -32,12 +36,15 @@ *   [•](#class-hierarchy-System_Object "Object")   [CodeVerifier](../../docs/api/Roslynator/Testing/CodeVerifier/README.md) *   [•](#class-hierarchy-System_Object "Object")   [•](#class-hierarchy-Roslynator_Testing_CodeVerifier "CodeVerifier")   [CompilerDiagnosticFixVerifier\](../../docs/api/Roslynator/Testing/CompilerDiagnosticFixVerifier-1/README.md) *   [•](#class-hierarchy-System_Object "Object")   [•](#class-hierarchy-Roslynator_Testing_CodeVerifier "CodeVerifier")   [•](#class-hierarchy-Roslynator_Testing_CompilerDiagnosticFixVerifier_1 "CompilerDiagnosticFixVerifier")   [CSharpCompilerDiagnosticFixVerifier\](../../docs/api/Roslynator/Testing/CSharp/CSharpCompilerDiagnosticFixVerifier-1/README.md) +*   [•](#class-hierarchy-System_Object "Object")   [•](#class-hierarchy-Roslynator_Testing_CodeVerifier "CodeVerifier")   [•](#class-hierarchy-Roslynator_Testing_CompilerDiagnosticFixVerifier_1 "CompilerDiagnosticFixVerifier")   [•](#class-hierarchy-Roslynator_Testing_CSharp_CSharpCompilerDiagnosticFixVerifier_1 "CSharpCompilerDiagnosticFixVerifier")   [MSTestCompilerDiagnosticFixVerifier\](../../docs/api/Roslynator/Testing/CSharp/MSTest/MSTestCompilerDiagnosticFixVerifier-1/README.md) *   [•](#class-hierarchy-System_Object "Object")   [•](#class-hierarchy-Roslynator_Testing_CodeVerifier "CodeVerifier")   [•](#class-hierarchy-Roslynator_Testing_CompilerDiagnosticFixVerifier_1 "CompilerDiagnosticFixVerifier")   [•](#class-hierarchy-Roslynator_Testing_CSharp_CSharpCompilerDiagnosticFixVerifier_1 "CSharpCompilerDiagnosticFixVerifier")   [XunitCompilerDiagnosticFixVerifier\](../../docs/api/Roslynator/Testing/CSharp/Xunit/XunitCompilerDiagnosticFixVerifier-1/README.md) *   [•](#class-hierarchy-System_Object "Object")   [•](#class-hierarchy-Roslynator_Testing_CodeVerifier "CodeVerifier")   [DiagnosticVerifier\](../../docs/api/Roslynator/Testing/DiagnosticVerifier-2/README.md) *   [•](#class-hierarchy-System_Object "Object")   [•](#class-hierarchy-Roslynator_Testing_CodeVerifier "CodeVerifier")   [•](#class-hierarchy-Roslynator_Testing_DiagnosticVerifier_2 "DiagnosticVerifier")   [CSharpDiagnosticVerifier\](../../docs/api/Roslynator/Testing/CSharp/CSharpDiagnosticVerifier-2/README.md) +*   [•](#class-hierarchy-System_Object "Object")   [•](#class-hierarchy-Roslynator_Testing_CodeVerifier "CodeVerifier")   [•](#class-hierarchy-Roslynator_Testing_DiagnosticVerifier_2 "DiagnosticVerifier")   [•](#class-hierarchy-Roslynator_Testing_CSharp_CSharpDiagnosticVerifier_2 "CSharpDiagnosticVerifier")   [MSTestDiagnosticVerifier\](../../docs/api/Roslynator/Testing/CSharp/MSTest/MSTestDiagnosticVerifier-2/README.md) *   [•](#class-hierarchy-System_Object "Object")   [•](#class-hierarchy-Roslynator_Testing_CodeVerifier "CodeVerifier")   [•](#class-hierarchy-Roslynator_Testing_DiagnosticVerifier_2 "DiagnosticVerifier")   [•](#class-hierarchy-Roslynator_Testing_CSharp_CSharpDiagnosticVerifier_2 "CSharpDiagnosticVerifier")   [XunitDiagnosticVerifier\](../../docs/api/Roslynator/Testing/CSharp/Xunit/XunitDiagnosticVerifier-2/README.md) *   [•](#class-hierarchy-System_Object "Object")   [•](#class-hierarchy-Roslynator_Testing_CodeVerifier "CodeVerifier")   [RefactoringVerifier\](../../docs/api/Roslynator/Testing/RefactoringVerifier-1/README.md) *   [•](#class-hierarchy-System_Object "Object")   [•](#class-hierarchy-Roslynator_Testing_CodeVerifier "CodeVerifier")   [•](#class-hierarchy-Roslynator_Testing_RefactoringVerifier_1 "RefactoringVerifier")   [CSharpRefactoringVerifier\](../../docs/api/Roslynator/Testing/CSharp/CSharpRefactoringVerifier-1/README.md) +*   [•](#class-hierarchy-System_Object "Object")   [•](#class-hierarchy-Roslynator_Testing_CodeVerifier "CodeVerifier")   [•](#class-hierarchy-Roslynator_Testing_RefactoringVerifier_1 "RefactoringVerifier")   [•](#class-hierarchy-Roslynator_Testing_CSharp_CSharpRefactoringVerifier_1 "CSharpRefactoringVerifier")   [MSTestRefactoringVerifier\](../../docs/api/Roslynator/Testing/CSharp/MSTest/MSTestRefactoringVerifier-1/README.md) *   [•](#class-hierarchy-System_Object "Object")   [•](#class-hierarchy-Roslynator_Testing_CodeVerifier "CodeVerifier")   [•](#class-hierarchy-Roslynator_Testing_RefactoringVerifier_1 "RefactoringVerifier")   [•](#class-hierarchy-Roslynator_Testing_CSharp_CSharpRefactoringVerifier_1 "CSharpRefactoringVerifier")   [XunitRefactoringVerifier\](../../docs/api/Roslynator/Testing/CSharp/Xunit/XunitRefactoringVerifier-1/README.md) *   [•](#class-hierarchy-System_Object "Object")   [CompilerDiagnosticFixTestData](../../docs/api/Roslynator/Testing/CompilerDiagnosticFixTestData/README.md) *   [•](#class-hierarchy-System_Object "Object")   [DiagnosticTestData](../../docs/api/Roslynator/Testing/DiagnosticTestData/README.md) diff --git a/src/VisualStudio/Properties/AssemblyInfo.cs b/src/VisualStudio/Properties/AssemblyInfo.cs index 167511e1f6..eb05937d7b 100644 --- a/src/VisualStudio/Properties/AssemblyInfo.cs +++ b/src/VisualStudio/Properties/AssemblyInfo.cs @@ -31,7 +31,7 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -//[assembly: AssemblyVersion("4.1.2.0")] +//[assembly: AssemblyVersion("4.2.0.0")] //[assembly: AssemblyFileVersion("1.0.0.0")] [assembly: NeutralResourcesLanguage("en-US")] diff --git a/src/VisualStudio/source.extension.vsixmanifest b/src/VisualStudio/source.extension.vsixmanifest index 1711153845..f7bd8e0771 100644 --- a/src/VisualStudio/source.extension.vsixmanifest +++ b/src/VisualStudio/source.extension.vsixmanifest @@ -1,7 +1,7 @@  - + Roslynator 2022 A collection of 500+ analyzers, refactorings and fixes for C#, powered by Roslyn. http://github.com/JosefPihrt/Roslynator diff --git a/src/VisualStudioCode/package/CHANGELOG.md b/src/VisualStudioCode/package/CHANGELOG.md index a6ac6d0295..4a325d970f 100644 --- a/src/VisualStudioCode/package/CHANGELOG.md +++ b/src/VisualStudioCode/package/CHANGELOG.md @@ -7,6 +7,41 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [4.2.0] - 2022-11-27 + +### Added + +- Add Arm64 VS 2022 extension support ([#990](https://github.com/JosefPihrt/Roslynator/pull/990) by @snickler). +- Add analyzer "Add/remove blank line after file scoped namespace declaration" ([RCS0060](https://github.com/JosefPihrt/Roslynator/blob/main/docs/analyzers/RCS0060.md)) ([#993](https://github.com/josefpihrt/roslynator/pull/993)). + - Required option: `roslynator_blank_line_after_file_scoped_namespace_declaration = true|false` + - Not enabled by default. +- Add analyzer "Simplify argument null check" ([RCS1255](https://github.com/JosefPihrt/Roslynator/blob/main/docs/analyzers/RCS1255.md)) ([#994](https://github.com/JosefPihrt/Roslynator/pull/994)). + - Use `ArgumentNullException.ThrowIfNull` instead of `if` null check. + - Not enabled by default. +- Add analyzer "Invalid argument null check" ([RCS1256](https://github.com/JosefPihrt/Roslynator/blob/main/docs/analyzers/RCS1256.md)) ([#888](https://github.com/JosefPihrt/Roslynator/pull/888)). + - This analyzer reports null checks of arguments that are: + - annotated as nullable reference type. + - optional and its default value is `null`. +- Add package `Roslynator.Testing.CSharp.MSTest` ([#997](https://github.com/JosefPihrt/Roslynator/pull/997)). + +### Changed + +- Disable [RCS1080](https://github.com/JosefPihrt/Roslynator/blob/main/docs/analyzers/RCS1080.md) by default ([#980](https://github.com/josefpihrt/roslynator/pull/980)). +- [CLI] Bump Roslyn to 4.4.0 ([#998](https://github.com/josefpihrt/roslynator/pull/998)). +- [CLI] Add support for .NET 7 and remove support for .NET 5 ([#985](https://github.com/josefpihrt/roslynator/pull/985). + +### Fixed + +- Fix [RCS1080](https://github.com/JosefPihrt/Roslynator/blob/main/docs/analyzers/RCS1080.md) when collection is derived from `List` ([#986](https://github.com/josefpihrt/roslynator/pull/986)). +- Fix retrieving of trusted platform assemblies - separator differs by OS ([#987](https://github.com/josefpihrt/roslynator/pull/987)). +- Fix refactoring ([RR0014](https://github.com/JosefPihrt/Roslynator/blob/main/docs/analyzers/RR0014.md)) ([#988](https://github.com/josefpihrt/roslynator/pull/988)). +- Fix refactoring ([RR0180](https://github.com/JosefPihrt/Roslynator/blob/main/docs/analyzers/RR0180.md)) ([#988](https://github.com/josefpihrt/roslynator/pull/988)). +- Recognize `ArgumentNullException.ThrowIfNull` ([RCS1227](https://github.com/JosefPihrt/Roslynator/blob/main/docs/analyzers/RCS1227.md)) ([#992](https://github.com/josefpihrt/roslynator/pull/992)). +- Detect pattern matching in [RCS1146](https://github.com/JosefPihrt/Roslynator/blob/main/docs/analyzers/RCS1146.md) ([#999](https://github.com/josefpihrt/roslynator/pull/999)). +- Handle `using` directive that starts with `global::` [RCS0015](https://github.com/JosefPihrt/Roslynator/blob/main/docs/analyzers/RCS0015.md) ([#1000](https://github.com/josefpihrt/roslynator/pull/1000)). +- [VS Extension] Reference all assemblies as 'Analyzer' and 'MefComponent' in vsix manifest ([#1002](https://github.com/josefpihrt/roslynator/pull/1002)). + - Fixes `AD0001` with `System.IO.FileNotFoundException` on Visual Studio 17.4 and later. + ## [4.1.2] - 2022-10-31 ### Added diff --git a/src/VisualStudioCode/package/package-lock.json b/src/VisualStudioCode/package/package-lock.json index 9fbe39dd3c..83cb5ec2a7 100644 --- a/src/VisualStudioCode/package/package-lock.json +++ b/src/VisualStudioCode/package/package-lock.json @@ -1,12 +1,12 @@ { "name": "roslynator", - "version": "4.1.2", + "version": "4.2.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "roslynator", - "version": "4.1.2", + "version": "4.2.0", "license": "Apache-2.0", "dependencies": { "json5": "^2.1.1" diff --git a/src/VisualStudioCode/package/package.json b/src/VisualStudioCode/package/package.json index 8c1aa4df2f..b2d6368374 100644 --- a/src/VisualStudioCode/package/package.json +++ b/src/VisualStudioCode/package/package.json @@ -4,7 +4,7 @@ "displayName": "Roslynator", "description": "A collection of 500+ analyzers, refactorings and fixes for C#, powered by Roslyn.", "icon": "images/icon.png", - "version": "4.1.2", + "version": "4.2.0", "author": "Josef Pihrt", "license": "Apache-2.0", "homepage": "https://github.com/josefpihrt/roslynator", diff --git a/src/VisualStudioCode/package/src/configurationFiles.generated.ts b/src/VisualStudioCode/package/src/configurationFiles.generated.ts index 249d8ae86d..76a0da9e23 100644 --- a/src/VisualStudioCode/package/src/configurationFiles.generated.ts +++ b/src/VisualStudioCode/package/src/configurationFiles.generated.ts @@ -47,6 +47,9 @@ roslynator_analyzers.enabled_by_default = true|false #roslynator_binary_operator_new_line = after|before # Applicable to: rcs0027 +#roslynator_blank_line_after_file_scoped_namespace_declaration = true|false +# Applicable to: rcs0060 + #roslynator_blank_line_between_closing_brace_and_switch_section = true|false # Applicable to: rcs0014, rcs1036 @@ -298,6 +301,10 @@ roslynator_analyzers.enabled_by_default = true|false #dotnet_diagnostic.rcs0059.severity = none # Options: roslynator_null_conditional_operator_new_line +# Add/remove line after file scoped namespace declaration +#dotnet_diagnostic.rcs0060.severity = none +# Options: roslynator_blank_line_after_file_scoped_namespace_declaration + # Add braces (when expression spans over multiple lines) #dotnet_diagnostic.rcs1001.severity = suggestion @@ -480,7 +487,7 @@ roslynator_analyzers.enabled_by_default = true|false #dotnet_diagnostic.rcs1079.severity = none # Use 'Count/Length' property instead of 'Any' method -#dotnet_diagnostic.rcs1080.severity = suggestion +#dotnet_diagnostic.rcs1080.severity = none # Split variable declaration #dotnet_diagnostic.rcs1081.severity = none @@ -905,6 +912,12 @@ roslynator_analyzers.enabled_by_default = true|false #dotnet_diagnostic.rcs1254.severity = suggestion # Options: roslynator_enum_flag_value_style +# Simplify argument null check +#dotnet_diagnostic.rcs1255.severity = none + +# Invalid argument null check +#dotnet_diagnostic.rcs1256.severity = suggestion + # Use pattern matching #dotnet_diagnostic.rcs9001.severity = silent diff --git a/tools/build.cmd b/tools/build.cmd index 7be006436e..aa10be6efd 100644 --- a/tools/build.cmd +++ b/tools/build.cmd @@ -5,8 +5,8 @@ set _programFiles=%ProgramFiles% set _msbuildPath="%_programFiles%\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\MSBuild" set _properties=Configuration=Release,Deterministic=true,TreatWarningsAsErrors=true,WarningsNotAsErrors=1591 set _outDir=..\out\Release -set _version=4.1.2 -set _version4=4.1.2.0 +set _version=4.2.0 +set _version4=4.2.0.0 orang replace "..\src\VisualStudio\source.extension.vsixmanifest" ^ -c "patterns\vsix_manifest_version.txt" from-file -t m r ^ diff --git a/tools/build_vscode.cmd b/tools/build_vscode.cmd index d9132c2e26..6cf9a5beb6 100644 --- a/tools/build_vscode.cmd +++ b/tools/build_vscode.cmd @@ -4,7 +4,7 @@ set _programFiles=%ProgramFiles% set _msbuildPath="%_programFiles%\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\MSBuild" set _properties=Configuration=Release,Deterministic=true,TreatWarningsAsErrors=true,WarningsNotAsErrors=1591,DefineConstants=VSCODE -set _version=4.1.2 +set _version=4.2.0 orang replace "..\src\VisualStudioCode\package\package.json" ^ -c "patterns\vscode_version.txt" from-file -t m r ^ diff --git a/tools/generate_cli_documentation.cmd b/tools/generate_cli_documentation.cmd index 8b8d6a3899..27beb1d24f 100644 --- a/tools/generate_cli_documentation.cmd +++ b/tools/generate_cli_documentation.cmd @@ -11,7 +11,7 @@ if errorlevel 1 ( exit ) -"..\src\CommandLine.DocumentationGenerator\bin\Release\net6.0\Roslynator.CommandLine.DocumentationGenerator.exe" "..\docs\cli" +"..\src\CommandLine.DocumentationGenerator\bin\Release\net7.0\Roslynator.CommandLine.DocumentationGenerator.exe" "..\docs\cli" if errorlevel 1 ( pause diff --git a/tools/generate_documentation.cmd b/tools/generate_documentation.cmd index 7f1dc9bb1a..bbde0688d0 100644 --- a/tools/generate_documentation.cmd +++ b/tools/generate_documentation.cmd @@ -2,12 +2,11 @@ set _programFiles=%ProgramFiles% -set _roslynatorExe="..\src\CommandLine\bin\Debug\net6.0\roslynator" -set _msbuildPath="%_programFiles%\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin" +set _roslynatorExe="..\src\CommandLine\bin\Debug\net7.0\roslynator" set _msbuildProperties="Configuration=Release" set _rootDirectoryUrl="../../docs/api/" -%_msbuildPath%\msbuild "..\src\CommandLine.sln" /t:Clean,Build /p:Configuration=Debug /v:m /m +dotnet build "..\src\CommandLine.sln" /t:Clean,Build /p:Configuration=Debug /v:m /m %_roslynatorExe% generate-doc "..\src\Core.sln" ^ --properties %_msbuildProperties% ^ diff --git a/tools/reinstall_dotnet_cli_debug.cmd b/tools/reinstall_dotnet_cli_debug.cmd index 9275f41b40..b7c211cee7 100644 --- a/tools/reinstall_dotnet_cli_debug.cmd +++ b/tools/reinstall_dotnet_cli_debug.cmd @@ -1,6 +1,6 @@ @echo off -rd /S /Q "..\src\CommandLine\bin\Debug\net6.0" +rd /S /Q "..\src\CommandLine\bin\Debug\net7.0" del /Q "..\src\CommandLine\bin\Debug\Roslynator.DotNet.Cli.*.nupkg"