Skip to content

Bump SonarAnalyzer.CSharp from 10.29.0.143774 to 10.36.0.15337 - #1977

Open
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/nuget/SonarAnalyzer.CSharp-10.36.0.15337
Open

dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/nuget/SonarAnalyzer.CSharp-10.36.0.15337

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Nov 11, 2026

Copy link
Copy Markdown
Contributor

Updated SonarAnalyzer.CSharp from 10.29.0.143774 to 10.36.0.15337.

Release notes

Sourced from SonarAnalyzer.CSharp's releases.

10.36.0.15337

Release notes - .NET Analyzers - 10.36

Two months since 10.35, and the nets have been busy. We went fishing for false positives and landed over twenty, and we caught a crash and a memory leak along the way. We kept the new rules and stopped throwing back the good code fixes.

What's in the catch:

  • 🔮 .NET 11 / C# 15 readiness: we support the new language features (union types, closed hierarchies, extension indexers, collection expression with(...) arguments, labeled break/continue). We probed the SonarWay rules against them and fixed false positives that turned up.
  • 🆕 Three new rules: S9414, S9415 and S9422.
  • 🛠️ Better code fixes: S2178 and S1110, plus a faster, leak-free S110.
  • 🎯 23 false positives gone, including EF Include rules, async/CancellationToken rules and MAUI/WPF handlers.

Feature

NET-1612 Fix S2178 CodeFix: Using short-circuiting operator does not preserve operator precedence
NET-2154 Use Roslyn location mapping capabilities
NET-4654 Create rule S9414: Local variable declarations and assignments should be joined
NET-4655 Create rule S9415: Local functions should be marked "static" when they don't capture variables
NET-4662 Create rule S9422: Lock object fields should use "System.Threading.Lock" type

False Positive

NET-1596 Fix S5332 FP: Don't raise http warning for SOAP actions
NET-2677 Fix S2325 FP: WPF event handlers should be ignored
NET-2937 Fix S2325 FP: Awaitable 'IsCompleted' must be instanced
NET-3295 S6664: Exclude TRACE-level logging calls
NET-4142 Fix S2187, MSTEST0016 FP: Test methods hidden behind #if NET are not seen on other target frameworks
NET-4633 Fix S9023 FP: Select() projector calling an opaque custom mapper is treated as dropping every Included navigation
NET-4640 Fix S2325 FP: MAUI event handlers should be ignored
NET-4671 Fix S1121 FP: Boolean assignments in while conditions
NET-4705 Fix S8949 FP: obsolete CancellationToken overloads are considered as alternatives
NET-4710 Fix S8969 FP: null-forgiving operator flagged as redundant when operand flows through a nullable-returning implicit conversion operator
NET-4733 Fix S6966 FP: EditorBrowsable(Never) overload is suggested as an awaitable alternative
NET-4737 Fix S9022 FP: Include reported redundant via ReportReprojectedIncludes before a materializing (Func<>) terminal operator
NET-4738 Fix S9022 FP: ToDictionary(Async)/ToLookup key selector ignored when checking whether Include is dead
NET-4739 Fix T0015 FP: Local function last in a lambda or nested local function
NET-4742 Fix FP S8949: Suppress suggestion when the producer call is already configured via WithCancellation/ConfigureAwait
NET-4818 Fix S4507 FP: Alerting on !app.Environment.IsProduction()
NET-4836 Fix S4049 FP: Should not raise on Extension Properties
NET-4837 Fix S4049 FP: Should not raise on awaiter GetResult
NET-4842 Fix S3900 FP: C# 15 Extension Indexers should not raise
NET-4913 Fix S3346 FP: .NET 11 BitArray.PopCount in Debug.Assert should not be reported
NET-4916 Fix S3903 FP: C# 15 types nested in a union should not be reported
NET-4938 Fix S3260 FP: C# 15 closed classes should not be suggested for sealing
NET-5034 Fix S3263 FP: C# 15 union static field referencing another static field in the same union is always misreported as out of order

False Negative

NET-4741 Fix S9022 FN: Include not reported redundant before Max/Min when selector dereferences the included nav

Bug

NET-4547 S110 recompiles filteredClasses regexes on every compilation start, leaking IL on .NET Framework
NET-4629 Fix ChangeSyntaxElement to replace on the container
NET-4686 S1110: Restore C# quick-fix support for nested expressions
NET-4794 Consider .NET 11 Razor declaration partials generated code
... (truncated)

10.35.0.4138

