Skip to content

Releases: SonarSource/sonar-dotnet

10.23

09 Apr 09:32

Choose a tag to compare

This release brings a bunch of fixes! Enjoy.

Bug Fixes

  • NET-3557 - Fix SE AD0001 when SyntaxTreeOptionsProvider is null
  • NET-3519 - Fix AD0001: NRE in PropertiesAccessCorrectField

False Positives

  • NET-3532 - Fix S2583 FP: Any called two times
  • NET-3468 - Fix S1144 FP: Erroneously flagged Add() method used in Collection Initializer
  • NET-3454 - Fix S3267 FP: ref struct in foreach body cannot be captured in LINQ lambda
  • NET-3164 - Fix S125 FP: Improve semicolon heuristic
  • NET-2559 - Fix S5944 FP: When method name is also a class name of generic argument
  • NET-2438 - Fix S1067 FP: Do not raise an issue inside Equals() implementation
  • NET-1565 - Fix S1192 FP: Shouldn't raise on Dapper parameters
  • NET-1168 - Fix S1172 FP: When parameter conditionally used in local function
  • NET-52 - Fix S4017 FP: Do not raise when implementing abstract class/interface

False Negatives

10.22

27 Mar 09:46

Choose a tag to compare

Hello everyone,
This release brings 4 new rules to help developers transition to C# 14, and a bunch of false positive fixes.

New rules

  • NET-3361 - New rule S8381: "scoped" should be escaped when used as a type name in lambda parameters
  • NET-3359 - New rule S8368: "extension" identifiers should be escaped to avoid contextual keyword conflicts
  • NET-3347 - New rule S8380: Return types named "partial" should be escaped with "@"
  • NET-3345 - New rule S8367: Identifiers should not conflict with the "field" keyword in C# 14?

False Positive

  • NET-3443 - Fix S1940 FP: for floating point numbers that can be NaN "!(a <= b)" is not the same as "a > b"
  • NET-3001 - Fix S3063 FP: Concatenation with identifier
  • NET-1569 - Fix S5944 FP: AddressOf(MethodName) in Return statement
  • NET-3445 - Fix T0029 FP: Inside target-typed new
  • NET-2817 - Fix T0029 FP: Ident for collection expression members
  • NET-2024 - Fix T0029 FP: Inside array initializer
  • NET-3341 - Fix T0029 FP: After member access
  • NET-3462 - Fix T0042 FP: Inside constructors and collection initializers
  • NET-3426 - Fix T0042: Raw string in collection initializer
  • NET-2888 - Fix T0042 FP: Returned from method
  • NET-2874 - Fix T0042 FP: Raw string in ternary

Bugs

  • NET-3386 - Fix S4583 AD0001: BeginInvoke callback declared in separate file

Other

  • NET-3385 - S2612: Rule type changed from Security Hotspot to Vulnerability

10.21

13 Mar 14:06

Choose a tag to compare

Bug

  • NET-3376 - Fix S6930 AD0001: Issue on template / code files for blazor
  • NET-3367 - Fix S4830 AD0001: CertificateValidationCheck Syntax node is not within syntax tree

Feature

False Positive

10.20

25 Feb 12:36

Choose a tag to compare

This release brings 9 precision improvements β€” 7 false positive fixes and 2 false negative fixes β€” across rules S1116, S1144, S1210, S1643, S1854, S2365, S3254, S3265, and S127. It also promotes S2068 and S6418 from Security Hotspot to Vulnerability, making them visible directly in the IDE, and removes S3256 from the Sonar Way quality profile.

Changes

  • NET-3227 - Remove S3256 from "Sonar Way" quality profile
  • NET-3208 - S6418: Rule type changed from Security Hotspot to Vulnerability
  • NET-3207 - S2068: Rule type changed from Security Hotspot to Vulnerability
  • NET-3206 - Remove links to rules.sonarsource.com

False Positive

  • NET-3215 - Fix FP on S127: Should only raise on stop condition variables
  • NET-3212 - Fix FP on S3254: Don't raise if the parameter isn't last
  • NET-3053 - Fix FP on S1210: Implementing comparable operators for private types
  • NET-2984 - Fix FP on S3265: BCL enums with [Flags] not recognized due to metadata resolution
  • NET-2976 - Fix FP on S1854: Default value initializations flagged despite exemptions
  • NET-2966 - Fix FP on S1144: Constructors in MEF-exported types
  • NET-2956 - Fix FP on S1116: Empty loop body with side effects in condition

False Negative

  • NET-1261 - Fix FN on S2365: Rule should report on new collection
  • NET-1259 - Fix FN on S1643: Concatenation for parameters, fields and properties are not detected

Rule specification

Maintenance

  • NET-3047 - Update RSPEC before 10.20 release

10.19

30 Jan 10:31

Choose a tag to compare

Documentation

False Positive

  • NET-3004 - Fix S2696 FP: New extension method format triggers FP when accessing static fields

False Negative

Task

  • NET-2948 - Update RSPEC before 10.19 release

Bug

  • NET-1866 - Support future VS versions in NuGet package

10.18

08 Jan 10:19

Choose a tag to compare

This releases focuses on fixing the false-positives that are raised on code making use of the new features in C# 14.ο»Ώ

Improvement

  • NET-2921 - Fix passthrough calculation in ModelBuilder
  • NET-2903 - Remove manual extension methods
  • NET-2895 - Cleanup handling of ParameterList of primary constructors

Task

  • NET-2917 - Update RSPEC before 10.18 release

False Positive

False Negative

10.17

17 Dec 15:31

Choose a tag to compare

False Negative

Task

  • NET-2839 - Update RSPEC before 10.17 release

New Feature

  • NET-2820 - ShimLayer: Implement Factory
  • NET-2789 - ShimLayer Generator: Enums
  • NET-2728 - ShimLayer Generator: SyntaxNodes

Bug

  • NET-2816 - Fix S3603 AD0001: NRE when LocalFunction inside Record constructor in C#7

Improvement

10.16.2

05 Dec 15:35

Choose a tag to compare

Rotations of binary signing keys

10.16.1

03 Dec 09:19

Choose a tag to compare

Rotations of binary signing keys

10.16

26 Nov 07:44

Choose a tag to compare

False Positive

  • NET-1729 - Fix S2114 FP: list.AddRange(list) and list.Concat(list) are sensible

False Negative

  • NET-399 - Fix S4790 FN: Support CryptographicOperations data methods

Bug