Roslynator v4.2.0 Release Notes

Release Date: 2022-11-27 // over 1 year ago
  • ➕ 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

    • 0️⃣ 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.

Previous changes from v4.1.2

  • ➕ 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).
    • Publish Roslynator to Open VSX Registry (#820).

    🔄 Changed

    • 0️⃣ 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).
    • 0️⃣ 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).
    • 0️⃣ 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.

    <!-- Content below does not adhere to 'Keep a Changelog' format -->