Release notes - .NET Analyzers - 10.35

Feature

NET-1313 Improve S3267: Suggest other LINQ methods instead of always Where
NET-4549 Update RSPEC before 10.35 release

False Positive

NET-87 Fix S6667 FP: Add an exception when rethrowing the exception
NET-1559 Fix S6966 FP: FluentValidation ValidateAndThrow should not be proposed
NET-3964 Fix S125 FP: Do not raise on comments that resemble code but are not
NET-4294 Fix S107 FP: Should not raise on constructors of dependency-injection managed types
NET-4310 Fix S8747 FP: Do not raise when data is backfilled via UpdateData
NET-4315 Fix S3453 FP: Should not raise on classes with static members and non-static nested types
NET-4415 Fix S8969 FP: redundant null-forgiving operator raised on ref-loop variables reassigned each iteration
NET-4466 Fix S6966 FP: Do not suggest a non-awaitable overload resolved via speculative rebind
NET-4546 Fix S6669 FP: overridden "format" rule parameter is ignored
NET-4556 Fix S1128 FP: SafeVisit abort silently drops necessary usings
NET-4634 Fix S9022 FP: Generic identity pass-through wrapper not implementing IEnumerable misclassified as a reshaping boundary
NET-4639 Fix S8717 FP: EF6 and EF Core referenced in the same compilation (in-progress migration)

False Negative

NET-4256 Fix S9022 FN: Include on owned-type navigation not detected as redundant
NET-4532 Fix S9022/S9023 FN: rule stays silent when the Include is used in a comparison, cast, or other common expression
NET-4541 Fix S5542 FN: Detect weak RSA signature padding

Bug

NET-4571 Fix AD0001: NRE in DoNotOverwriteCollectionElements
NET-4587 Fix AD0001: ArgumentNullException in ReleaseCorrectReaderWriterLockBase (S7131)
NET-4588 Fix AD0001: ArgumentNullException in FirstSingleShouldBeUsedOnNonEmptyCollectionBase (S7130)
NET-4636 Fix S6966 AD0001: NullReferenceException on null-conditional calls followed by an indexer

Maintenance

NET-4370 Drop backward compatibility with S4NET below 5.2
NET-4540 Update MSTest to 4.4.0
NET-4550 Bump version to 10.35
NET-4555 Update SonarSource/sonar-scanner-engine monorepo to v13.11.0.5929
NET-4558 Create SLCORE ticket instead of SLVSCODE and SLI on release
NET-4579 ShimLayer Generator: Remove old BasicBlock and ControlFlowBranch
NET-4580 Update dependency Microsoft.NET.Test.Sdk to 18.10.0
NET-4596 Update dependency org.codehaus.mojo:build-helper-maven-plugin to v3.6.2
NET-4597 Update dependency Verify.MSTest to 32.0.1
NET-4622 Update SonarSource/sonar-scanner-engine monorepo to v13.13.0.6016
NET-4628 Update dependency Microsoft.NET.Test.Sdk to 18.10.1
NET-4631 Update MSTest to 4.4.1
NET-4632 Harden S1144: internal-type usage scan no longer trusts partial SafeVisit walks
NET-4637 Update protocolbuffers/protobuf monorepo to v4.36.2
NET-4663 Restore sonar-csharp-enterprise-plugin minsize to 6200000

10.34.1.4477

Release notes - .NET Analyzers - 10.34.1

Feature

NET-5002 Collect context in SQ Server 2026.5 onwards

Maintenance

NET-5052 Fix CI for bugfix release
NET-5057 Pin ITs to 2026.5
NET-5061 Bump Version to 10.34.1
NET-5062 Bump parent poms

10.34.0.3385

Release notes - .NET Analyzers - 10.34

Feature

NET-4133 Implement rule S9023: "Include" calls discarded by query reshaping should be fixed

False Positive

NET-3281 Fix S1192 FP: should not raise on DBContext model configuration
NET-4317 Fix S2325 FP: Do not raise on ConfigureServices in classes decorated with [LambdaStartup]
NET-4419 Fix S2737 FP: Do not report known temporary-context rethrow boundaries
NET-4421 Fix S6607 FP: Indexed LINQ Where after OrderBy
NET-4463 Fix S8747 FP: Do not raise when a defaultValue backfills existing NULLs before narrowing to non-nullable
NET-4506 Fix S6967 FP: Recognize manual DataAnnotations validation
NET-4507 Fix S8969 FP: Don't raise in Razor files

False Negative

