Skip to content

NetAnalyzers 6.0.0

Compare
Choose a tag to compare
@JoeRobich JoeRobich released this 24 May 20:50
· 2332 commits to main since this release
547cafd

Release build of Microsoft.CodeAnalysis.NetAnalyzers containing first-party code quality analyzers ("CAxxxx rules").

Added

  • Interoperability
    • CA1418: Use valid platform string -- Enabled by default
    • CA1419: Provide a parameterless constructor that is as visible as the containing type for concrete types derived from 'System.Runtime.InteropServices.SafeHandle' -- Enabled by default
  • Naming
    • CA1727: Use PascalCase for named placeholders -- Enabled by default
  • Performance
    • CA1839: Use 'Environment.ProcessPath' -- Enabled by default
    • CA1840: Use 'Environment.CurrentManagedThreadId' -- Enabled by default
    • CA1841: Prefer Dictionary.Contains methods -- Enabled by default
    • CA1842: Do not use 'WhenAll' with a single task -- Enabled by default
    • CA1843: Do not use 'WaitAll' with a single task -- Enabled by default
    • CA1844: Provide memory-based overrides of async methods when subclassing 'Stream' -- Enabled by default
    • CA1845: Use span-based 'string.Concat' -- Enabled by default
    • CA1846: Prefer 'AsSpan' over 'Substring' -- Enabled by default
    • CA1847: Use char literal for a single character lookup -- Enabled by default
    • CA1848: Use the LoggerMessage delegates -- Enabled by default
    • CA1849: Call async methods when in an async method
  • Reliability
    • CA2017: Parameter count mismatch -- Enabled by default
    • CA2018: 'Buffer.BlockCopy' expects the number of bytes to be copied for the 'count' argument -- Enabled by default
  • Security
    • CA5404: Do not disable token validation checks
    • CA5405: Do not always skip token validation in delegates
  • Usage
    • CA2250: Use 'ThrowIfCancellationRequested' -- Enabled by default
    • CA2251: Use 'string.Equals' -- Enabled by default
    • CA2252: This API requires opting into preview features -- Enabled by default
    • CA2253: Named placeholders should not be numeric values -- Enabled by default
    • CA2254: Template should be a static expression -- Enabled by default
    • CA2255: The 'ModuleInitializer' attribute should not be used in libraries -- Enabled by default
    • CA2256: All members declared in parent interfaces must have an implementation in a DynamicInterfaceCastableImplementation-attributed interface -- Enabled by default
    • CA2257: Members defined on an interface with the 'DynamicInterfaceCastableImplementationAttribute' should be 'static' -- Enabled by default
    • CA2258: Providing a 'DynamicInterfaceCastableImplementation' interface in Visual Basic is unsupported -- Enabled by default

Removed

  • Publish
    • IL3000: Avoid using accessing Assembly file path when publishing as a single-file -- Enabled by default
    • IL3001: Avoid using accessing Assembly file path when publishing as a single-file -- Enabled by default
  • Usage
    • CA1801: Review unused parameters