diff --git a/ChangeLog.md b/ChangeLog.md index 3df2863175..ec7d7f544a 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -1,3 +1,23 @@ +### 3.2.0 (2021-04-26) + +* Publish [Roslynator Testing Framework](https://www.nuget.org/packages/Roslynator.Testing.CSharp.Xunit) +* Support editorconfig to configure analyzer options ([commit](https://github.com/JosefPihrt/Roslynator/commit/da88ce64e0b3975ad69e05a1d4cdcc761f358a09)) +* Update references to Roslyn API to 3.8.0 +* A bunch of bug fixes + +## Analyzers + +* Add option to invert analyzer [RCS1016](https://github.com/JosefPihrt/Roslynator/blob/master/docs/analyzers/RCS1016.md) ([commit](https://github.com/JosefPihrt/Roslynator/commit/67a0fc5cfe9dd793cc6e504513ed6805678c1739)) +* Add more cases to analyzer [RCS1218](https://github.com/JosefPihrt/Roslynator/blob/master/docs/analyzers/RCS1218.md) ([commit](https://github.com/JosefPihrt/Roslynator/commit/37e8edb7a2eefdd4a7749dd6a3f5b473ebbdcc0a)) +* Convert `!= null` to `is not null` ([RCS1248](https://github.com/JosefPihrt/Roslynator/blob/master/docs/analyzers/RCS1248.md)) ([commit](https://github.com/JosefPihrt/Roslynator/commit/432a8fea3147447536dbb8fac47598ad1db68158)) + +## Code Fixes + +* Add code fix for CS7036 ([commit](https://github.com/JosefPihrt/Roslynator/commit/9eae7307b9cab96c2d91e97aef8bda098c7e92d9)) +* Add code fix for CS8632 ([commit](https://github.com/JosefPihrt/Roslynator/commit/2c1d9ca64d2305e1ce278e1db6563d82582c4613)) +* Improve code fix for CS0029, CS0246 ([commit](https://github.com/JosefPihrt/Roslynator/commit/5557ad29412b5f758cb97da6e298e1f4b0d49e3d)) +* Add option for code fix for CS1591 ([commit](https://github.com/JosefPihrt/Roslynator/commit/089dbed656556a526f236dce75eadffb4e1d78a0)) + ### 3.1.0 (2021-01-04) * Add analyzer [RCS0056](https://github.com/JosefPihrt/Roslynator/blob/master/docs/analyzers/RCS0056.md) (Line is too long) diff --git a/README.md b/README.md index 01d4da5e49..0f1dbb0454 100644 --- a/README.md +++ b/README.md @@ -68,6 +68,12 @@ Although Roslynator products are free of charge, any [donation](https://www.payp * Roslynator CLI is also distributed as .NET Core Global Tool [Roslynator.DotNet.Cli](https://www.nuget.org/packages/Roslynator.DotNet.Cli).  [![NuGet](https://img.shields.io/nuget/v/Roslynator.DotNet.Cli.svg)](https://www.nuget.org/packages/Roslynator.DotNet.Cli) * See [documentation](docs/cli/README.md). +## Roslynator Testing Framework + +* Roslynator Testing Framework can be used for unit testing of analyzers, refactorings and code fixes. +* Framework is distributed as NuGet [package](https://www.nuget.org/packages/Roslynator.Testing.CSharp.Xunit).  [![NuGet](https://img.shields.io/nuget/v/Roslynator.Testing.CSharp.Xunit.svg)](https://www.nuget.org/packages/Roslynator.Testing.CSharp.Xunit) +* Extensive usage of the framework can be found [here](src/Tests) + ## Documentation * [Analyzers vs. Refactorings](docs/AnalyzersVsRefactorings.md) diff --git a/docs/analyzers/RCS0011.md b/docs/analyzers/RCS0011.md index 4f4629ae9e..279450bb62 100644 --- a/docs/analyzers/RCS0011.md +++ b/docs/analyzers/RCS0011.md @@ -31,7 +31,11 @@ string P ## Options -* [RCS0011i](RCS0011i.md) \- Remove empty line between single\-line accessors\. +### Remove empty line between single\-line accessors + +```editorconfig +roslynator.RCS0011.invert = true +``` ## Applies to @@ -39,7 +43,6 @@ string P ## See Also -* [Analyzer Options](../AnalyzerOptions.md) * [How to Suppress a Diagnostic](../HowToConfigureAnalyzers.md#how-to-suppress-a-diagnostic) diff --git a/docs/analyzers/RCS0015.md b/docs/analyzers/RCS0015.md index 5440ac2923..912381d13a 100644 --- a/docs/analyzers/RCS0015.md +++ b/docs/analyzers/RCS0015.md @@ -33,7 +33,11 @@ namespace N ## Options -* [RCS0015i](RCS0015i.md) \- Remove empty line between using directives with different root namespace\. +### Remove empty line between using directives with different root namespace + +```editorconfig +roslynator.RCS0015.invert = true +``` ## Applies to @@ -41,7 +45,6 @@ namespace N ## See Also -* [Analyzer Options](../AnalyzerOptions.md) * [How to Suppress a Diagnostic](../HowToConfigureAnalyzers.md#how-to-suppress-a-diagnostic) diff --git a/docs/analyzers/RCS0027.md b/docs/analyzers/RCS0027.md index bf470dd277..f36dc02c86 100644 --- a/docs/analyzers/RCS0027.md +++ b/docs/analyzers/RCS0027.md @@ -30,7 +30,11 @@ if (x ## Options -* [RCS0027i](RCS0027i.md) \- Add newline after binary operator instead of before it\. +### Add newline after binary operator instead of before it + +```editorconfig +roslynator.RCS0027.invert = true +``` ## Remarks @@ -42,7 +46,6 @@ This rule was originally introduced as [RCS1029](RCS1029.md) ## See Also -* [Analyzer Options](../AnalyzerOptions.md) * [How to Suppress a Diagnostic](../HowToConfigureAnalyzers.md#how-to-suppress-a-diagnostic) diff --git a/docs/analyzers/RCS0028.md b/docs/analyzers/RCS0028.md index 1e5c09eedc..2c0b5f268b 100644 --- a/docs/analyzers/RCS0028.md +++ b/docs/analyzers/RCS0028.md @@ -26,7 +26,11 @@ var y = x ## Options -* [RCS0028i](RCS0028i.md) \- Add newline after conditional operator instead of before it\. +### Add newline after conditional operator instead of before it + +```editorconfig +roslynator.RCS0028.invert = true +``` ## Remarks @@ -38,7 +42,6 @@ This rule was originally introduced as [RCS1184](RCS1184.md) ## See Also -* [Analyzer Options](../AnalyzerOptions.md) * [How to Suppress a Diagnostic](../HowToConfigureAnalyzers.md#how-to-suppress-a-diagnostic) diff --git a/docs/analyzers/RCS0032.md b/docs/analyzers/RCS0032.md index 0c6189d1a3..a5c16c68b7 100644 --- a/docs/analyzers/RCS0032.md +++ b/docs/analyzers/RCS0032.md @@ -24,7 +24,11 @@ object Foo() ## Options -* [RCS0032i](RCS0032i.md) \- Add newline after expression\-body arrow instead of before it\. +### Add newline after expression\-body arrow instead of before it + +```editorconfig +roslynator.RCS0032.invert = true +``` ## Applies to @@ -32,7 +36,6 @@ object Foo() ## See Also -* [Analyzer Options](../AnalyzerOptions.md) * [How to Suppress a Diagnostic](../HowToConfigureAnalyzers.md#how-to-suppress-a-diagnostic) diff --git a/docs/analyzers/RCS0051.md b/docs/analyzers/RCS0051.md index 7272d9c717..84d815e50a 100644 --- a/docs/analyzers/RCS0051.md +++ b/docs/analyzers/RCS0051.md @@ -29,7 +29,11 @@ while (x); ## Options -* [RCS0051i](RCS0051i.md) \- Remove newline between closing brace and 'while' keyword\. +### Remove newline between closing brace and 'while' keyword + +```editorconfig +roslynator.RCS0051.invert = true +``` ## Applies to @@ -37,7 +41,6 @@ while (x); ## See Also -* [Analyzer Options](../AnalyzerOptions.md) * [How to Suppress a Diagnostic](../HowToConfigureAnalyzers.md#how-to-suppress-a-diagnostic) diff --git a/docs/analyzers/RCS0052.md b/docs/analyzers/RCS0052.md index 0474ec6989..cc97a91bc6 100644 --- a/docs/analyzers/RCS0052.md +++ b/docs/analyzers/RCS0052.md @@ -24,7 +24,11 @@ string s ## Options -* [RCS0052i](RCS0052i.md) \- Add newline after equals sign instead of before it\. +### Add newline after equals sign instead of before it + +```editorconfig +roslynator.RCS0052.invert = true +``` ## Applies to @@ -32,7 +36,6 @@ string s ## See Also -* [Analyzer Options](../AnalyzerOptions.md) * [How to Suppress a Diagnostic](../HowToConfigureAnalyzers.md#how-to-suppress-a-diagnostic) diff --git a/docs/analyzers/RCS0056.md b/docs/analyzers/RCS0056.md index fb841245db..700e0a9327 100644 --- a/docs/analyzers/RCS0056.md +++ b/docs/analyzers/RCS0056.md @@ -10,11 +10,11 @@ This analyzer reports any line that is longer than maximal length. -Default maximal length is 125. Use EditorConfig to change maximal length \(See [Configuration](#configuration)\). +Default maximal length is 125. -## Configuration +## Options -### EditorConfig File +### Max line length ```editorconfig roslynator.max_line_length = diff --git a/docs/analyzers/RCS1014.md b/docs/analyzers/RCS1014.md index ca5410f21d..57261aafcb 100644 --- a/docs/analyzers/RCS1014.md +++ b/docs/analyzers/RCS1014.md @@ -22,12 +22,20 @@ var items = new string[] { "a", B }; ## Options -* [RCS1014a](RCS1014a.md) \- Use implicitly typed array \(when type is obvious\)\. -* [RCS1014i](RCS1014i.md) \- Use implicitly typed array\. +### Use implicitly typed array \(when type is obvious\) + +```editorconfig +roslynator.RCS1014.use_implicit_type_when_obvious = true +``` + +### Use implicitly typed array + +```editorconfig +roslynator.RCS1014.invert = true +``` ## See Also -* [Analyzer Options](../AnalyzerOptions.md) * [How to Suppress a Diagnostic](../HowToConfigureAnalyzers.md#how-to-suppress-a-diagnostic) diff --git a/docs/analyzers/RCS1016.md b/docs/analyzers/RCS1016.md index 41d69d4b05..a2e22ebee2 100644 --- a/docs/analyzers/RCS1016.md +++ b/docs/analyzers/RCS1016.md @@ -26,12 +26,26 @@ public string Foo() => ""; ## Options -* [RCS1016a](RCS1016a.md) \- Convert expression\-body to block body when expression is multi\-line\. -* [RCS1016b](RCS1016b.md) \- Convert expression\-body to block body when declaration is multi\-line\. +### Convert expression\-body to block body when expression is multi\-line + +```editorconfig +roslynator.RCS1016.use_block_body_when_expression_is_multiline = true +``` + +### Convert expression\-body to block body when declaration is multi\-line + +```editorconfig +roslynator.RCS1016.use_block_body_when_declaration_is_multiline = true +``` + +### Convert expression\-body to block body + +```editorconfig +roslynator.RCS1016.invert = true +``` ## See Also -* [Analyzer Options](../AnalyzerOptions.md) * [How to Suppress a Diagnostic](../HowToConfigureAnalyzers.md#how-to-suppress-a-diagnostic) diff --git a/docs/analyzers/RCS1018.md b/docs/analyzers/RCS1018.md index d5e0290384..ba8b063fa3 100644 --- a/docs/analyzers/RCS1018.md +++ b/docs/analyzers/RCS1018.md @@ -32,11 +32,14 @@ internal class Foo ## Options -* [RCS1018i](RCS1018i.md) \- Remove accessibility modifiers\. +### Remove accessibility modifiers + +```editorconfig +roslynator.RCS1018.invert = true +``` ## See Also -* [Analyzer Options](../AnalyzerOptions.md) * [How to Suppress a Diagnostic](../HowToConfigureAnalyzers.md#how-to-suppress-a-diagnostic) diff --git a/docs/analyzers/RCS1036.md b/docs/analyzers/RCS1036.md index e6b3946c3c..a1258a92e2 100644 --- a/docs/analyzers/RCS1036.md +++ b/docs/analyzers/RCS1036.md @@ -43,11 +43,14 @@ public class Foo ## Options -* [RCS1036a](RCS1036a.md) \- Remove empty line between closing brace and switch section\. +### Remove empty line between closing brace and switch section + +```editorconfig +roslynator.RCS1036.remove_empty_line_between_closing_brace_and_switch_section = true +``` ## See Also -* [Analyzer Options](../AnalyzerOptions.md) * [How to Suppress a Diagnostic](../HowToConfigureAnalyzers.md#how-to-suppress-a-diagnostic) diff --git a/docs/analyzers/RCS1045.md b/docs/analyzers/RCS1045.md index 7469d98d87..c437f3e422 100644 --- a/docs/analyzers/RCS1045.md +++ b/docs/analyzers/RCS1045.md @@ -22,11 +22,14 @@ private string _f; ## Options -* [RCS1045a](RCS1045a.md) \- Do not rename private static read\-only field to camel case with underscore\. +### Do not rename private static field to camel case with underscore + +```editorconfig +roslynator.RCS1045.suppress_when_field_is_static = true +``` ## See Also -* [Analyzer Options](../AnalyzerOptions.md) * [How to Suppress a Diagnostic](../HowToConfigureAnalyzers.md#how-to-suppress-a-diagnostic) diff --git a/docs/analyzers/RCS1050.md b/docs/analyzers/RCS1050.md index 700f023626..be478ca921 100644 --- a/docs/analyzers/RCS1050.md +++ b/docs/analyzers/RCS1050.md @@ -22,11 +22,14 @@ var items = new List() { "a", "b", "c" }; ## Options -* [RCS1050i](RCS1050i.md) \- Remove argument list from object creation expression\. +### Remove argument list from object creation expression + +```editorconfig +roslynator.RCS1050.invert = true +``` ## See Also -* [Analyzer Options](../AnalyzerOptions.md) * [How to Suppress a Diagnostic](../HowToConfigureAnalyzers.md#how-to-suppress-a-diagnostic) diff --git a/docs/analyzers/RCS1051.md b/docs/analyzers/RCS1051.md index 24797e9d4c..2d710eb86b 100644 --- a/docs/analyzers/RCS1051.md +++ b/docs/analyzers/RCS1051.md @@ -22,11 +22,14 @@ x = (y != null) ? "true" : "false" ## Options -* [RCS1051a](RCS1051a.md) \- Remove parentheses from condition of conditional expression \(when condition is a single token\)\. +### Remove parentheses from condition of conditional expression \(when condition is a single token\) + +```editorconfig +roslynator.RCS1051.do_not_parenthesize_single_token = true +``` ## See Also -* [Analyzer Options](../AnalyzerOptions.md) * [How to Suppress a Diagnostic](../HowToConfigureAnalyzers.md#how-to-suppress-a-diagnostic) diff --git a/docs/analyzers/RCS1078.md b/docs/analyzers/RCS1078.md index 5dea86b0de..def0517677 100644 --- a/docs/analyzers/RCS1078.md +++ b/docs/analyzers/RCS1078.md @@ -22,11 +22,14 @@ string s = ""; ## Options -* [RCS1078i](RCS1078i.md) \- Use string\.Empty instead of ""\. +### Use string\.Empty instead of "" + +```editorconfig +roslynator.RCS1078.invert = true +``` ## See Also -* [Analyzer Options](../AnalyzerOptions.md) * [How to Suppress a Diagnostic](../HowToConfigureAnalyzers.md#how-to-suppress-a-diagnostic) diff --git a/docs/analyzers/RCS1090.md b/docs/analyzers/RCS1090.md index 9e4458519f..9b536c2b76 100644 --- a/docs/analyzers/RCS1090.md +++ b/docs/analyzers/RCS1090.md @@ -28,11 +28,14 @@ public async Task FooAsync() ## Options -* [RCS1090i](RCS1090i.md) \- Remove call to 'ConfigureAwait'\. +### Remove call to 'ConfigureAwait' + +```editorconfig +roslynator.RCS1090.invert = true +``` ## See Also -* [Analyzer Options](../AnalyzerOptions.md) * [How to Suppress a Diagnostic](../HowToConfigureAnalyzers.md#how-to-suppress-a-diagnostic) diff --git a/docs/analyzers/RCS1096.md b/docs/analyzers/RCS1096.md index 562840f96d..7348ac1534 100644 --- a/docs/analyzers/RCS1096.md +++ b/docs/analyzers/RCS1096.md @@ -22,11 +22,14 @@ options.HasFlag(RegexOptions.IgnoreCase) ## Options -* [RCS1096i](RCS1096i.md) \- Convert bitwise operation to 'HasFlag' call\. +### Convert bitwise operation to 'HasFlag' call + +```editorconfig +roslynator.RCS1096.invert = true +``` ## See Also -* [Analyzer Options](../AnalyzerOptions.md) * [How to Suppress a Diagnostic](../HowToConfigureAnalyzers.md#how-to-suppress-a-diagnostic) diff --git a/docs/analyzers/RCS1104.md b/docs/analyzers/RCS1104.md index 7c78c6703e..c8113da860 100644 --- a/docs/analyzers/RCS1104.md +++ b/docs/analyzers/RCS1104.md @@ -64,11 +64,14 @@ bool x = y || z; ## Options -* [RCS1104a](RCS1104a.md) \- Simplify conditional expression \(when it includes negation of condition\)\. +### Do not simplify conditional expression when condition is inverted + +```editorconfig +roslynator.RCS1104.suppress_when_condition_is_inverted = true +``` ## See Also -* [Analyzer Options](../AnalyzerOptions.md) * [How to Suppress a Diagnostic](../HowToConfigureAnalyzers.md#how-to-suppress-a-diagnostic) diff --git a/docs/analyzers/RCS1207.md b/docs/analyzers/RCS1207.md index 4ea34725fe..a9e3de84db 100644 --- a/docs/analyzers/RCS1207.md +++ b/docs/analyzers/RCS1207.md @@ -22,11 +22,14 @@ var x = items.Select(Foo); ## Options -* [RCS1207i](RCS1207i.md) \- Convert method group to anonymous function\. +### Convert method group to anonymous function + +```editorconfig +roslynator.RCS1207.invert = true +``` ## See Also -* [Analyzer Options](../AnalyzerOptions.md) * [How to Suppress a Diagnostic](../HowToConfigureAnalyzers.md#how-to-suppress-a-diagnostic) diff --git a/docs/analyzers/RCS1213.md b/docs/analyzers/RCS1213.md index 0486b3dfff..e96ba61f06 100644 --- a/docs/analyzers/RCS1213.md +++ b/docs/analyzers/RCS1213.md @@ -6,9 +6,12 @@ | Category | Redundancy | | Severity | Info | -## Configuration +## Options + +### Suppress Unity script methods + +Suppress diagnostic from \[Unity script methods\]\(https://docs\.unity3d\.com/ScriptReference/MonoBehaviour\.html\)\. -Use following EditorConfig option to suppress diagnostic from [Unity script methods](https://docs.unity3d.com/ScriptReference/MonoBehaviour.html): ```editorconfig roslynator.RCS1213.suppress_unity_script_methods = true ``` diff --git a/docs/analyzers/RCS1239.md b/docs/analyzers/RCS1239.md index a8b9e2a7b1..604615633f 100644 --- a/docs/analyzers/RCS1239.md +++ b/docs/analyzers/RCS1239.md @@ -22,7 +22,7 @@ while (x) // RCS1239 ### Code with Fix ```csharp -for (int i = 0; f; i++) +for (int i = 0; x; i++) { M(); } diff --git a/docs/analyzers/RCS1246.md b/docs/analyzers/RCS1246.md index 013cb57202..06da99b06a 100644 --- a/docs/analyzers/RCS1246.md +++ b/docs/analyzers/RCS1246.md @@ -36,11 +36,14 @@ list[1] ## Options -* [RCS1246a](RCS1246a.md) \- Do not use element access when expression is invocation\. +### Do not use element access when expression is invocation + +```editorconfig +roslynator.RCS1246.suppress_when_expression_is_invocation = true +``` ## See Also -* [Analyzer Options](../AnalyzerOptions.md) * [How to Suppress a Diagnostic](../HowToConfigureAnalyzers.md#how-to-suppress-a-diagnostic) diff --git a/docs/analyzers/RCS1248.md b/docs/analyzers/RCS1248.md index bf40934a54..55bcc7d7fe 100644 --- a/docs/analyzers/RCS1248.md +++ b/docs/analyzers/RCS1248.md @@ -1,11 +1,11 @@ -# RCS1248: Use 'is null' pattern instead of comparison \(or vice versa\) +# RCS1248: Use pattern matching to check for null \(or vice versa\) -| Property | Value | -| ------------------------ | ------- | -| Id | RCS1248 | -| Category | Style | -| Severity | None | -| Minimal Language Version | 7\.0 | +| Property | Value | +| ------------------------ | -------------------------------------- | +| Id | RCS1248 | +| Category | Style | +| Severity | None | +| Minimal Language Version | 7\.0 \(9\.0 for 'is not null' syntax\) | ## Example @@ -23,12 +23,14 @@ x is null ## Options -* [RCS1248a](RCS1248a.md) \- Use 'is null' pattern instead of '\!=' operator\. -* [RCS1248i](RCS1248i.md) \- Use comparison instead of 'is null' pattern\. +### Use comparison instead of pattern matching to check for null + +```editorconfig +roslynator.RCS1248.invert = true +``` ## See Also -* [Analyzer Options](../AnalyzerOptions.md) * [How to Suppress a Diagnostic](../HowToConfigureAnalyzers.md#how-to-suppress-a-diagnostic) diff --git a/docs/cs/CS0246.md b/docs/cs/CS0246.md index d1bb80c19b..16f59ef8b0 100644 --- a/docs/cs/CS0246.md +++ b/docs/cs/CS0246.md @@ -10,5 +10,7 @@ ## Code Fixes * Change array type +* Change member type according to return expression + *\(Generated with [DotMarkdown](http://github.com/JosefPihrt/DotMarkdown)\)* \ No newline at end of file diff --git a/docs/cs/CS1591.md b/docs/cs/CS1591.md index 2ba7b961f7..96d9bd09b7 100644 --- a/docs/cs/CS1591.md +++ b/docs/cs/CS1591.md @@ -11,4 +11,11 @@ * Add documentation comment +## Options + +```editorconfig +roslynator.CS1591.ignored_tags = +``` + + *\(Generated with [DotMarkdown](http://github.com/JosefPihrt/DotMarkdown)\)* \ No newline at end of file diff --git a/docs/cs/CS7036.md b/docs/cs/CS7036.md new file mode 100644 index 0000000000..2896470b7d --- /dev/null +++ b/docs/cs/CS7036.md @@ -0,0 +1,13 @@ +# CS7036 + +| Property | Value | +| -------- | ------------------------------------------------------------------------------------------------------ | +| Id | CS7036 | +| Title | There is no argument given that corresponds to the required formal parameter 'parameter' of 'member'\. | +| Severity | Error | + +## Code Fixes + +* Move initializer expressions to constructor + +*\(Generated with [DotMarkdown](http://github.com/JosefPihrt/DotMarkdown)\)* \ No newline at end of file diff --git a/docs/cs/CS8632.md b/docs/cs/CS8632.md new file mode 100644 index 0000000000..b3b89091dd --- /dev/null +++ b/docs/cs/CS8632.md @@ -0,0 +1,13 @@ +# CS8632 + +| Property | Value | +| -------- | ------------------------------------------------------------------------------------------------------------------- | +| Id | CS8632 | +| Title | The annotation for nullable reference types should only be used in code within a '\#nullable' annotations context\. | +| Severity | Warning | + +## Code Fixes + +* Remove annotation for nullable reference types + +*\(Generated with [DotMarkdown](http://github.com/JosefPihrt/DotMarkdown)\)* \ No newline at end of file diff --git a/src/Analyzers.CodeFixes/Analyzers.CodeFixes.csproj b/src/Analyzers.CodeFixes/Analyzers.CodeFixes.csproj index 202d0bd868..34568c2df3 100644 --- a/src/Analyzers.CodeFixes/Analyzers.CodeFixes.csproj +++ b/src/Analyzers.CodeFixes/Analyzers.CodeFixes.csproj @@ -5,7 +5,7 @@ - 3.1.0.1 + 3.2.0.0 Roslynator.CSharp.Analyzers.CodeFixes Roslynator.CSharp Roslynator.Analyzers.nuspec diff --git a/src/Analyzers.CodeFixes/Roslynator.Analyzers.nuspec b/src/Analyzers.CodeFixes/Roslynator.Analyzers.nuspec index 63d71b9b76..c24e47a571 100644 --- a/src/Analyzers.CodeFixes/Roslynator.Analyzers.nuspec +++ b/src/Analyzers.CodeFixes/Roslynator.Analyzers.nuspec @@ -2,7 +2,7 @@ Roslynator.Analyzers - 3.1.0 + 3.2.0-rc Josef Pihrt Josef Pihrt Apache-2.0 @@ -11,7 +11,7 @@ false A collection of 200+ analyzers for C#, powered by Roslyn. - - This package is dependent on Microsoft.CodeAnalysis.CSharp.Workspaces 3.7.0. + - This package is dependent on Microsoft.CodeAnalysis.CSharp.Workspaces 3.8.0. A collection of 200+ analyzers for C#, powered by Roslyn. Copyright (c) 2016-2021 Josef Pihrt Roslyn Analyzer Refactoring Productivity CodeAnalysis C# CSharp diff --git a/src/Analyzers/Analyzers.csproj b/src/Analyzers/Analyzers.csproj index 867926590f..aec2bb53fd 100644 --- a/src/Analyzers/Analyzers.csproj +++ b/src/Analyzers/Analyzers.csproj @@ -5,7 +5,7 @@ - 3.1.0.1 + 3.2.0.0 Roslynator.CSharp.Analyzers Roslynator.CSharp false diff --git a/src/Analyzers/Analyzers.xml b/src/Analyzers/Analyzers.xml index 249b79a74f..b2eae6a205 100644 --- a/src/Analyzers/Analyzers.xml +++ b/src/Analyzers/Analyzers.xml @@ -5598,4 +5598,4 @@ void M() - + \ No newline at end of file diff --git a/src/Analyzers/README.md b/src/Analyzers/README.md index cdff5e8b76..c221f71f36 100644 --- a/src/Analyzers/README.md +++ b/src/Analyzers/README.md @@ -202,7 +202,7 @@ | RCS1244 | [Simplify 'default' expression](../../docs/analyzers/RCS1244.md) | Simplification | Hidden | | RCS1246 | [Use element access](../../docs/analyzers/RCS1246.md) | Usage | Info | | RCS1247 | [Fix documentation comment tag](../../docs/analyzers/RCS1247.md) | Readability | Info | -| RCS1248 | [Use 'is null' pattern instead of comparison (or vice versa)](../../docs/analyzers/RCS1248.md) | Style | None | +| RCS1248 | [Use pattern matching to check for null (or vice versa)](../../docs/analyzers/RCS1248.md) | Style | None | *\(Generated with [DotMarkdown](http://github.com/JosefPihrt/DotMarkdown)\)* \ No newline at end of file diff --git a/src/CSharp.Workspaces/CSharp.Workspaces.csproj b/src/CSharp.Workspaces/CSharp.Workspaces.csproj index b21e10d305..45f8356ae7 100644 --- a/src/CSharp.Workspaces/CSharp.Workspaces.csproj +++ b/src/CSharp.Workspaces/CSharp.Workspaces.csproj @@ -5,7 +5,7 @@ - 2.0.0.1 + 2.1.0.0 $(RoslynatorDllPrefix)Roslynator.CSharp.Workspaces Roslynator ..\api.ruleset @@ -17,7 +17,7 @@ Roslynator.CSharp.Workspaces - 2.0.0 + 2.1.0 This library extends functionality of package Microsoft.CodeAnalysis.CSharp.Workspaces diff --git a/src/CSharp/CSharp.csproj b/src/CSharp/CSharp.csproj index dd36f5992b..47443fe6be 100644 --- a/src/CSharp/CSharp.csproj +++ b/src/CSharp/CSharp.csproj @@ -5,7 +5,7 @@ - 2.0.0.1 + 2.1.0.0 $(RoslynatorDllPrefix)Roslynator.CSharp Roslynator ..\api.ruleset @@ -17,7 +17,7 @@ Roslynator.CSharp - 2.0.0 + 2.1.0 This library extends functionality of package Microsoft.CodeAnalysis.CSharp diff --git a/src/CodeFixes/CSharp/CodeFixDescriptors.Generated.cs b/src/CodeFixes/CSharp/CodeFixDescriptors.Generated.cs index 7540190523..d1a35f7db4 100644 --- a/src/CodeFixes/CSharp/CodeFixDescriptors.Generated.cs +++ b/src/CodeFixes/CSharp/CodeFixDescriptors.Generated.cs @@ -608,7 +608,7 @@ public static partial class CodeFixDescriptors isEnabledByDefault: true, "CS0139"); - /// RCF0080 (fixes CS0029, CS0127, CS0201, CS0266, CS1997) + /// RCF0080 (fixes CS0029, CS0127, CS0201, CS0246, CS0266, CS1997) public static readonly CodeFixDescriptor ChangeMemberTypeAccordingToReturnExpression = new CodeFixDescriptor( id: CodeFixIdentifiers.ChangeMemberTypeAccordingToReturnExpression, title: "Change member type according to return expression", @@ -616,6 +616,7 @@ public static partial class CodeFixDescriptors "CS0029", "CS0127", "CS0201", + "CS0246", "CS0266", "CS1997"); diff --git a/src/CodeFixes/CodeFixes.csproj b/src/CodeFixes/CodeFixes.csproj index b03c8edbd5..40f7392e98 100644 --- a/src/CodeFixes/CodeFixes.csproj +++ b/src/CodeFixes/CodeFixes.csproj @@ -5,7 +5,7 @@ - 3.1.0.1 + 3.2.0.0 Roslynator.CSharp.CodeFixes Roslynator.CSharp.CodeFixes Roslynator.CodeFixes.nuspec diff --git a/src/CodeFixes/README.md b/src/CodeFixes/README.md index 873c30c116..dc47e59420 100644 --- a/src/CodeFixes/README.md +++ b/src/CodeFixes/README.md @@ -14,9 +14,7 @@ | [CS0101](../../docs/cs/CS0101.md) | The namespace 'namespace' already contains a definition for 'type'\. | | [CS0102](../../docs/cs/CS0102.md) | The type 'type name' already contains a definition for 'identifier'\. | | [CS0103](../../docs/cs/CS0103.md) | The name 'identifier' does not exist in the current context\. | -| [CS0106](../../docs/cs/CS0106.md) | The modifier 'modifier' is not valid for this item\. | | [CS0107](../../docs/cs/CS0107.md) | More than one protection modifier\. | -| [CS0108](../../docs/cs/CS0108.md) | 'member1' hides inherited member 'member2'\. Use the new keyword if hiding was intended\. | | [CS0109](../../docs/cs/CS0109.md) | The member 'member' does not hide an inherited member\. The new keyword is not required\. | | [CS0112](../../docs/cs/CS0112.md) | A static member 'function' cannot be marked as override, virtual or abstract\. | | [CS0114](../../docs/cs/CS0114.md) | 'function1' hides inherited member 'function2'\. To make the current method override that implementation, add the override keyword\. Otherwise add the new keyword\. | @@ -75,7 +73,6 @@ | [CS0508](../../docs/cs/CS0508.md) | 'type1': return type must be 'type2' to match overridden member 'member name'\. | | [CS0513](../../docs/cs/CS0513.md) | 'function' is abstract but it is contained in nonabstract class 'class'\. | | [CS0515](../../docs/cs/CS0515.md) | 'function': access modifiers are not allowed on static constructors\. | -| [CS0524](../../docs/cs/CS0524.md) | 'identifier': interfaces cannot declare types\. | | [CS0525](../../docs/cs/CS0525.md) | Interfaces cannot contain fields\. | | [CS0527](../../docs/cs/CS0527.md) | Type 'type' in interface list is not an interface\. | | [CS0531](../../docs/cs/CS0531.md) | 'member': interface members cannot have a definition\. | @@ -111,7 +108,6 @@ | [CS0815](../../docs/cs/CS0815.md) | Cannot assign 'expression' to an implicitly typed local\. | | [CS0819](../../docs/cs/CS0819.md) | Implicitly typed locals cannot have multiple declarators\. | | [CS0822](../../docs/cs/CS0822.md) | Implicitly typed locals cannot be const\. | -| [CS1002](../../docs/cs/CS1002.md) | ; expected\. | | [CS1003](../../docs/cs/CS1003.md) | Syntax error, 'char' expected\. | | [CS1004](../../docs/cs/CS1004.md) | Duplicate 'modifier' modifier\. | | [CS1012](../../docs/cs/CS1012.md) | Too many characters in character literal\. | @@ -163,11 +159,13 @@ | [CS3016](../../docs/cs/CS3016.md) | Arrays as attribute arguments is not CLS\-compliant\. | | [CS3024](../../docs/cs/CS3024.md) | Constraint type 'type' is not CLS\-compliant\. | | [CS3027](../../docs/cs/CS3027.md) | 'type\_1' is not CLS\-compliant because base interface 'type\_2' is not CLS\-compliant\. | +| [CS7036](../../docs/cs/CS7036.md) | There is no argument given that corresponds to the required formal parameter 'parameter' of 'member'\. | | [CS8050](../../docs/cs/CS8050.md) | Only auto\-implemented properties can have initializers\. | | [CS8070](../../docs/cs/CS8070.md) | Control cannot fall out of switch from final case label \('default'\)\. | | [CS8112](../../docs/cs/CS8112.md) | 'function' is a local function and must therefore always have a body\. | | [CS8139](../../docs/cs/CS8139.md) | Cannot change tuple element names when overriding inherited member\. | | [CS8340](../../docs/cs/CS8340.md) | Instance fields of read\-only structs must be read\-only\. | +| [CS8632](../../docs/cs/CS8632.md) | The annotation for nullable reference types should only be used in code within a '\#nullable' annotations context\. | *\(Generated with [DotMarkdown](http://github.com/JosefPihrt/DotMarkdown)\)* \ No newline at end of file diff --git a/src/CommandLine/CommandLine.csproj b/src/CommandLine/CommandLine.csproj index ad7541d5a3..88ef32eb4c 100644 --- a/src/CommandLine/CommandLine.csproj +++ b/src/CommandLine/CommandLine.csproj @@ -13,7 +13,7 @@ - 0.1.2.0 + 0.1.3.0 Exe Roslynator Roslynator.CommandLine @@ -24,7 +24,7 @@ true roslynator Roslynator.DotNet.Cli - 0.1.2 + 0.1.3 Josef Pihrt .NET Core Global Tool for Roslynator https://github.com/JosefPihrt/Roslynator diff --git a/src/CommandLine/CommandLine.nuspec b/src/CommandLine/CommandLine.nuspec index ec9daf2f73..8814e32187 100644 --- a/src/CommandLine/CommandLine.nuspec +++ b/src/CommandLine/CommandLine.nuspec @@ -2,7 +2,7 @@ Roslynator.CommandLine - 0.1.2 + 0.1.3 Josef Pihrt Josef Pihrt Apache-2.0 diff --git a/src/Common/Common.csproj b/src/Common/Common.csproj index 2f23290261..53ed962520 100644 --- a/src/Common/Common.csproj +++ b/src/Common/Common.csproj @@ -5,7 +5,7 @@ - 3.1.0.1 + 3.2.0.0 Roslynator.Common Roslynator diff --git a/src/Core/Core.csproj b/src/Core/Core.csproj index ead561f4ce..ff487a950c 100644 --- a/src/Core/Core.csproj +++ b/src/Core/Core.csproj @@ -5,7 +5,7 @@ - 2.0.0.1 + 2.1.0.0 $(RoslynatorDllPrefix)Roslynator.Core Roslynator ..\api.ruleset @@ -17,7 +17,7 @@ Roslynator.Core - 2.0.0 + 2.1.0 This library extends functionality of package Microsoft.CodeAnalysis.Common. false diff --git a/src/Documentation/Documentation.csproj b/src/Documentation/Documentation.csproj index e56e9f195d..53bd599d73 100644 --- a/src/Documentation/Documentation.csproj +++ b/src/Documentation/Documentation.csproj @@ -5,7 +5,7 @@ - 0.1.2.0 + 0.1.3.0 $(RoslynatorDllPrefix)Roslynator.Documentation Roslynator.Documentation diff --git a/src/Formatting.Analyzers.CodeFixes/Formatting.Analyzers.CodeFixes.csproj b/src/Formatting.Analyzers.CodeFixes/Formatting.Analyzers.CodeFixes.csproj index 5feb478db5..37864ad6f5 100644 --- a/src/Formatting.Analyzers.CodeFixes/Formatting.Analyzers.CodeFixes.csproj +++ b/src/Formatting.Analyzers.CodeFixes/Formatting.Analyzers.CodeFixes.csproj @@ -5,7 +5,7 @@ - 1.1.0.1 + 1.2.0.0 Roslynator.Formatting.Analyzers.CodeFixes Roslynator.Formatting Roslynator.Formatting.Analyzers.nuspec diff --git a/src/Formatting.Analyzers.CodeFixes/Roslynator.Formatting.Analyzers.nuspec b/src/Formatting.Analyzers.CodeFixes/Roslynator.Formatting.Analyzers.nuspec index 337f3e4e07..1c22894d71 100644 --- a/src/Formatting.Analyzers.CodeFixes/Roslynator.Formatting.Analyzers.nuspec +++ b/src/Formatting.Analyzers.CodeFixes/Roslynator.Formatting.Analyzers.nuspec @@ -2,7 +2,7 @@ Roslynator.Formatting.Analyzers - 1.1.0 + 1.2.0-rc Josef Pihrt Josef Pihrt Apache-2.0 @@ -11,7 +11,7 @@ false A collection of formatting analyzers, powered by Roslyn. - - This package is dependent on Microsoft.CodeAnalysis.CSharp.Workspaces 3.7.0. + - This package is dependent on Microsoft.CodeAnalysis.CSharp.Workspaces 3.8.0. - All analyzers are disabled by default. A collection of formatting analyzers, powered by Roslyn. Copyright (c) 2016-2021 Josef Pihrt diff --git a/src/Formatting.Analyzers/Formatting.Analyzers.csproj b/src/Formatting.Analyzers/Formatting.Analyzers.csproj index c8a38e4e7a..63697f1a1a 100644 --- a/src/Formatting.Analyzers/Formatting.Analyzers.csproj +++ b/src/Formatting.Analyzers/Formatting.Analyzers.csproj @@ -5,7 +5,7 @@ - 1.1.0.1 + 1.2.0.0 Roslynator.Formatting.Analyzers Roslynator.Formatting false diff --git a/src/Refactorings/Refactorings.csproj b/src/Refactorings/Refactorings.csproj index fee301f728..86063382ba 100644 --- a/src/Refactorings/Refactorings.csproj +++ b/src/Refactorings/Refactorings.csproj @@ -5,7 +5,7 @@ - 3.1.0.1 + 3.2.0.0 Roslynator.CSharp.Refactorings Roslynator.CSharp.Refactorings diff --git a/src/VisualBasic.Workspaces/VisualBasic.Workspaces.csproj b/src/VisualBasic.Workspaces/VisualBasic.Workspaces.csproj index 94d8a4a5d0..3c1d2ece8c 100644 --- a/src/VisualBasic.Workspaces/VisualBasic.Workspaces.csproj +++ b/src/VisualBasic.Workspaces/VisualBasic.Workspaces.csproj @@ -5,7 +5,7 @@ - 2.0.0.1 + 2.1.0.0 $(RoslynatorDllPrefix)Roslynator.VisualBasic.Workspaces Roslynator ..\api.ruleset diff --git a/src/VisualBasic/VisualBasic.csproj b/src/VisualBasic/VisualBasic.csproj index 1159f37bdd..b1659c19e3 100644 --- a/src/VisualBasic/VisualBasic.csproj +++ b/src/VisualBasic/VisualBasic.csproj @@ -5,7 +5,7 @@ - 2.0.0.1 + 2.1.0.0 $(RoslynatorDllPrefix)Roslynator.VisualBasic Roslynator ..\api.ruleset diff --git a/src/VisualStudio.Common/Properties/AssemblyInfo.cs b/src/VisualStudio.Common/Properties/AssemblyInfo.cs index faac9abe02..1239e595d3 100644 --- a/src/VisualStudio.Common/Properties/AssemblyInfo.cs +++ b/src/VisualStudio.Common/Properties/AssemblyInfo.cs @@ -36,5 +36,5 @@ // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("3.1.0.0")] +[assembly: AssemblyVersion("3.2.0.0")] //[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/src/VisualStudio.Refactorings/Properties/AssemblyInfo.cs b/src/VisualStudio.Refactorings/Properties/AssemblyInfo.cs index 0efb807b71..e3bc422c2b 100644 --- a/src/VisualStudio.Refactorings/Properties/AssemblyInfo.cs +++ b/src/VisualStudio.Refactorings/Properties/AssemblyInfo.cs @@ -31,6 +31,6 @@ // Build Number // Revision // -[assembly: AssemblyVersion("3.1.0.0")] +[assembly: AssemblyVersion("3.2.0.0")] //[assembly: AssemblyFileVersion("1.0.0.0")] [assembly: NeutralResourcesLanguage("en-US")] diff --git a/src/VisualStudio.Refactorings/source.extension.vsixmanifest b/src/VisualStudio.Refactorings/source.extension.vsixmanifest index 0968bb2cbd..008e623393 100644 --- a/src/VisualStudio.Refactorings/source.extension.vsixmanifest +++ b/src/VisualStudio.Refactorings/source.extension.vsixmanifest @@ -1,7 +1,7 @@  - + Roslynator Refactorings 2019 A collection of 300+ refactorings and fixes for C#, powered by Roslyn. http://github.com/JosefPihrt/Roslynator diff --git a/src/VisualStudio/Properties/AssemblyInfo.cs b/src/VisualStudio/Properties/AssemblyInfo.cs index de18f377ed..bbae9efe34 100644 --- a/src/VisualStudio/Properties/AssemblyInfo.cs +++ b/src/VisualStudio/Properties/AssemblyInfo.cs @@ -31,6 +31,6 @@ // Build Number // Revision // -[assembly: AssemblyVersion("3.1.0.0")] +[assembly: AssemblyVersion("3.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 744c0b5947..c4f394814b 100644 --- a/src/VisualStudio/source.extension.vsixmanifest +++ b/src/VisualStudio/source.extension.vsixmanifest @@ -1,7 +1,7 @@  - + Roslynator 2019 A collection of 500+ analyzers, refactorings and fixes for C#, powered by Roslyn. http://github.com/JosefPihrt/Roslynator diff --git a/src/VisualStudioCode/VisualStudioCode.csproj b/src/VisualStudioCode/VisualStudioCode.csproj index 644481f2d8..3c43305622 100644 --- a/src/VisualStudioCode/VisualStudioCode.csproj +++ b/src/VisualStudioCode/VisualStudioCode.csproj @@ -5,7 +5,7 @@ - 3.1.0.0 + 3.2.0.0 Roslynator.VisualStudioCode Roslynator false diff --git a/src/VisualStudioCode/package/package.json b/src/VisualStudioCode/package/package.json index 5b8d26fda0..2002b3ffe8 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": "3.1.0", + "version": "3.2.0", "author": "Josef Pihrt", "license": "SEE LICENSE IN LICENSE.TXT", "homepage": "https://github.com/josefpihrt/roslynator", diff --git a/src/Workspaces.Common/Workspaces.Common.csproj b/src/Workspaces.Common/Workspaces.Common.csproj index b9a9d821fb..d944391c03 100644 --- a/src/Workspaces.Common/Workspaces.Common.csproj +++ b/src/Workspaces.Common/Workspaces.Common.csproj @@ -5,7 +5,7 @@ - 3.1.0.1 + 3.2.0.0 Roslynator.Workspaces.Common Roslynator diff --git a/src/Workspaces.Core/Workspaces.Core.csproj b/src/Workspaces.Core/Workspaces.Core.csproj index 468bfc65d1..4442a1d68d 100644 --- a/src/Workspaces.Core/Workspaces.Core.csproj +++ b/src/Workspaces.Core/Workspaces.Core.csproj @@ -5,7 +5,7 @@ - 2.0.0.1 + 2.1.0.0 $(RoslynatorDllPrefix)Roslynator.Workspaces.Core Roslynator ..\api.ruleset @@ -17,7 +17,7 @@ Roslynator.Workspaces.Core - 2.0.0 + 2.1.0 This library extends functionality of package Microsoft.CodeAnalysis.Workspaces.Common. false diff --git a/tools/build.cmd b/tools/build.cmd index fd40b3d625..14c149aee8 100644 --- a/tools/build.cmd +++ b/tools/build.cmd @@ -6,7 +6,7 @@ if not defined _programFiles set _programFiles=%ProgramFiles% set _msbuildPath="%_programFiles%\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\MSBuild" set _properties=Configuration=Release,Deterministic=true,TreatWarningsAsErrors=true,WarningsNotAsErrors=1591 set _outDir=..\out\Release -set _version=3.1.0 +set _version=3.2.0 orang delete "..\src" -a d -n "bin,obj" l li e -i "packages,node_modules" l li e ne -t n --content-only -y su s diff --git a/tools/build.commandline.cmd b/tools/build.commandline.cmd index f320d564b5..df2d509840 100644 --- a/tools/build.commandline.cmd +++ b/tools/build.commandline.cmd @@ -17,8 +17,6 @@ rd /S /Q "..\src\CommandLine\bin\Release\publish" /v:normal ^ /m -orang replace "../src" -n "AssemblyInfo.cs" e -c "patterns/assembly_names_to_be_prefixed.txt" f -r "" - if errorlevel 1 ( pause exit @@ -28,6 +26,8 @@ del /Q "..\src\CommandLine\bin\Release\Roslynator.CommandLine.*.nupkg" dotnet pack -c Release --no-build -v normal /p:RoslynatorCommandLine=true "..\src\CommandLine\CommandLine.csproj" +orang replace "../src" -n "AssemblyInfo.cs" e -c "patterns/assembly_names_to_be_prefixed.txt" f -r "" + set _outDir=..\out\Release md "%_outDir%" del /Q "%_outDir%\Release\Roslynator.CommandLine.*.nupkg" diff --git a/tools/update_version.cmd b/tools/update_version.cmd index f0bc4e5e0a..ca008cd1ca 100644 --- a/tools/update_version.cmd +++ b/tools/update_version.cmd @@ -2,12 +2,12 @@ rem dotnet install tool -g orang.dotnet.cli -set _apiVersion=2.0.0.1 -set _formattingVersion=1.1.0.1 -set _version=3.1.0.1 -set _version3=3.1.0 -set _cliVersion=0.1.2.0 -set _cliVersion3=0.1.2 +set _apiVersion=2.1.0.0 +set _formattingVersion=1.2.0.0 +set _version=3.2.0.0 +set _version3=3.2.0 +set _cliVersion=0.1.3.0 +set _cliVersion3=0.1.3 set _root=..\src set _options=from-file -t m r -y trim-line -v n -o "orang.log" v=di