NET-1883 Files added as symbolic links are not analyzed
NET-4249 Fix S9022 FN: Include before a terminal aggregate/scalar operator not detected as dead code
NET-4379 Fix S2259 FN: void compound assignment operators not flagged as dereference
NET-4383 Fix S9022 FN: Include on a navigation re-projected directly by a later Select/SelectMany is not detected as redundant
NET-4443 Fix S2068 FN: Scope the value passed to the secret-exclusion classifier to the candidate secret
NET-4496 Fix S8949 FN: self-recursion suppression also hides calls already recursive before the suggested fix
NET-4500 Fix S9022 FN: ThenInclude consumed only through a nested Select's rebound element parameter is not detected as redundant

Bug

NET-4483 Fix S3459 FP: Public writable properties in private nested types

Maintenance

NET-4472 Remove S1264 from the C# Sonar way profile
NET-4474 Remove S2692 from the C# Sonar way profile
NET-4480 Remove S3249 from the C# Sonar way profile
NET-4481 Remove S6670 from the C# Sonar way profile
NET-4482 Remove S3885 from the C# Sonar way profile

10.33.0.1635

Release notes - .NET Analyzers - 10.33

Feature

NET-4312 Update RSPEC before 10.33 release
NET-4254 Implement rule S9129: "Include" and "ThenInclude" chains of reference navigations should be merged into a single "Include" call

False Positive

NET-1777 Fix S101 FP: Lower case character after number
NET-4245 Fix S107 FP: should not raise for parameters marked with dependency-injection attributes

Maintenance

NET-4184 Duplicate telemetry key exception when multiple projects report the same non-counter telemetry value

10.32.0.713

Release notes - .NET Analyzers - 10.32

Feature

NET-4132 Implement rule S9022: Redundant "Include" calls should be removed
NET-4215 Implement rule S9118: Default values should be compatible with their entity property type
NET-4240 Update RSPEC before 10.32 release

False Positive

NET-1322 Fix S2857 FP: Do not raise in constant string interpolation when string is in square brackets
NET-1468 Fix S6966 FP: should not raise when inside lock
NET-1598 Fix S1125 FP: dynamic and custom nullable structs with conversion to bool are compliant
NET-4233 Fix S8733 FP: AsSplitQuery/AsSingleQuery set in a different statement than the colliding Includes goes undetected
NET-4297 Fix S8717 FP: EFCore DBFirst Scaffold

10.31.0.145097

Release notes - .NET Analyzers - 10.31

Feature

NET-3865 Implement S8733: Potential Cartesian Explosion
NET-3875 Implement rule S8718: Client-evaluated default values should use database functions
NET-4087 Use shared secret exclusion patterns in hardcoded secrets rules
NET-4211 Update RSPEC before 10.31 release

False Positive

NET-1922 S1144 FP: When registering a service with Microsoft.Extensions.DependencyInjecion framework
NET-3928 Fix S3267 FP: Should not raise on EntityFramework IQueryables
NET-4205 Fix S1244 FP: should not raise on NaN check via x.Equals(double.NaN)

10.30.0.144632

Release notes - .NET Analyzers - 10.30

Feature

NET-1536 Implement rule S8970: Null-forgiving operators should not be used when nullable warnings are disabled
NET-3436 Implement rule S8949: Use the overload that accepts a CancellationToken
NET-3810 Fix: Protobuf Importer logs debug on excluded files
NET-3877 Implement rule S8747: Migrations should not narrow column types without converting existing data
NET-4091 Implement rule S8969: Null-forgiving operators should not be redundant
NET-4120 Update RSPEC before 10.30 release

False Positive

NET-1541 Fix S3459 FP: support classes marked with [AutoConstructor] attribute
NET-1583 Fix S6967 FP: Raises when model has no validation attributes
NET-1840 Fix S3903 FP: top-level statements and partial Program in separate file
NET-4059 Improve precision of S8949 (CancellationTokenShouldBeUsed) - umbrella
NET-4191 Fix S3169 FP: Should not raise in Azure Cosmos

False Negative

NET-3819 Fix S1244 FN: Should report on Double.Equals

Bug

NET-4107 Fix S4026 Race Condition

Commits viewable in compare view.

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

---
updated-dependencies:
- dependency-name: SonarAnalyzer.CSharp
  dependency-version: 10.36.0.15337
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added .NET Pull requests that update .net code dependencies Pull requests that update a dependency file labels Nov 11, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file .NET Pull requests that update .net code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants