Skip to content

Latest commit

 

History

History
619 lines (465 loc) · 48.6 KB

CHANGELOG.md

File metadata and controls

619 lines (465 loc) · 48.6 KB

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

[Unreleased]

[4.12.2] - 2024-04-23

Fixed

  • [CLI] Fix loading of slnf files (PR)
  • [CLI] Fix --severity-level (PR)
  • Fix analyzer RCS1246 (PR)

[4.12.1] - 2024-04-15

Changed

  • [CLI] Bump Roslyn to 4.9.2 (PR)
  • Convert Last() to [] (RCS1246) (PR)

Fixed

  • Fix analyzer RCS1077 (PR)
  • Fix export of ILanguageService (PR)

[4.12.0] - 2024-03-19

Added

  • Add analyzer "Simplify numeric comparison" RCS1268 (PR by @jakubreznak)

Fixed

  • Fix analyzer RCS1267 (PR)
  • Fix "Unknown value 'Default'" exception (PR)
  • Fix name of UnityEngine.SerializeField attribute (PR)
  • Fix analyzer RCS1077 (PR)

[4.11.0] - 2024-02-19

Added

  • Add analyzer "Use raw string literal" RCS1266 (PR)
  • Add analyzer "Convert 'string.Concat' to interpolated string" RCS1267 (PR)
  • Simplify LINQ query RCS1077 (PR)
    • items.Select(selector).Average() => items.Average(selector)
    • items.Select(selector).Sum() => items.Sum(selector)

Fixed

[4.10.0] - 2024-01-24

Added

  • Publish NuGet packages that provide refactorings and code fixes for compiler diagnostics (PR)
    • These packages are recommended to be used in an environment where Roslynator IDE extension cannot be used, e.g. VS Code + C# Dev Kit (see related issue)
  • Add analyzer "Remove redundant catch block" RCS1265 (PR by @jakubreznak)
  • [CLI] Spellcheck file names (PR)
    • roslynator spellcheck --scope file-name

Changed

  • Update analyzer RCS1197 (PR)
    • Do not report interpolated string and string concatenation

Fixed

[4.9.0] - 2024-01-10

Added

  • Add support for Unity (PR)
    • Unity uses Roslyn 3.8 and this version is now supported by Roslynator NuGet packages with analyzers (Roslynator.Analyzers etc.)

Fixed

[4.8.0] - 2024-01-02

Added

  • Add analyzer "Add/remove blank line between switch sections" (RCS0061) (PR)
    • Option (required): roslynator_blank_line_between_switch_sections = include|omit|omit_after_block
    • Make analyzer RCS0014 obsolete
  • Add analyzer "Declare explicit/implicit type" (RCS1264) (PR)
  • Add code fix "Declare as nullable" (PR)
    • Applicable to: CS8600, CS8610, CS8765 and CS8767
  • Add option roslynator_use_collection_expression = true|false (PR)

Changed

  • Replace type declaration's empty braces with semicolon (RCS1251 (PR, PR)
  • [TestFramework] Bump MSTest.TestFramerk to 3.1.1 (PR)
  • [TestFramework] Bump xunit.assert to 2.6.2 (PR)
  • Bump Roslyn to 4.7.0 (PR)

Fixed

[4.7.0] - 2023-12-03

Added

  • Add analyzer "Dispose resource asynchronously" (RCS1261) (PR)
  • Add analyzer "Unnecessary raw string literal" (RCS1262) (PR)
  • Add analyzer "Invalid reference in a documentation comment" (RCS1263) (PR)

Changed

  • Improve refactoring "Remove comment" RR0098 (PR)
  • Remove trailing dot from analyzer's title (PR)
  • Group code fix "Change accessibility to ..." (PR)
  • [CLI] Bump Roslyn to 4.8.0 (PR).
  • Group refactoring "Remove members above/below'" (PR)
  • Rename analyzers (PR)
    • "Add new line before embedded statement" -> "Put embedded statement on its own line" (RCS0030)
    • "Add new line before statement" -> "Put statement on its own line" (RCS0033)
  • Group refactoring "Wrap in ..." (PR)

Fixed

[4.6.4] - 2023-11-24

[4.6.3] - 2023-11-23

Added

  • [CLI] Add command find-symbol (PR)
    • This command can be used not only to find symbols but also to find unused symbols and optionally remove them.
    • Example: roslynator find-symbol --symbol-kind type --visibility internal private --unused --remove

