.NET Compiler Platform ("Roslyn") Analyzers v5.0.1.xx Release Notes

Release Date: 2020-07-10 // 5 months ago

Previous changes from v3.3.0-beta1.final

  • ๐Ÿš€ Pre-release build of Roslyn-analyzers based on Microsoft.CodeAnalysis 3.3.0 NuGet packages. Works with VS 2019 16.3 or later.

    ๐Ÿš€ Contains following important changes on top of v3.0.0 release

    ๐Ÿ”‹ Feature

    ๐Ÿ‘€ Editorconfig based file/directory level options configuration. See details here

    ๐Ÿ› Bug Fixes

    ๐ŸŽ Many bug fixes, including performance fixes.

    โž• Additional analyzers/fixers:

    โž• Added

    • Design
      • CA1002: Do not expose generic lists
      • CA1005: Avoid excessive parameters on generic types
      • CA1045: Do not pass types by reference
      • CA1046: Do not overload equality operator on reference types
      • CA1047: Do not declare protected member in sealed type -- Enabled by default
      • CA1070: Do not declare event fields as virtual -- Enabled by default
    • Naming
      • CA1700: Do not name enum values 'Reserved'
      • CA1713: Events should not have 'Before' or 'After' prefix -- Enabled by default
    • ๐ŸŽ Performance
      • CA1805: Do not initialize unnecessarily -- Enabled by default
      • CA1830: Prefer strongly-typed Append and Insert method overloads on StringBuilder. -- Enabled by default
      • CA1831: Use AsSpan or AsMemory instead of Range-based indexers when appropriate -- Enabled by default
      • CA1832: Use AsSpan or AsMemory instead of Range-based indexers when appropriate -- Enabled by default
      • CA1833: Use AsSpan or AsMemory instead of Range-based indexers when appropriate -- Enabled by default
      • CA1834: Consider using 'StringBuilder.Append(char)' when applicable. -- Enabled by default
      • CA1835: Prefer the 'Memory'-based overloads for 'ReadAsync' and 'WriteAsync' -- Enabled by default
      • CA1836: Prefer IsEmpty over Count -- Enabled by default
    • Reliability
      • CA2014: Do not use stackalloc in loops. -- Enabled by default
      • CA2015: Do not define finalizers for types derived from MemoryManager -- Enabled by default
      • CA2016: Forward the 'CancellationToken' parameter to methods that take one -- Enabled by default
    • ๐Ÿ”’ Security
      • CA2109: Review visible event handlers -- Enabled by default
    • Usage
      • CA2247: Argument passed to TaskCompletionSource constructor should be TaskCreationOptions enum instead of TaskContinuationOptions enum. -- Enabled by default
      • CA2248: Provide correct 'enum' argument to 'Enum.HasFlag' -- Enabled by default
      • CA2249: Consider using 'string.Contains' instead of 'string.IndexOf' -- Enabled by default

    โœ‚ Removed

    • Reliability
      • CA2010: Always consume the value returned by methods marked with PreserveSigAttribute -- Enabled by default