Changed

  • Bump Roslyn to 4.6.0 (PR).
  • [CLI] Add support for .NET 8 (PR).

Fixed

[4.6.2] - 2023-11-10

Added

  • [CLI] Add note to docs that Roslynator CLI does not contain any analyzers itself (PR)

Fixed

[4.6.1] - 2023-10-23

Fixed

[4.6.0] - 2023-10-18

Added

  • Add social card (PR).
  • Add nullable annotation to public API (PR).
  • Add refactoring "Remove directive (including content)" (PR).

Changed

  • Update logo (PR, PR).
  • Migrate to .NET Foundation (PR, PR, PR).
  • Bump Roslyn to 4.7.0 (PR).
    • Applies to CLI and testing library.
  • Bump Microsoft.Build.Locator to 1.6.1 (PR)
  • Improve testing framework (PR)
    • Add methods to DiagnosticVerifier, RefactoringVerifier and CompilerDiagnosticFixVerifier.
    • Add property DiagnosticVerifier.Descriptor (BREAKING CHANGE).
    • Add property CompilerDiagnosticFixVerifier.DiagnosticId (BREAKING CHANGE).
    • Make property DiagnosticTestData.Descriptor obsolete.
    • Make property CompilerDiagnosticFixTestData.DiagnosticId obsolete.

Fixed

[4.5.0] - 2023-08-27

Added

  • Add SECURITY.md (PR)
  • Add custom FixAllProvider for RCS1014 (PR).
  • Add more cases to RCS1097 (PR).
  • Add analyzer "Use enum field explicitly" (RCS1257) (PR).
    • Enabled by default.
  • Add analyzer "Unnecessary enum flag" RCS1258 (PR).
    • Enabled by default.
  • Make Roslynator.Rename.SymbolRenamer public (PR)
  • Analyzer 'Remove empty syntax' (RCS1259) (PR).
    • This analyzer replaces following analyzers:
      • Remove empty empty statement (RCS1038)
      • Remove empty 'else' clause (RCS1040)
      • Remove empty object initializer (RCS1041)
      • Remove empty 'finally' clause (RCS1066)
      • Remove empty namespace declaration (RCS1072)
      • Remove empty region directive (RCS1091)
      • Remove empty destructor (RCS1106)
  • [CLI] Add glob pattern matching (--include or/and --exclude) (PR, PR).
  • Add analyzer "Include/omit trailing comma" (RCS1256) (PR).
    • Required option: roslynator_trailing_comma_style = include|omit|omit_when_single_line
    • Not enabled by default

Changed

  • [CLI] Open help in web browser when running command roslynator help <COMMAND> (PR)

Fixed

[4.4.0] - 2023-08-01

Added

  • Add GitHub workflow (#1112)

Changed

  • [CLI] Bump Roslyn to 4.6.0 (#1106).
  • Bump Roslyn to 4.4.0 (#1116).
  • Migrate documentation to Docusaurus (#922).
  • [Testing Framework] Bump Roslyn to 4.6.0 (#1144).

Fixed

[4.3.0] - 2023-04-24

Changed

  • [CLI] Bump Roslyn to 4.5.0 (#1043).
  • [CLI] Downgrade version of Microsoft.Build.Locator from 1.5.5 to 1.4.1 (#1079)

Fixed

  • Fix RCS1084 (#1006).
  • Fix RCS1244 (#1007).
  • [CLI] Add nullable reference type modifier when creating a list of symbols (list-symbols command) (#1013).
  • Add/remove blank line after file scoped namespace declaration (RCS0060) (#1014).
  • Do not remove overriding member in record (RCS1132) (#1015).
  • Do not remove parameterless empty constructor in a struct with field initializers (RCS1074) (#1021).
  • Do not suggest to use generic event handler (RCS1159) (#1022).
  • Fix (RCS1077) (#1023).
  • Fix (RCS1097) (#1037 by @jamesHargreaves12).
  • Do not report (RCS1170) when Microsoft.AspNetCore.Components.InjectAttribute is used (#1046).
  • Fix (RCS1235) (#1047).
  • Fix (RCS1206) (#1049).
  • Prevent possible recursion in (RCS1235) (#1054).
  • Fix (RCS1223) (#1051 by @jamesHargreaves12).
  • Do not remove braces in the cases where there are overlapping local variables. (RCS1031, RCS1211, RCS1208, RCS1061) (#1039, #1062 by @jamesHargreaves12).
  • [CLI] Analyze command does not create the XML output file and returns incorrect exit code when only compiler diagnostics are reported (#1056 by @PeterKaszab).
  • [CLI] Fix exit code when multiple projects are processed (#1061 by @PeterKaszab).
  • Fix code fix for CS0164 (#1031 by @jamesHargreaves12).
  • Do not report System.Windows.DependencyPropertyChangedEventArgs as unused parameter (RCS1163) (#1068).
  • Fix (RCS1032) (#1064 by @jamesHargreaves12).
  • Update processing of .globalconfig file to prioritize file-specific diagnostic severities over global diagnostic severities (#1066 by @jamesHargreaves12).
  • Fix RCS1009 to handles discard designations (#1063 by @jamesHargreaves12).
  • [CLI] Fix number of formatted documents, file banners added (#1072).
  • Improve support for coalesce expressions in code fixes that require computing the logical inversion of an expression, such as RCS1208 (#1069 by @jamesHargreaves12).

[4.2.0] - 2022-11-27

Added

  • Add Arm64 VS 2022 extension support (#990 by @snickler).
  • Add analyzer "Add/remove blank line after file scoped namespace declaration" (RCS0060) (#993).
    • Required option: roslynator_blank_line_after_file_scoped_namespace_declaration = true|false
    • Not enabled by default.
  • Add analyzer "Simplify argument null check" (RCS1255) (#994).
    • Use ArgumentNullException.ThrowIfNull instead of if null check.
    • Not enabled by default.
  • Add analyzer "Invalid argument null check" (RCS1256) (#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).

Changed

  • Disable RCS1080 by default (#980).
  • [CLI] Bump Roslyn to 4.4.0 (#998).
  • [CLI] Add support for .NET 7 and remove support for .NET 5 (#985.

Fixed

  • Fix RCS1080 when collection is derived from List<T> (#986).
  • Fix retrieving of trusted platform assemblies - separator differs by OS (#987).
  • Fix refactoring (RR0014) (#988).
  • Fix refactoring (RR0180) (#988).
  • Recognize ArgumentNullException.ThrowIfNull (RCS1227) (#992).
  • Detect pattern matching in RCS1146 (#999).
  • Handle using directive that starts with global:: RCS0015 (#1000).
  • [VS Extension] Reference all assemblies as 'Analyzer' and 'MefComponent' in vsix manifest (#1002).
    • Fixes AD0001 with System.IO.FileNotFoundException on Visual Studio 17.4 and later.

[4.1.2] - 2022-10-31

Added

  • Convert more syntax to implicit object creation (RCS1250) (#910).
  • Add code fix for CS0037 (#929).
  • [CLI] Generate reference documentation that can be published with Docusaurus (#918).
    • roslynator generate-doc --host docusaurus
  • [CLI] Generate reference documentation that can be published with Sphinx (#961).
    • roslynator generate-doc --host sphinx
  • [CLI] Basic support for <inheritdoc /> when generating documentation (generate-doc command) (#972).
  • [CLI] Add option ignored-title-parts (generate-doc command) (#975).

Changed

  • Rename default branch to main.
  • Format changelog according to 'Keep a Changelog' (#915).
  • [CLI] Improve release build of command-line tool (#912).
  • Do not sort properties in an initializer (RR0216).
  • [CLI] Bump Roslyn to 4.3.1 (#969).
  • [CLI] Bump Microsoft.Build.Locator to 1.5.5 (#969).

Fixed

  • [CLI] Fix filtering of projects (relates to --projects or --ignored-projects parameter) (#914).
  • Refactoring "Add using directive" (RR0014) now works when file-scoped namespace is used (#932).
  • Add parentheses if necessary in a code fix for RCS1197 (#928 by @karl-sjogren).
  • Do not simplify default expression if it would change semantics (RCS1244) (#939.
  • Fix NullReferenceException in RCS1198 (#940.
  • Order named arguments even if optional arguments are not specified RCS1205 (#941, (#965.
  • Prefix identifier with @ if necessary (RCS1220) (#943.
  • Do not suggest to make local variable a const when it is used in ref extension method (RCS1118) (#948.
  • Fix formatting of argument list (#952.
  • Do not remove async/await when 'using declaration' is used (#953.
  • Convert if-else to return statement when pattern matching is used (RCS1073) (#956.
  • [CLI] Include compiler diagnostics in the xml output file of the roslynator analyze command (#964 by @PeterKaszab).
  • Do not simplify 'default' expression if the type is inferred (RCS1244) (#966.
  • Use explicit type from lambda expression (RCS1008) (#967.
  • Do not remove constructor if it is decorated with 'UsedImplicitlyAttribute' (RCS1074) (#968.
  • Detect argument null check in the form of ArgumentNullException.ThrowIfNull (RR0025, RCS1227) (#974.
  • Do not make generic class static if it's inherited (RCS1102) (#978.

4.1.1 (2022-05-29)

  • Bug fixes

4.1.0 (2022-03-29)

  • Add analyzer RCS1254 (Normalize format of enum flag value)
  • Add analyzer RCS1253 (Format documentation comment summary)
  • Add analyzer RCS1252 (Normalize usage of infinite loop)
  • Add analyzer RCS1251 (Remove unnecessary braces from record declaration)
  • Add refactoring Deconstruct foreach variable (RR0217)
  • Add code fix for CS8602, CS8604
  • Add suggestion to call AddRange instead of Add (RCS1235)
  • Put back refactoring "Split local declaration and assignment" (RR0194) (issue)
  • Adopt activation events in VS Code extension (issue) (thanks to ProphetLamb)
  • Fix: Get config value from global AnalyzerConfig if available (issue)
  • Fix: Do not suggest using null-forgiving operator for parameter default value (CS8625)
  • Fix: Check if equality operator is overloaded (RCS1171)
  • Fix: Do not remove field initialization in struct with constructor(s) (RCS1129)

4.0.3 (2022-01-29)

  • Fixed release for VS Code

4.0.2 (2022-01-29)

  • Disable analyzer ROS003 by default (commit)
  • Analyzers that require option to be set should disabled by default (RCS1018, RCS1096, RCS1250) (commit)

Bug fixes

  • Fix analyzer RCS1014 (Use explicitly/implicitly typed array) (commit)
  • Fix analyzer RCS1016 (Use block body or expression body) (commit)
  • Fix refactoring AddUsingDirective (RR0013) (commit)
  • Propagate some options from .roslynatorconfig (commit)
  • Enable ROS analyzers to be set from .roslynatorconfig (commit)
  • Files generated with source generators have relative paths (commit)

4.0.1 (2022-01-21)

  • Bug fixes

4.0.0 (2022-01-16)

  • Bump Roslyn version to 4.0.1

  • Change category of all analyzers to 'Roslynator'

  • Migrate all options to EditorConfig

    • Enable/disable all analyzers
    • Enable/disable all refactorings
    • Enable/disable specific refactoring
    • Enable/disable all compiler diagnostics fixes
    • Enable/disable specific compiler diagnostic fix
  • Add analyzer NormalizeWhitespaceAtBeginningOfFile (RCS0057)

  • Add analyzer NormalizeWhitespaceAtEndOfFile (RCS0058)

  • Add analyzer PlaceNewLineAfterOrBeforeNullConditionalOperator (RCS0059)

  • Add analyzer UnnecessaryNullForgivingOperator (RCS1249)

  • Add analyzer UseImplicitOrExplicitObjectCreation (RCS1250)

  • Add refactoring ExpandPositionalRecord (RR0215)

  • Add refactoring AddAllPropertiesToInitializer (RR0216)

  • Add code fix for CS8403, CS8618 and CS8625

3.3.0 (2021-11-14)

  • Bunch of bug fixes and small improvements
  • Disable analyzers RCS1079 and RCS1090 by default

3.2.2 (2021-08-15)

  • Ensure that shared assemblies with be loaded properly on .NET Core (issue)

3.2.1 (2021-06-30)

  • Publish Roslynator for Visual Studio 2022 Preview
  • Bug fixes and various improvements

3.2.0 (2021-04-26)

Analyzers

Code Fixes

  • Add code fix for CS7036 (commit)
  • Add code fix for CS8632 (commit)
  • Improve code fix for CS0029, CS0246 (commit)
  • Add option for code fix for CS1591 (commit)

3.1.0 (2021-01-04)

  • Add analyzer RCS0056 (Line is too long)
  • Add option to suppress diagnostic from Unity script methods (RCS1213)
  • Consider syntax var foo = Foo.Parse(value) as having obvious type Foo
  • Update references to Roslyn API to 3.7.0

3.0.1 (2020-10-19)

  • Add analyzer RCS0055 (Fix formatting of a binary expression chain)

  • Add analyzer RCS0054 (Fix formatting of a call chain)

  • Add analyzer RCS0053 (Fix formatting of a list)

  • Add analyzer RCS0052 (Add newline before equals sign instead of after it (or vice versa))

  • Add analyzer RCS1248 (Use 'is null' pattern instead of comparison (or vice versa)) (issue)

  • Add analyzer RCS1247 (Fix documentation comment tag)

  • Add analyzer option RCS1207i (Convert method group to anonymous function)

  • Add analyzer option RCS1090i (Remove call to 'ConfigureAwait')

  • Add analyzer option RCS1018i (Remove accessibility modifiers) (issue)

  • Add analyzer option RCS1014i (Use implicitly typed array)

  • Add analyzer option RCS1014a (Use implicitly typed array (when type is obvious))

  • Add analyzer option RCS1078i (Use string.Empty instead of "")

  • Add analyzer option RCS1016a (Convert expression-body to block body when expression is multi-line)

  • Add analyzer option RCS1016b (Convert expression-body to block body when declaration is multi-line)

  • Disable by default analyzer RCS1207i (Convert method group to anonymous function)

  • Remove analyzer RCS1219 (Call 'Enumerable.Skip' and 'Enumerable.Any' instead of 'Enumerable.Count')

  • Rename analyzer "Avoid 'null' on left side of binary expression" to "Constant values should be placed on right side of comparisons" RCS1098

  • Rename analyzer "Simplify boolean expression" to "Unnecessary null check" RCS1199 (issue)

  • More syntax is considered as having obvious type:

    • string literal
    • character literal
    • boolean literal
    • implicit array creation that contains only expressions whose type is obvious

3.0.0 (2020-06-16)

2.9.0 (2020-03-13)

  • Switch to Roslyn 3.x libraries
  • Add Directory.Build.props file
  • Add open configuration commands to Command Palette (VS Code) (PR)

Bug Fixes

  • Fix key duplication/handle camel case names in omnisharp.json (PR)
  • Use prefix unary operator instead of postfix unary operator (RCS1089) (issue)
  • Cast of this to its interface cannot be null (RCS1202) (issue)
  • Do not remove braces in switch section if it contains 'using variable' (RCS1031) (issue)

New Analyzers

  • RCS1242 (DoNotPassNonReadOnlyStructByReadOnlyReference).
  • RCS1243 (DuplicateWordInComment).
  • RCS1244 (SimplifyDefaultExpression).
  • RCS1245 (SimplifyConditionalExpression2) (issue).

Analyzers

  • Disable analyzer RCS1057 by default (issue).
  • Merge analyzer RCS1156 with RCS1113 (issue).
    • x == "" should be replaced with string.IsNullOrEmpty(x)
  • Improve analyzer RCS1215 (commit).
    • x == double.NaN should be replaced with double.IsNaN(x)
  • Enable RCS1169 and RCS1170 if the type is read-only struct (commit).
  • Improve analyzer RCS1077 (commit).
    • x.OrderBy(y => y).Reverse() can be simplified to x.OrderByDescending(y => y)
    • x.SelectMany(y => y).Count() can be simplified to x.Sum(y => y.Count) if x has Count or Length property
  • Improve analyzer RCS1161 - Declare explicit enum value using << operator (commit).
  • Improve analyzer RCS1036 - remove empty line between documentation comment and declaration (commit).
  • Improve analyzer RCS1037 - remove trailing white-space from documentation comment (commit).
  • Improve analyzer RCS1143 (commit)
    • x?.M() ?? default(int?) can be simplified to x?.M() if x is a nullable struct.
  • Improve analyzer RCS1206 (commit)
    • (x != null) ? x.M() : default(int?) can be simplified to x?.M() if x is a nullable struct.

2.3.0 (2019-12-28)

  • Automatically update configuration in omnisharp.json (VS Code) (PR).

2.2.0 (2019-09-28)

  • Enable configuration for non-Windows systems (VS Code).

Analyzers

  • Disable analyzer RCS1029 (FormatBinaryOperatorOnNextLine) by default.

2.1.4 (2019-08-13)

  • Initial release of Roslynator for VS Code.