Add code fixer for MA0173 (Use LazyInitializer.EnsureInitialized)#1071
Merged
Add code fixer for MA0173 (Use LazyInitializer.EnsureInitialized)#1071
Conversation
Agent-Logs-Url: https://github.com/meziantou/Meziantou.Analyzer/sessions/32c82540-26fc-4a46-b483-b78b05949617 Co-authored-by: meziantou <509220+meziantou@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add fixer for MA0173
Add code fixer for MA0173 (Use LazyInitializer.EnsureInitialized)
Mar 30, 2026
meziantou
approved these changes
Mar 30, 2026
This was referenced Mar 30, 2026
Closed
This was referenced Apr 14, 2026
Closed
This was referenced Apr 21, 2026
mghabin
pushed a commit
to mghabin/entra-auth-patterns-dotnet
that referenced
this pull request
Apr 24, 2026
Updated
[Meziantou.Analyzer](https://github.com/meziantou/Meziantou.Analyzer)
from 2.0.187 to 3.0.52.
<details>
<summary>Release notes</summary>
_Sourced from [Meziantou.Analyzer's
releases](https://github.com/meziantou/Meziantou.Analyzer/releases)._
## 3.0.52
NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/3.0.52>
## What's Changed
* Expand documentation for MA0065, MA0066, and MA0069 by @meziantou in
https://github.com/meziantou/Meziantou.Analyzer/pull/1099
* MA0050: improve Throw* argument validation detection by @meziantou in
https://github.com/meziantou/Meziantou.Analyzer/pull/1100
**Full Changelog**:
https://github.com/meziantou/Meziantou.Analyzer/compare/3.0.51...3.0.52
## 3.0.51
NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/3.0.51>
## What's Changed
* Extend MA0067 detection for empty Guid patterns by @meziantou in
https://github.com/meziantou/Meziantou.Analyzer/pull/1098
**Full Changelog**:
https://github.com/meziantou/Meziantou.Analyzer/compare/3.0.50...3.0.51
## 3.0.50
NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/3.0.50>
## What's Changed
* Handle local variable values in MA0173 analyzer by @meziantou in
https://github.com/meziantou/Meziantou.Analyzer/pull/1097
**Full Changelog**:
https://github.com/meziantou/Meziantou.Analyzer/compare/3.0.49...3.0.50
## 3.0.49
NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/3.0.49>
## What's Changed
* MA0182: treat `is` type checks as internal type usage by @Copilot in
https://github.com/meziantou/Meziantou.Analyzer/pull/1096
**Full Changelog**:
https://github.com/meziantou/Meziantou.Analyzer/compare/3.0.48...3.0.49
## 3.0.48
NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/3.0.48>
## What's Changed
* Fix MA0004 code fix crash with chained await using by @meziantou in
https://github.com/meziantou/Meziantou.Analyzer/pull/1094
**Full Changelog**:
https://github.com/meziantou/Meziantou.Analyzer/compare/3.0.47...3.0.48
## 3.0.47
NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/3.0.47>
**Full Changelog**:
https://github.com/meziantou/Meziantou.Analyzer/compare/3.0.46...3.0.47
## 3.0.46
NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/3.0.46>
## What's Changed
* Add MA0192: Use HasFlag instead of bitwise checks with analyzer and
fixer by @meziantou in
https://github.com/meziantou/Meziantou.Analyzer/pull/1091
**Full Changelog**:
https://github.com/meziantou/Meziantou.Analyzer/compare/3.0.45...3.0.46
## 3.0.45
NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/3.0.45>
## What's Changed
* Fix MA0135/MA0139: Serilog `@` destructuring prefix not stripped
consistently for multi-parameter log calls by @Copilot in
https://github.com/meziantou/Meziantou.Analyzer/pull/1089
* Enable batch fix (Fix All) for MA0190 UseRegexSourceGenerator by
@Copilot in https://github.com/meziantou/Meziantou.Analyzer/pull/1090
**Full Changelog**:
https://github.com/meziantou/Meziantou.Analyzer/compare/3.0.44...3.0.45
## 3.0.44
NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/3.0.44>
## What's Changed
* MA0011: suppress diagnostic when all AppendFormat template arguments
are culture-insensitive by @Copilot in
https://github.com/meziantou/Meziantou.Analyzer/pull/1085
**Full Changelog**:
https://github.com/meziantou/Meziantou.Analyzer/compare/3.0.43...3.0.44
## 3.0.43
NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/3.0.43>
## What's Changed
* Fix expression parenthesis in code fixers by @meziantou in
https://github.com/meziantou/Meziantou.Analyzer/pull/1083
**Full Changelog**:
https://github.com/meziantou/Meziantou.Analyzer/compare/3.0.42...3.0.43
## 3.0.42
NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/3.0.42>
## What's Changed
* Cache IsAwaitable result for the no-SyntaxNode overload by @meziantou
in https://github.com/meziantou/Meziantou.Analyzer/pull/1082
**Full Changelog**:
https://github.com/meziantou/Meziantou.Analyzer/compare/3.0.41...3.0.42
## 3.0.41
NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/3.0.41>
## What's Changed
* Improve MA0042 async overload matching coverage by @meziantou in
https://github.com/meziantou/Meziantou.Analyzer/pull/1065
**Full Changelog**:
https://github.com/meziantou/Meziantou.Analyzer/compare/3.0.40...3.0.41
## 3.0.40
NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/3.0.40>
## What's Changed
* Add MA0191: Detect null! and default! usage by @Copilot in
https://github.com/meziantou/Meziantou.Analyzer/pull/1081
**Full Changelog**:
https://github.com/meziantou/Meziantou.Analyzer/compare/3.0.39...3.0.40
## 3.0.39
NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/3.0.39>
## What's Changed
* Add code fixes for MA0094-MA0097 by @meziantou in
https://github.com/meziantou/Meziantou.Analyzer/pull/1078
**Full Changelog**:
https://github.com/meziantou/Meziantou.Analyzer/compare/3.0.38...3.0.39
## 3.0.38
NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/3.0.38>
## What's Changed
* Fix typos and grammar across all 188 rule documentation files by
@Copilot in https://github.com/meziantou/Meziantou.Analyzer/pull/1076
* Add code fixers for MA0118, MA0161, and MA0186 by @meziantou in
https://github.com/meziantou/Meziantou.Analyzer/pull/1079
* Validate fix conditions in RegisterCodeFixesAsync before registering
code fixes by @Copilot in
https://github.com/meziantou/Meziantou.Analyzer/pull/1077
**Full Changelog**:
https://github.com/meziantou/Meziantou.Analyzer/compare/3.0.37...3.0.38
## 3.0.37
NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/3.0.37>
## What's Changed
* docs: require updating rule docs when rules change by @meziantou in
https://github.com/meziantou/Meziantou.Analyzer/pull/1075
* Add code fixers for MA0138/44/46/52/56/57/58/60/69/73 by @meziantou
in https://github.com/meziantou/Meziantou.Analyzer/pull/1074
**Full Changelog**:
https://github.com/meziantou/Meziantou.Analyzer/compare/3.0.36...3.0.37
## 3.0.36
NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/3.0.36>
## What's Changed
* Add missing code fixers for 10 analyzer rules by @meziantou in
https://github.com/meziantou/Meziantou.Analyzer/pull/1073
**Full Changelog**:
https://github.com/meziantou/Meziantou.Analyzer/compare/3.0.35...3.0.36
## 3.0.35
NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/3.0.35>
## What's Changed
* Add missing code fixers for MA0088-MA0137 by @meziantou in
https://github.com/meziantou/Meziantou.Analyzer/pull/1072
**Full Changelog**:
https://github.com/meziantou/Meziantou.Analyzer/compare/3.0.34...3.0.35
## 3.0.34
NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/3.0.34>
## What's Changed
* Add code fixer for MA0174 (Record should use explicit 'class' keyword)
by @Copilot in
https://github.com/meziantou/Meziantou.Analyzer/pull/1070
**Full Changelog**:
https://github.com/meziantou/Meziantou.Analyzer/compare/3.0.33...3.0.34
## 3.0.33
NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/3.0.33>
## What's Changed
* Add code fixer for MA0173 (Use LazyInitializer.EnsureInitialized) by
@Copilot in https://github.com/meziantou/Meziantou.Analyzer/pull/1071
**Full Changelog**:
https://github.com/meziantou/Meziantou.Analyzer/compare/3.0.32...3.0.33
## 3.0.32
NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/3.0.32>
## What's Changed
* Add code fixer for MA0175 (Remove explicit `class` keyword from record
declarations) by @Copilot in
https://github.com/meziantou/Meziantou.Analyzer/pull/1069
**Full Changelog**:
https://github.com/meziantou/Meziantou.Analyzer/compare/3.0.31...3.0.32
## 3.0.31
NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/3.0.31>
## What's Changed
* Add code fixer for MA0137 and MA0138 (async suffix naming) by
@Copilot in https://github.com/meziantou/Meziantou.Analyzer/pull/1068
**Full Changelog**:
https://github.com/meziantou/Meziantou.Analyzer/compare/3.0.30...3.0.31
## 3.0.30
NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/3.0.30>
## What's Changed
* MA0137: Add `exclude_test_methods` configuration option by @Copilot
in https://github.com/meziantou/Meziantou.Analyzer/pull/1067
**Full Changelog**:
https://github.com/meziantou/Meziantou.Analyzer/compare/3.0.29...3.0.30
## 3.0.29
NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/3.0.29>
## What's Changed
* Skip NuGet publish steps for fork PRs in CI by @meziantou in
https://github.com/meziantou/Meziantou.Analyzer/pull/1063
**Full Changelog**:
https://github.com/meziantou/Meziantou.Analyzer/compare/3.0.28...3.0.29
## 3.0.28
NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/3.0.28>
## What's Changed
* MA0008: Use proper blittable type check instead of IsReferenceType by
@meziantou in https://github.com/meziantou/Meziantou.Analyzer/pull/1062
**Full Changelog**:
https://github.com/meziantou/Meziantou.Analyzer/compare/3.0.27...3.0.28
## 3.0.27
NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/3.0.27>
## What's Changed
* MA0190: Suggest converting [GeneratedRegex] partial methods to partial
properties (C# 13+) by @Copilot in
https://github.com/meziantou/Meziantou.Analyzer/pull/1060
**Full Changelog**:
https://github.com/meziantou/Meziantou.Analyzer/compare/3.0.26...3.0.27
## 3.0.26
NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/3.0.26>
## What's Changed
* MA0015: Add option to allow member access expressions as parameter
references by @Copilot in
https://github.com/meziantou/Meziantou.Analyzer/pull/1059
**Full Changelog**:
https://github.com/meziantou/Meziantou.Analyzer/compare/3.0.25...3.0.26
## 3.0.25
NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/3.0.25>
**Full Changelog**:
https://github.com/meziantou/Meziantou.Analyzer/compare/3.0.24...3.0.25
## 3.0.24
NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/3.0.24>
**Full Changelog**:
https://github.com/meziantou/Meziantou.Analyzer/compare/3.0.23...3.0.24
## 3.0.23
NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/3.0.23>
## What's Changed
* Add MA0189 InlineArray analyzer and code fix by @meziantou in
https://github.com/meziantou/Meziantou.Analyzer/pull/1056
**Full Changelog**:
https://github.com/meziantou/Meziantou.Analyzer/compare/3.0.22...3.0.23
## 3.0.22
NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/3.0.22>
## What's Changed
* Add MA0188: Use System.TimeProvider instead of a custom time
abstraction by @Copilot in
https://github.com/meziantou/Meziantou.Analyzer/pull/1055
**Full Changelog**:
https://github.com/meziantou/Meziantou.Analyzer/compare/3.0.21...3.0.22
## 3.0.21
NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/3.0.21>
## What's Changed
* Add `roslyn5.0` packing by @viceroypenguin in
https://github.com/meziantou/Meziantou.Analyzer/pull/1054
**Full Changelog**:
https://github.com/meziantou/Meziantou.Analyzer/compare/3.0.20...3.0.21
## 3.0.20
NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/3.0.20>
## What's Changed
* Fix MA0068 false positive for C# 14 extension block parameters by
@Copilot in https://github.com/meziantou/Meziantou.Analyzer/pull/1053
**Full Changelog**:
https://github.com/meziantou/Meziantou.Analyzer/compare/3.0.19...3.0.20
## 3.0.19
NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/3.0.19>
## What's Changed
* MA0074: Fix StringComparison argument inserted at wrong position when
trailing parameters exist by @Copilot in
https://github.com/meziantou/Meziantou.Analyzer/pull/1050
**Full Changelog**:
https://github.com/meziantou/Meziantou.Analyzer/compare/3.0.18...3.0.19
## 3.0.18
NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/3.0.18>
## What's Changed
* MA0187: Migrate Blazor [Inject] property injection to constructor
injection by @Copilot in
https://github.com/meziantou/Meziantou.Analyzer/pull/1048
**Full Changelog**:
https://github.com/meziantou/Meziantou.Analyzer/compare/3.0.17...3.0.18
## 3.0.17
NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/3.0.17>
## What's Changed
* Refactor argument checks to use ArgumentKind.DefaultValue by
@meziantou in https://github.com/meziantou/Meziantou.Analyzer/pull/1045
**Full Changelog**:
https://github.com/meziantou/Meziantou.Analyzer/compare/3.0.16...3.0.17
## 3.0.16
NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/3.0.16>
## What's Changed
* Fix MA0183 false positive when formatting argument is wrapped in
parentheses by @Copilot in
https://github.com/meziantou/Meziantou.Analyzer/pull/1044
**Full Changelog**:
https://github.com/meziantou/Meziantou.Analyzer/compare/3.0.15...3.0.16
## 3.0.15
NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/3.0.15>
## What's Changed
* MA0183: Extend detection to Console.Write, Console.WriteLine, and
StringBuilder.AppendFormat by @Copilot in
https://github.com/meziantou/Meziantou.Analyzer/pull/1042
**Full Changelog**:
https://github.com/meziantou/Meziantou.Analyzer/compare/3.0.14...3.0.15
## 3.0.14
NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/3.0.14>
## What's Changed
* docs(MA0028): Remove incorrect AppendFormat optimization example by
@Copilot in https://github.com/meziantou/Meziantou.Analyzer/pull/1039
* docs: Document MA0158 as similar to IDE0330 by @Copilot in
https://github.com/meziantou/Meziantou.Analyzer/pull/1040
* MA0028: Detect StringBuilder.AppendFormat with no-placeholder format
strings by @Copilot in
https://github.com/meziantou/Meziantou.Analyzer/pull/1041
**Full Changelog**:
https://github.com/meziantou/Meziantou.Analyzer/compare/3.0.13...3.0.14
## 3.0.13
NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/3.0.13>
## What's Changed
* Fix incorrect CA1065 → MA0072 equivalence mapping by @Copilot in
https://github.com/meziantou/Meziantou.Analyzer/pull/1028
* Fix IDE0330 comparison incorrectly referencing MA0153 instead of
MA0158 by @Copilot in
https://github.com/meziantou/Meziantou.Analyzer/pull/1036
* docs(MA0042): Document false positive when calling sync method from
its own async counterpart by @Copilot in
https://github.com/meziantou/Meziantou.Analyzer/pull/1038
* Fix MA0158 not reported when lock field is initialized in constructor
by @Copilot in
https://github.com/meziantou/Meziantou.Analyzer/pull/1037
**Full Changelog**:
https://github.com/meziantou/Meziantou.Analyzer/compare/3.0.12...3.0.13
## 3.0.12
NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/3.0.12>
## What's Changed
* MA0056: Reclassify as "similar to" CA2214 and document differences by
@Copilot in https://github.com/meziantou/Meziantou.Analyzer/pull/1024
* Fix MA0027 not firing for derived exception types by @Copilot in
https://github.com/meziantou/Meziantou.Analyzer/pull/1026
**Full Changelog**:
https://github.com/meziantou/Meziantou.Analyzer/compare/3.0.11...3.0.12
## 3.0.11
NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/3.0.11>
## What's Changed
* Reduce test fakiness with source generators by @meziantou in
https://github.com/meziantou/Meziantou.Analyzer/pull/1022
**Full Changelog**:
https://github.com/meziantou/Meziantou.Analyzer/compare/3.0.10...3.0.11
## 3.0.10
NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/3.0.10>
## What's Changed
* Add test for implicit params array in AppendLine with AppendFormat by
@meziantou in https://github.com/meziantou/Meziantou.Analyzer/pull/1021
**Full Changelog**:
https://github.com/meziantou/Meziantou.Analyzer/compare/3.0.9...3.0.10
## 3.0.9
NuGet package: <https://www.nuget.org/packages/Meziantou.Analyzer/3.0.9>
## What's Changed
* MA0029: Suppress all Where().X() diagnostics on IQueryable by
@Copilot in https://github.com/meziantou/Meziantou.Analyzer/pull/1017
**Full Changelog**:
https://github.com/meziantou/Meziantou.Analyzer/compare/3.0.8...3.0.9
## 3.0.8
NuGet package: <https://www.nuget.org/packages/Meziantou.Analyzer/3.0.8>
## What's Changed
* Remove exception handling from WithSourceGeneratorsFromNuGet and
document Roslyn version testing by @Copilot in
https://github.com/meziantou/Meziantou.Analyzer/pull/1015
**Full Changelog**:
https://github.com/meziantou/Meziantou.Analyzer/compare/3.0.7...3.0.8
## 3.0.7
NuGet package: <https://www.nuget.org/packages/Meziantou.Analyzer/3.0.7>
## What's Changed
* Fix MA0110 to handle property initializers by @Copilot in
https://github.com/meziantou/Meziantou.Analyzer/pull/1014
**Full Changelog**:
https://github.com/meziantou/Meziantou.Analyzer/compare/3.0.6...3.0.7
## 3.0.6
NuGet package: <https://www.nuget.org/packages/Meziantou.Analyzer/3.0.6>
## What's Changed
* MA0110: Suggest partial property before partial method by @Copilot in
https://github.com/meziantou/Meziantou.Analyzer/pull/1013
**Full Changelog**:
https://github.com/meziantou/Meziantou.Analyzer/compare/3.0.5...3.0.6
## 3.0.5
NuGet package: <https://www.nuget.org/packages/Meziantou.Analyzer/3.0.5>
## What's Changed
* MA0110: Support top-level statements by @Copilot in
https://github.com/meziantou/Meziantou.Analyzer/pull/1012
**Full Changelog**:
https://github.com/meziantou/Meziantou.Analyzer/compare/3.0.4...3.0.5
## 3.0.4
NuGet package: <https://www.nuget.org/packages/Meziantou.Analyzer/3.0.4>
## What's Changed
* MA0110: Remove field/variable when generating partial property code
fix by @Copilot in
https://github.com/meziantou/Meziantou.Analyzer/pull/1011
**Full Changelog**:
https://github.com/meziantou/Meziantou.Analyzer/compare/3.0.3...3.0.4
## 3.0.3
NuGet package: <https://www.nuget.org/packages/Meziantou.Analyzer/3.0.3>
## What's Changed
* MA0110: Derive generated regex names from field/variable context by
@Copilot in https://github.com/meziantou/Meziantou.Analyzer/pull/1010
**Full Changelog**:
https://github.com/meziantou/Meziantou.Analyzer/compare/3.0.2...3.0.3
## 3.0.2
NuGet package: <https://www.nuget.org/packages/Meziantou.Analyzer/3.0.2>
## What's Changed
* Add partial property support for MA0110 Regex Source Generator by
@Copilot in https://github.com/meziantou/Meziantou.Analyzer/pull/1009
**Full Changelog**:
https://github.com/meziantou/Meziantou.Analyzer/compare/3.0.1...3.0.2
## 3.0.1
NuGet package: <https://www.nuget.org/packages/Meziantou.Analyzer/3.0.1>
## What's Changed
* Remove Roslyn 3.x support by @Copilot in
https://github.com/meziantou/Meziantou.Analyzer/pull/1007
**Full Changelog**:
https://github.com/meziantou/Meziantou.Analyzer/compare/2.0.302...3.0.1
## 2.0.302
NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/2.0.302>
**Full Changelog**:
https://github.com/meziantou/Meziantou.Analyzer/compare/2.0.301...2.0.302
## 2.0.301
NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/2.0.301>
## What's Changed
* Fix typo in message format for diagnostic rule by @viceroypenguin in
https://github.com/meziantou/Meziantou.Analyzer/pull/1005
## New Contributors
* @viceroypenguin made their first contribution in
https://github.com/meziantou/Meziantou.Analyzer/pull/1005
**Full Changelog**:
https://github.com/meziantou/Meziantou.Analyzer/compare/2.0.300...2.0.301
## 2.0.300
NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/2.0.300>
## What's Changed
* Add configuration option to allow OfT suffix for generic types with
any arity by @Copilot in
https://github.com/meziantou/Meziantou.Analyzer/pull/1004
**Full Changelog**:
https://github.com/meziantou/Meziantou.Analyzer/compare/2.0.299...2.0.300
## 2.0.299
NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/2.0.299>
## What's Changed
* Fix MA0184 false positive on empty interpolated strings with custom
handlers by @Copilot in
https://github.com/meziantou/Meziantou.Analyzer/pull/1001
**Full Changelog**:
https://github.com/meziantou/Meziantou.Analyzer/compare/2.0.298...2.0.299
## 2.0.298
NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/2.0.298>
## What's Changed
* Add MA0186: Report missing nullable attributes on Equals and
TryGetValue parameters by @Copilot in
https://github.com/meziantou/Meziantou.Analyzer/pull/998
**Full Changelog**:
https://github.com/meziantou/Meziantou.Analyzer/compare/2.0.297...2.0.298
## 2.0.297
NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/2.0.297>
## What's Changed
* MA0007: Support multiline pattern-matching expressions by @Copilot in
https://github.com/meziantou/Meziantou.Analyzer/pull/997
**Full Changelog**:
https://github.com/meziantou/Meziantou.Analyzer/compare/2.0.296...2.0.297
## 2.0.296
NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/2.0.296>
## What's Changed
* Fix MA0185 false-positive for nullable value types by @Copilot in
https://github.com/meziantou/Meziantou.Analyzer/pull/995
**Full Changelog**:
https://github.com/meziantou/Meziantou.Analyzer/compare/2.0.295...2.0.296
## 2.0.295
NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/2.0.295>
## What's Changed
* Update default TargetFramework and adjust test setups by @meziantou
in https://github.com/meziantou/Meziantou.Analyzer/pull/993
**Full Changelog**:
https://github.com/meziantou/Meziantou.Analyzer/compare/2.0.294...2.0.295
## 2.0.294
NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/2.0.294>
**Full Changelog**:
https://github.com/meziantou/Meziantou.Analyzer/compare/2.0.293...2.0.294
## 2.0.293
NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/2.0.293>
## What's Changed
* Fix MA0183 false-positive with params array arguments in string.Format
by @Copilot in https://github.com/meziantou/Meziantou.Analyzer/pull/991
**Full Changelog**:
https://github.com/meziantou/Meziantou.Analyzer/compare/2.0.292...2.0.293
## 2.0.292
NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/2.0.292>
## What's Changed
* Enable MA0184 by default with silent severity by @Copilot in
https://github.com/meziantou/Meziantou.Analyzer/pull/988
**Full Changelog**:
https://github.com/meziantou/Meziantou.Analyzer/compare/2.0.291...2.0.292
## 2.0.291
NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/2.0.291>
## What's Changed
* MA0185: Add tests and docs for literal-only interpolated strings by
@Copilot in https://github.com/meziantou/Meziantou.Analyzer/pull/987
**Full Changelog**:
https://github.com/meziantou/Meziantou.Analyzer/compare/2.0.290...2.0.291
## 2.0.290
NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/2.0.290>
## What's Changed
* Add MA0185: Simplify string.Create with culture-invariant parameters
by @Copilot in https://github.com/meziantou/Meziantou.Analyzer/pull/986
**Full Changelog**:
https://github.com/meziantou/Meziantou.Analyzer/compare/2.0.289...2.0.290
## 2.0.289
NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/2.0.289>
## What's Changed
* Add MA0184: Report interpolated strings without parameters by
@Copilot in https://github.com/meziantou/Meziantou.Analyzer/pull/984
**Full Changelog**:
https://github.com/meziantou/Meziantou.Analyzer/compare/2.0.288...2.0.289
## 2.0.288
NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/2.0.288>
## What's Changed
* Disable MA0042 async overload suggestions for TemporaryDirectory in
test projects by @Copilot in
https://github.com/meziantou/Meziantou.Analyzer/pull/980
**Full Changelog**:
https://github.com/meziantou/Meziantou.Analyzer/compare/2.0.287...2.0.288
## 2.0.287
NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/2.0.287>
## What's Changed
* Add MA0183: Detect string.Format without placeholders or formatting
arguments by @Copilot in
https://github.com/meziantou/Meziantou.Analyzer/pull/979
**Full Changelog**:
https://github.com/meziantou/Meziantou.Analyzer/compare/2.0.286...2.0.287
## 2.0.286
NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/2.0.286>
**Full Changelog**:
https://github.com/meziantou/Meziantou.Analyzer/compare/2.0.285...2.0.286
## 2.0.285
NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/2.0.285>
## What's Changed
* Add collection expression test for MA0182 by @Copilot in
https://github.com/meziantou/Meziantou.Analyzer/pull/977
**Full Changelog**:
https://github.com/meziantou/Meziantou.Analyzer/compare/2.0.284...2.0.285
## 2.0.284
NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/2.0.284>
## What's Changed
* Add code fixers for MA0182 (Avoid unused internal types) by @Copilot
in https://github.com/meziantou/Meziantou.Analyzer/pull/976
**Full Changelog**:
https://github.com/meziantou/Meziantou.Analyzer/compare/2.0.283...2.0.284
## 2.0.283
NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/2.0.283>
## What's Changed
* Exempt ExecutionContext.SuppressFlow() from MA0100 diagnostic by
@Copilot in https://github.com/meziantou/Meziantou.Analyzer/pull/974
**Full Changelog**:
https://github.com/meziantou/Meziantou.Analyzer/compare/2.0.282...2.0.283
## 2.0.282
NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/2.0.282>
**Full Changelog**:
https://github.com/meziantou/Meziantou.Analyzer/compare/2.0.281...2.0.282
## 2.0.281
NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/2.0.281>
**Full Changelog**:
https://github.com/meziantou/Meziantou.Analyzer/compare/2.0.280...2.0.281
## 2.0.280
NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/2.0.280>
**Full Changelog**:
https://github.com/meziantou/Meziantou.Analyzer/compare/2.0.279...2.0.280
## 2.0.279
NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/2.0.279>
## What's Changed
* MA0182 handles entrypoint class and extensions (C# 14) by @meziantou
in https://github.com/meziantou/Meziantou.Analyzer/pull/972
**Full Changelog**:
https://github.com/meziantou/Meziantou.Analyzer/compare/2.0.278...2.0.279
## 2.0.278
NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/2.0.278>
## What's Changed
* Fix MA0182 false positive for delegates used in new expressions by
@Copilot in https://github.com/meziantou/Meziantou.Analyzer/pull/969
**Full Changelog**:
https://github.com/meziantou/Meziantou.Analyzer/compare/2.0.277...2.0.278
## 2.0.277
NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/2.0.277>
**Full Changelog**:
https://github.com/meziantou/Meziantou.Analyzer/compare/2.0.276...2.0.277
## 2.0.276
NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/2.0.276>
## What's Changed
* Fix MA0182 false positive on types with DynamicallyAccessedMembers
attribute by @Copilot in
https://github.com/meziantou/Meziantou.Analyzer/pull/963
**Full Changelog**:
https://github.com/meziantou/Meziantou.Analyzer/compare/2.0.275...2.0.276
## 2.0.275
NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/2.0.275>
**Full Changelog**:
https://github.com/meziantou/Meziantou.Analyzer/compare/2.0.274...2.0.275
## 2.0.274
NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/2.0.274>
## What's Changed
* Fix MA0182 to handle COM interop types with CoClass attribute by
@Copilot in https://github.com/meziantou/Meziantou.Analyzer/pull/959
**Full Changelog**:
https://github.com/meziantou/Meziantou.Analyzer/compare/2.0.273...2.0.274
## 2.0.273
NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/2.0.273>
## What's Changed
* Fix MA0182 false positive for pointer type parameters by @Copilot in
https://github.com/meziantou/Meziantou.Analyzer/pull/961
**Full Changelog**:
https://github.com/meziantou/Meziantou.Analyzer/compare/2.0.272...2.0.273
## 2.0.272
NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/2.0.272>
## What's Changed
* Extend MA0182 to all types by @meziantou in
https://github.com/meziantou/Meziantou.Analyzer/pull/957
**Full Changelog**:
https://github.com/meziantou/Meziantou.Analyzer/compare/2.0.271...2.0.272
## 2.0.271
NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/2.0.271>
## What's Changed
* Add MA0182: Detect unused internal classes with correct handling of
generic type arguments and typeof references by @Copilot in
https://github.com/meziantou/Meziantou.Analyzer/pull/956
**Full Changelog**:
https://github.com/meziantou/Meziantou.Analyzer/compare/2.0.270...2.0.271
## 2.0.270
NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/2.0.270>
## What's Changed
* Apply repository configuration by @meziantou in
https://github.com/meziantou/Meziantou.Analyzer/pull/954
**Full Changelog**:
https://github.com/meziantou/Meziantou.Analyzer/compare/2.0.269...2.0.270
## 2.0.269
NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/2.0.269>
## What's Changed
* Apply repository configuration by @meziantou in
https://github.com/meziantou/Meziantou.Analyzer/pull/953
**Full Changelog**:
https://github.com/meziantou/Meziantou.Analyzer/compare/2.0.268...2.0.269
## 2.0.268
NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/2.0.268>
**Full Changelog**:
https://github.com/meziantou/Meziantou.Analyzer/compare/2.0.267...2.0.268
## 2.0.267
NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/2.0.267>
## What's Changed
* Add MA0181 - Report use of explicit casts by @Copilot in
https://github.com/meziantou/Meziantou.Analyzer/pull/952
**Full Changelog**:
https://github.com/meziantou/Meziantou.Analyzer/compare/2.0.266...2.0.267
## 2.0.266
NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/2.0.266>
**Full Changelog**:
https://github.com/meziantou/Meziantou.Analyzer/compare/2.0.265...2.0.266
## 2.0.265
NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/2.0.265>
## What's Changed
* Add refactoring: convert interpolated string to Format call by
@meziantou in https://github.com/meziantou/Meziantou.Analyzer/pull/948
**Full Changelog**:
https://github.com/meziantou/Meziantou.Analyzer/compare/2.0.264...2.0.265
## 2.0.264
NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/2.0.264>
## What's Changed
* Lower global_level from -1 to -100 in editorconfig files by @Copilot
in https://github.com/meziantou/Meziantou.Analyzer/pull/944
**Full Changelog**:
https://github.com/meziantou/Meziantou.Analyzer/compare/2.0.263...2.0.264
## 2.0.263
NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/2.0.263>
## What's Changed
* Add MA0180: Detect ILogger<T> type parameter mismatch with containing
class by @Copilot in
https://github.com/meziantou/Meziantou.Analyzer/pull/941
**Full Changelog**:
https://github.com/meziantou/Meziantou.Analyzer/compare/2.0.262...2.0.263
## 2.0.262
NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/2.0.262>
## What's Changed
* Make DocumentationGenerator ignore trailing whitespace differences by
@Copilot in https://github.com/meziantou/Meziantou.Analyzer/pull/942
**Full Changelog**:
https://github.com/meziantou/Meziantou.Analyzer/compare/2.0.261...2.0.262
## 2.0.261
NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/2.0.261>
## What's Changed
* Add MA0179: Detect inefficient attribute existence checks by @Copilot
in https://github.com/meziantou/Meziantou.Analyzer/pull/939
**Full Changelog**:
https://github.com/meziantou/Meziantou.Analyzer/compare/2.0.260...2.0.261
## 2.0.260
NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/2.0.260>
## What's Changed
* Add concurrency control to serialize CI runs on main branch by
@Copilot in https://github.com/meziantou/Meziantou.Analyzer/pull/938
**Full Changelog**:
https://github.com/meziantou/Meziantou.Analyzer/compare/2.0.259...2.0.260
## 2.0.259
NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/2.0.259>
## What's Changed
* Add opt-in configuration for MA0153 to detect logging of types
containing DataClassification members by @Copilot in
https://github.com/meziantou/Meziantou.Analyzer/pull/936
**Full Changelog**:
https://github.com/meziantou/Meziantou.Analyzer/compare/2.0.258...2.0.259
## 2.0.258
NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/2.0.258>
**Full Changelog**:
https://github.com/meziantou/Meziantou.Analyzer/compare/2.0.257...2.0.258
## 2.0.257
NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/2.0.257>
## What's Changed
* Fix MA0042 to not flag SemaphoreSlim.Wait(0) as blocking by @Copilot
in https://github.com/meziantou/Meziantou.Analyzer/pull/934
**Full Changelog**:
https://github.com/meziantou/Meziantou.Analyzer/compare/2.0.256...2.0.257
## 2.0.256
NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/2.0.256>
## What's Changed
* Clarify MA0093 only applies to event invocations, not regular method
calls by @Copilot in
https://github.com/meziantou/Meziantou.Analyzer/pull/933
**Full Changelog**:
https://github.com/meziantou/Meziantou.Analyzer/compare/2.0.255...2.0.256
## 2.0.255
NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/2.0.255>
## What's Changed
* Use GlobalAnalyzerConfigFiles with global_level=-1 for analyzer
configuration by @Copilot in
https://github.com/meziantou/Meziantou.Analyzer/pull/932
**Full Changelog**:
https://github.com/meziantou/Meziantou.Analyzer/compare/2.0.254...2.0.255
Commits viewable in [compare
view](https://github.com/meziantou/Meziantou.Analyzer/commits/3.0.52).
</details>
Updated
[SonarAnalyzer.CSharp](https://github.com/SonarSource/sonar-dotnet) from
10.4.0.108396 to 10.24.0.138807.
<details>
<summary>Release notes</summary>
_Sourced from [SonarAnalyzer.CSharp's
releases](https://github.com/SonarSource/sonar-dotnet/releases)._
## 10.24
This release brings a batch of false negative fixes and analyzer crash
fixes.
**Bug Fixes**
- [NET-3596](https://sonarsource.atlassian.net/browse/NET-3596) - Fix
S1144 AD0001: Index out of range exception with type named Nullable
- [NET-3522](https://sonarsource.atlassian.net/browse/NET-3522) - Fix
S1215 AD0001: ArgumentOutOfRangeException
- [NET-3521](https://sonarsource.atlassian.net/browse/NET-3521) - Fix
S2053 AD0001: NRE
- [NET-3520](https://sonarsource.atlassian.net/browse/NET-3520) - Fix
S3267 AD0001: NRE
**False Positives**
- [NET-2276](https://sonarsource.atlassian.net/browse/NET-2276) - Fix
S1192 FP: EF migration classes
**False Negatives**
- [NET-3569](https://sonarsource.atlassian.net/browse/NET-3569) - Fix
T0008 and T0009 FN: Support extension blocks
- [NET-2875](https://sonarsource.atlassian.net/browse/NET-2875) - Fix
S2092 FN: Null Conditional Assignment
- [NET-2857](https://sonarsource.atlassian.net/browse/NET-2857) - Fix
S3330 FN: Null Conditional Assignment
- [NET-2719](https://sonarsource.atlassian.net/browse/NET-2719) - Fix
S4136 FN: Extension methods
- [NET-2688](https://sonarsource.atlassian.net/browse/NET-2688) - Fix
S4433 FN: Null-conditional assignment in tracker
- [NET-2675](https://sonarsource.atlassian.net/browse/NET-2675) - Fix
S6418 FN: Field keyword
- [NET-2667](https://sonarsource.atlassian.net/browse/NET-2667) - Fix
S2934 FN: Null-conditional assignment and field keyword
- [NET-2658](https://sonarsource.atlassian.net/browse/NET-2658) - Fix
S127 FN: BitShiftCompound
## 10.23
This release brings a bunch of fixes! Enjoy.
### Bug Fixes
- [NET-3557](https://sonarsource.atlassian.net/browse/NET-3557) - Fix SE
AD0001 when SyntaxTreeOptionsProvider is null
- [NET-3519](https://sonarsource.atlassian.net/browse/NET-3519) - Fix
AD0001: NRE in PropertiesAccessCorrectField
### False Positives
- [NET-3532](https://sonarsource.atlassian.net/browse/NET-3532) - Fix
S2583 FP: Any called two times
- [NET-3468](https://sonarsource.atlassian.net/browse/NET-3468) - Fix
S1144 FP: Erroneously flagged Add() method used in Collection
Initializer
- [NET-3454](https://sonarsource.atlassian.net/browse/NET-3454) - Fix
S3267 FP: ref struct in foreach body cannot be captured in LINQ lambda
- [NET-3164](https://sonarsource.atlassian.net/browse/NET-3164) - Fix
S125 FP: Improve semicolon heuristic
- [NET-2559](https://sonarsource.atlassian.net/browse/NET-2559) - Fix
S5944 FP: When method name is also a class name of generic argument
- [NET-2438](https://sonarsource.atlassian.net/browse/NET-2438) - Fix
S1067 FP: Do not raise an issue inside Equals() implementation
- [NET-1565](https://sonarsource.atlassian.net/browse/NET-1565) - Fix
S1192 FP: Shouldn't raise on Dapper parameters
- [NET-1168](https://sonarsource.atlassian.net/browse/NET-1168) - Fix
S1172 FP: When parameter conditionally used in local function
- [NET-52](https://sonarsource.atlassian.net/browse/NET-52) - Fix S4017
FP: Do not raise when implementing abstract class/interface
### False Negatives
- [NET-1642](https://sonarsource.atlassian.net/browse/NET-1642) - Fix
S3415, S2701, S2699, S2187 FN: Support NUnit 4.0
- [NET-348](https://sonarsource.atlassian.net/browse/NET-348) - Fix
S4144 FN: Methods with generic return types
## 10.22
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](https://sonarsource.atlassian.net/browse/NET-3361) - New
rule S8381: "scoped" should be escaped when used as a type name in
lambda parameters
* [NET-3359](https://sonarsource.atlassian.net/browse/NET-3359) - New
rule S8368: "extension" identifiers should be escaped to avoid
contextual keyword conflicts
* [NET-3347](https://sonarsource.atlassian.net/browse/NET-3347) - New
rule S8380: Return types named "partial" should be escaped with "@"
* [NET-3345](https://sonarsource.atlassian.net/browse/NET-3345) - New
rule S8367: Identifiers should not conflict with the "field" keyword in
C# 14?
### False Positive
* [NET-3443](https://sonarsource.atlassian.net/browse/NET-3443) - Fix
S1940 FP: for floating point numbers that can be NaN "!(a <= b)" is not
the same as "a > b"
* [NET-3001](https://sonarsource.atlassian.net/browse/NET-3001) - Fix
S3063 FP: Concatenation with identifier
* [NET-1569](https://sonarsource.atlassian.net/browse/NET-1569) - Fix
S5944 FP: AddressOf(MethodName) in Return statement
* [NET-3445](https://sonarsource.atlassian.net/browse/NET-3445) - Fix
T0029 FP: Inside target-typed new
* [NET-2817](https://sonarsource.atlassian.net/browse/NET-2817) - Fix
T0029 FP: Ident for collection expression members
* [NET-2024](https://sonarsource.atlassian.net/browse/NET-2024) - Fix
T0029 FP: Inside array initializer
* [NET-3341](https://sonarsource.atlassian.net/browse/NET-3341) - Fix
T0029 FP: After member access
* [NET-3462](https://sonarsource.atlassian.net/browse/NET-3462) - Fix
T0042 FP: Inside constructors and collection initializers
* [NET-3426](https://sonarsource.atlassian.net/browse/NET-3426) - Fix
T0042: Raw string in collection initializer
* [NET-2888](https://sonarsource.atlassian.net/browse/NET-2888) - Fix
T0042 FP: Returned from method
* [NET-2874](https://sonarsource.atlassian.net/browse/NET-2874) - Fix
T0042 FP: Raw string in ternary
### Bugs
* [NET-3386](https://sonarsource.atlassian.net/browse/NET-3386) - Fix
S4583 AD0001: BeginInvoke callback declared in separate file
### Other
* [NET-3385](https://sonarsource.atlassian.net/browse/NET-3385) - S2612:
Rule type changed from Security Hotspot to Vulnerability
## 10.21
### Bug
* [NET-3376](https://sonarsource.atlassian.net/browse/NET-3376) - Fix
S6930 AD0001: Issue on template / code files for blazor
* [NET-3367](https://sonarsource.atlassian.net/browse/NET-3367) - Fix
S4830 AD0001: CertificateValidationCheck Syntax node is not within
syntax tree
### Feature
* [NET-3260](https://sonarsource.atlassian.net/browse/NET-3260) - Fix
broken links in S6960 RSPEC
### False Positive
* [NET-2886](https://sonarsource.atlassian.net/browse/NET-2886) - Fix
T0015 FP: In constructor
* [NET-1678](https://sonarsource.atlassian.net/browse/NET-1678) - Fix
S4275 FP: with property overload
## 10.20
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](https://sonarsource.atlassian.net/browse/NET-3227) - Remove
S3256 from "Sonar Way" quality profile
* [NET-3208](https://sonarsource.atlassian.net/browse/NET-3208) - S6418:
Rule type changed from Security Hotspot to Vulnerability
* [NET-3207](https://sonarsource.atlassian.net/browse/NET-3207) - S2068:
Rule type changed from Security Hotspot to Vulnerability
* [NET-3206](https://sonarsource.atlassian.net/browse/NET-3206) - Remove
links to rules.sonarsource.com
### False Positive
* [NET-3215](https://sonarsource.atlassian.net/browse/NET-3215) - Fix FP
on S127: Should only raise on stop condition variables
* [NET-3212](https://sonarsource.atlassian.net/browse/NET-3212) - Fix FP
on S3254: Don't raise if the parameter isn't last
* [NET-3053](https://sonarsource.atlassian.net/browse/NET-3053) - Fix FP
on S1210: Implementing comparable operators for private types
* [NET-2984](https://sonarsource.atlassian.net/browse/NET-2984) - Fix FP
on S3265: BCL enums with [Flags] not recognized due to metadata
resolution
* [NET-2976](https://sonarsource.atlassian.net/browse/NET-2976) - Fix FP
on S1854: Default value initializations flagged despite exemptions
* [NET-2966](https://sonarsource.atlassian.net/browse/NET-2966) - Fix FP
on S1144: Constructors in MEF-exported types
* [NET-2956](https://sonarsource.atlassian.net/browse/NET-2956) - Fix FP
on S1116: Empty loop body with side effects in condition
### False Negative
* [NET-1261](https://sonarsource.atlassian.net/browse/NET-1261) - Fix FN
on S2365: Rule should report on new collection
* [NET-1259](https://sonarsource.atlassian.net/browse/NET-1259) - Fix FN
on S1643: Concatenation for parameters, fields and properties are not
detected
### Rule specification
* [NET-3246](https://sonarsource.atlassian.net/browse/NET-3246) - Modify
Rule S127: Update Description
* [NET-3218](https://sonarsource.atlassian.net/browse/NET-3218) - Modify
Rule S3265: Add exception for MethodImplAttributes
* [NET-3086](https://sonarsource.atlassian.net/browse/NET-3086) - Modify
Rule S1116: Add loop exception
### Maintenance
* [NET-3047](https://sonarsource.atlassian.net/browse/NET-3047) - Update
RSPEC before 10.20 release
## 10.19
### Documentation
* [NET-3012](https://sonarsource.atlassian.net/browse/NET-3012) - Modify
Rule S3903: Update description for C#10
### False Positive
* [NET-3004](https://sonarsource.atlassian.net/browse/NET-3004) - Fix
S2696 FP: New extension method format triggers FP when accessing static
fields
### False Negative
* [NET-3011](https://sonarsource.atlassian.net/browse/NET-3011) - Fix
S4790 FN: Support Using statement
### Task
* [NET-2948](https://sonarsource.atlassian.net/browse/NET-2948) - Update
RSPEC before 10.19 release
### Bug
* [NET-1866](https://sonarsource.atlassian.net/browse/NET-1866) -
Support future VS versions in NuGet package
## 10.18
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](https://sonarsource.atlassian.net/browse/NET-2921) - Fix
passthrough calculation in ModelBuilder
* [NET-2903](https://sonarsource.atlassian.net/browse/NET-2903) - Remove
manual extension methods
* [NET-2895](https://sonarsource.atlassian.net/browse/NET-2895) -
Cleanup handling of ParameterList of primary constructors
### Task
* [NET-2917](https://sonarsource.atlassian.net/browse/NET-2917) - Update
RSPEC before 10.18 release
### False Positive
* [NET-2898](https://sonarsource.atlassian.net/browse/NET-2898) - Fix
S2583/S2589 FP: Extension Members
* [NET-2877](https://sonarsource.atlassian.net/browse/NET-2877) - Fix
S2225 FP: Extension member
* [NET-2832](https://sonarsource.atlassian.net/browse/NET-2832) - Fix
S3063 FP: NullConditionalOperator
* [NET-2825](https://sonarsource.atlassian.net/browse/NET-2825) - Fix
S1144 FP: Partial events
* [NET-2821](https://sonarsource.atlassian.net/browse/NET-2821) - Fix
S3264 FP: Partial events
* [NET-2805](https://sonarsource.atlassian.net/browse/NET-2805) - Fix
S1144 FP: S1144 Is confused by Debugger Display attribute
* [NET-2748](https://sonarsource.atlassian.net/browse/NET-2748) - Fix
S3459 FP: NullConditional Assignment
* [NET-2716](https://sonarsource.atlassian.net/browse/NET-2716) - Fix
S2325 FP: Field Keyword
* [NET-2712](https://sonarsource.atlassian.net/browse/NET-2712) - Fix
S2953 FP: Extension block member
* [NET-2707](https://sonarsource.atlassian.net/browse/NET-2707) - Fix
S3877 FP: Equals method without IEquatable
* [NET-2684](https://sonarsource.atlassian.net/browse/NET-2684) - Fix
S7039 FP/FN: Null-conditional assignment
* [NET-2672](https://sonarsource.atlassian.net/browse/NET-2672) - Fix
S3928 FP: Extension block
* [NET-2671](https://sonarsource.atlassian.net/browse/NET-2671) - Fix
S2970 FP: Null Conditional Assignment
* [NET-2668](https://sonarsource.atlassian.net/browse/NET-2668) - Fix
S3398 FP: On private methods in C#14 extensions classes
* [NET-2644](https://sonarsource.atlassian.net/browse/NET-2644) - Fix
S1144 FP: Always raises on private methods in extension block
* [NET-2621](https://sonarsource.atlassian.net/browse/NET-2621) - Fix
S2325 FP: Incorrectly reports on C# 14 extensions
* [NET-2620](https://sonarsource.atlassian.net/browse/NET-2620) - Fix
S4545 FP: Extension Methods
* [NET-2391](https://sonarsource.atlassian.net/browse/NET-2391) - Fix
S1121 FP: Extract (null-forgiving) assignment from expression
* [NET-1914](https://sonarsource.atlassian.net/browse/NET-1914) - Fix
S3264 FP: when using +=
### False Negative
* [NET-2813](https://sonarsource.atlassian.net/browse/NET-2813) - Fix
S2292 FN: FieldKeyword
* [NET-2681](https://sonarsource.atlassian.net/browse/NET-2681) - Fix
S2692 FN: Support Spans
## 10.17
### False Negative
* [NET-2840](https://sonarsource.atlassian.net/browse/NET-2840) -
Improve S2077: Support more methods
### Task
* [NET-2839](https://sonarsource.atlassian.net/browse/NET-2839) - Update
RSPEC before 10.17 release
### New Feature
* [NET-2820](https://sonarsource.atlassian.net/browse/NET-2820) -
ShimLayer: Implement Factory
* [NET-2789](https://sonarsource.atlassian.net/browse/NET-2789) -
ShimLayer Generator: Enums
* [NET-2728](https://sonarsource.atlassian.net/browse/NET-2728) -
ShimLayer Generator: SyntaxNodes
### Bug
* [NET-2816](https://sonarsource.atlassian.net/browse/NET-2816) - Fix
S3603 AD0001: NRE when LocalFunction inside Record constructor in C#7
### Improvement
* [NET-2722](https://sonarsource.atlassian.net/browse/NET-2722) -
Activate new ShimLayer
* [NET-2721](https://sonarsource.atlassian.net/browse/NET-2721) - Create
diff for ShimLayer
* [NET-2720](https://sonarsource.atlassian.net/browse/NET-2720) - Create
ShimLayer projects
## 10.16.2
Rotations of binary signing keys
## 10.16.1
Rotations of binary signing keys
## 10.16
### False Positive
* [NET-1729](https://sonarsource.atlassian.net/browse/NET-1729) - Fix
S2114 FP: list.AddRange(list) and list.Concat(list) are sensible
### False Negative
* [NET-399](https://sonarsource.atlassian.net/browse/NET-399) - Fix
S4790 FN: Support CryptographicOperations data methods
### Bug
* [NET-2686](https://sonarsource.atlassian.net/browse/NET-2686) - Fix
S3604 AD0001: NRE with partial constructor
## 10.15
### False Positive
* [NET-2198](https://sonarsource.atlassian.net/browse/NET-2198) - Fix
S1905 FP: Cast of default! expression is required
* [NET-2197](https://sonarsource.atlassian.net/browse/NET-2197) - Fix
S1905 FP: stackalloc and Span<T> conversions
* [NET-1641](https://sonarsource.atlassian.net/browse/NET-1641) - Fix
S1905 FP: casting `IEnumerable<string?>` to `IEnumerable<string>`
* [NET-2157](https://sonarsource.atlassian.net/browse/NET-2157) - Fix
S2589 FP: Don't raise an issue after a delegate is invoked
* [NET-2073](https://sonarsource.atlassian.net/browse/NET-2073) - Fix
S2699 FP: Add support for FsCheck property tests
* [NET-1537](https://sonarsource.atlassian.net/browse/NET-1537) - Fix
S6964 FP: Don't raise on properties annotated with the
BindRequiredAttribute
### Improvement
* [NET-2112](https://sonarsource.atlassian.net/browse/NET-2112) -
Consider ExplodedNodes relevant if a successor would be relevant
* [NET-2183](https://sonarsource.atlassian.net/browse/NET-2183) - SE:
Set constraint on operation when learning from IsPattern
### False Negative
* [NET-429](https://sonarsource.atlassian.net/browse/NET-429) - Fix
S4275 FN: Support partial properties
### Task
* [NET-2208](https://sonarsource.atlassian.net/browse/NET-2208) - Update
RSpec before release
## 10.14
Hey everyone,
This release mostly focuses on mitigating (NET-2196) a performance
regression that was introduced in 10.13.
### Improvement
* [NET-2196](https://sonarsource.atlassian.net/browse/NET-2196) - Fix
path algorithm for execution flows to mitigate performance regression
* [NET-2177](https://sonarsource.atlassian.net/browse/NET-2177) -
Improve how the Symbolic Execution engine handles exception paths
* [NET-2135](https://sonarsource.atlassian.net/browse/NET-2135) -
Support xUnit V3
* [NET-2163](https://sonarsource.atlassian.net/browse/NET-2163) -
Provide Interface for other plugins to add rules to VB.NET SonarWay
profile
### False Negative
* [NET-235](https://sonarsource.atlassian.net/browse/NET-235) - Fix
S2053: Adjust required salt length to be 32 bytes
### Task
* [NET-2170](https://sonarsource.atlassian.net/browse/NET-2170) - Update
RSPEC before 10.14 release
## 10.13
Hello everyone,
In this release, we've focused on:
- False positive fixes
- Enhancing S2259's secondary locations to provide clearer, step-by-step
explanations of null pointer dereferences issues.
### False Positives
* [NET-2099](https://sonarsource.atlassian.net/browse/NET-2099) - Fix
S3885 FP: Do not raise in ResolutionEventHandler
* [NET-2023](https://sonarsource.atlassian.net/browse/NET-2023) - Fix
S3257 FP: Array with target-typed new
* [NET-1646](https://sonarsource.atlassian.net/browse/NET-1646) - Fix
S3267 FP: Loops should be simplified with LINQ expressions
* [NET-1588](https://sonarsource.atlassian.net/browse/NET-1588) - Fix
S1066 FP: Combination of `dynamic` and `out` should not raise
* [NET-882](https://sonarsource.atlassian.net/browse/NET-882) - Fix
S3257 FP: Don't raise for C# 10 and later when there's explicit delegate
creation
### Improvements
* [NET-2095](https://sonarsource.atlassian.net/browse/NET-2095) -
Improve incremental PR analysis path detection
* SE: S2259 - Improve secondary locations
## 10.12
This release brings the VB version of S6418 and a few FP and FN fixes.
### New Rule
* [NET-1379](https://sonarsource.atlassian.net/browse/NET-1379) - New
Rule: Implement S6418 Hard-coded secrets are security-sensitive for
VB.NET
### False Positive
* [NET-1526](https://sonarsource.atlassian.net/browse/NET-1526) - Fix
S3267 FP: Only raise on IEnumerable
### False Negative
* [NET-1260](https://sonarsource.atlassian.net/browse/NET-1260) - Fix
S1215 FN: GC.GetTotalMemory(forceFullCollection: true) should not be
called
* [NET-1258](https://sonarsource.atlassian.net/browse/NET-1258) - Fix
S6678 FN: Lowercase placeholders in interpolated string
* [NET-1255](https://sonarsource.atlassian.net/browse/NET-1255) - Fix
S3267 FN: Logical operators are not supported
### Task
* [NET-2060](https://sonarsource.atlassian.net/browse/NET-2060) - Update
RSPEC before 11.12 release
## 10.11
Hello everyone!
In this release we fixed a bunch of false positives and false negatives.
Additionally this version adds support for telemetry in order to gather
information on feature usage. Telemetry, requires scanner 10.2.0 or
greater.
### False Positive
* [NET-1522](https://sonarsource.atlassian.net/browse/NET-1522) - Fix
S2068 FP: Do not raise on `password:secret`
* [NET-1149](https://sonarsource.atlassian.net/browse/NET-1149) - Fix
S3626 FP: Add exception when return statement is preceding local
functions
### False Negative
* [NET-1263](https://sonarsource.atlassian.net/browse/NET-1263) - Fix
S1871 FN: Nested if .. else if chain
* [NET-1256](https://sonarsource.atlassian.net/browse/NET-1256) - S2068:
Remove word boundary(\b) from regex
* [NET-1254](https://sonarsource.atlassian.net/browse/NET-1254) - Fix
S3878 FN: When params are passed as array through an attribute
* [NET-1252](https://sonarsource.atlassian.net/browse/NET-1252) - FN
S1168: Support IndexerDeclaration and ConversionOperatorDeclaration
* [NET-459](https://sonarsource.atlassian.net/browse/NET-459) - Fix
S1168 FN: Add support for partial indexers
## 10.10.1
Bugfix release to fix combability with SonarQube Cloud + a
simplification to the `ProfileRegistrar`
### Task
* [NET-1463](https://sonarsource.atlassian.net/browse/NET-1463) - Update
RSPEC before 10.10.1 release
* [NET-1461](https://sonarsource.atlassian.net/browse/NET-1461) - Make
CSharpSonarWayProfile be compatible and simplify ProfileRegistrar
## 10.10
Hey everyone, this release mostly focuses on internal and technical
things.
### General
* [NET-1444](https://sonarsource.atlassian.net/browse/NET-1444) - Move
ProfileRegistrar to org.sonar.plugins.csharpenterprise.api
* [NET-1326](https://sonarsource.atlassian.net/browse/NET-1326) - Update
RSPEC before 10.10 release
### Internal Styling Rules
* [NET-1378](https://sonarsource.atlassian.net/browse/NET-1378) - New
Rule T0045: Use var
* [NET-1359](https://sonarsource.atlassian.net/browse/NET-1359) - New
Rule T0043: Avoid primary constructors on normal classes and structs
* [NET-1358](https://sonarsource.atlassian.net/browse/NET-1358) - New
Rule T0042: Indent raw string literal +4
* [NET-1357](https://sonarsource.atlassian.net/browse/NET-1357) - New
Rule T0041: Use raw string literals for multiline strings
* [NET-1356](https://sonarsource.atlassian.net/browse/NET-1356) - New
Rule T0040: Use minimum necessary interpolation characters
* [NET-1355](https://sonarsource.atlassian.net/browse/NET-1355) - New
Rule T0039: Protected field should start with lower case letter
* [NET-1354](https://sonarsource.atlassian.net/browse/NET-1354) - New
Rule T0038: Use fields instead of auto-implemented private or protected
properties
* [NET-1347](https://sonarsource.atlassian.net/browse/NET-1347) - New
Rule T0000: Don't use Get prefixes
* [NET-1346](https://sonarsource.atlassian.net/browse/NET-1346) - New
Rule T0037: Use .Test suffix namespace
* [NET-1345](https://sonarsource.atlassian.net/browse/NET-1345) - New
rule T0046: Move extension method to dedicated class
* [NET-1344](https://sonarsource.atlassian.net/browse/NET-1344) - New
Rule T0035: Do not use var for this deconstruction
* [NET-1343](https://sonarsource.atlassian.net/browse/NET-1343) - New
Rule T0034: Do not embed var into this condition
* [NET-1342](https://sonarsource.atlassian.net/browse/NET-1342) - New
Rule T0033: Swap the logic to use positive conditions instead
* [NET-1341](https://sonarsource.atlassian.net/browse/NET-1341) - New
Rule T0032: Move the method body to the next line
* [NET-1339](https://sonarsource.atlassian.net/browse/NET-1339) - New
Rule T0030: Move the field initializer on the same line
* [NET-1338](https://sonarsource.atlassian.net/browse/NET-1338) - New
Rule T0029: Indent all arguments +4 further than the invocation line
* [NET-1337](https://sonarsource.atlassian.net/browse/NET-1337) - New
Rule T0028: Move all arguments on the same line, or wrap all of them
* [NET-1336](https://sonarsource.atlassian.net/browse/NET-1336) - New
Rule T0027: Move subsequent expressions on separate lines
* [NET-1335](https://sonarsource.atlassian.net/browse/NET-1335) - New
Rule T0026: Indent member access +4 further than the initial line
* [NET-1334](https://sonarsource.atlassian.net/browse/NET-1334) - New
Rule T0025: Indent ‘?’ and ‘:’ +4 further than the condition line
* [NET-1333](https://sonarsource.atlassian.net/browse/NET-1333) - New
Rule T0024: Place multiline ‘?’ and ‘:’ on separate lines
* [NET-1332](https://sonarsource.atlassian.net/browse/NET-1332) - New
Rule T0022: Indent all parameters with the first one
* [NET-1331](https://sonarsource.atlassian.net/browse/NET-1331) - New
Rule T0021: Use extension methods for Linq
* [NET-1329](https://sonarsource.atlassian.net/browse/NET-1329) - New
Rule T0019: Indent operator correctly
* [NET-1328](https://sonarsource.atlassian.net/browse/NET-1328) - New
Rule T0018: Move the operator to the beginning of the next line
* [NET-1327](https://sonarsource.atlassian.net/browse/NET-1327) - New
Rule T0015: Move local function at the end of the method
* [NET-1237](https://sonarsource.atlassian.net/browse/NET-1237) - New
Rule T0044: Don't add Arrange, Act, and Assert(s) comments
* [NET-1325](https://sonarsource.atlassian.net/browse/NET-1325) -
Improve T0007: Raise on nondeclaring is { } check
## 10.9
Hello everyone!
This is a mega-hardening release! Enjoy 😄
### False Positive
* [NET-1309](https://sonarsource.atlassian.net/browse/NET-1309) - Fix
S2583 FP: Support overrides in IsImplementingInterfaceMember
* [NET-1308](https://sonarsource.atlassian.net/browse/NET-1308) - Fix
S2583 FP: Add support for AdressOf operator
* [NET-1302](https://sonarsource.atlassian.net/browse/NET-1302) - Fix
S4158 FP: Don't raise on GetEnumerator() calls
* [NET-1295](https://sonarsource.atlassian.net/browse/NET-1295) - Fix
S3236 FP: Exclude Debug.Assert
* [NET-1290](https://sonarsource.atlassian.net/browse/NET-1290) - Fix
S4158 FP: Support RouteValueDictionary in AspNetCore
* [NET-1289](https://sonarsource.atlassian.net/browse/NET-1289) - Fix
S4158 FP: Adding methods with well defined sematics
* [NET-1288](https://sonarsource.atlassian.net/browse/NET-1288) - Fix
S4158 FP: Recognize Add methods with bool return type
* [NET-1287](https://sonarsource.atlassian.net/browse/NET-1287) - Fix
S4158 FP: Don't raise on SetValue
* [NET-1280](https://sonarsource.atlassian.net/browse/NET-1280) - Fix
S2342 FP: Flaky reports
* [NET-1278](https://sonarsource.atlassian.net/browse/NET-1278) - Fix
S3440 FP: Variable assignment and switch expression
* [NET-1246](https://sonarsource.atlassian.net/browse/NET-1246) - Fix
S1481 FP: Don't report on discard like looking variables
* [NET-1242](https://sonarsource.atlassian.net/browse/NET-1242) - Fix
S2583/S4158 FP: Support for collections that are initialized with object
* [NET-1241](https://sonarsource.atlassian.net/browse/NET-1241) - Fix
S2589 FP: Don't track concurrent collections
* [NET-1230](https://sonarsource.atlassian.net/browse/NET-1230) - Fix
S4158 FP: Immutable collections
* [NET-1223](https://sonarsource.atlassian.net/browse/NET-1223) - Fix
S3267 FP: ref struct types cannot leave the stack
* [NET-1214](https://sonarsource.atlassian.net/browse/NET-1214) - Fix
S2259 FP: Foreach loop over empty collection
* [NET-1212](https://sonarsource.atlassian.net/browse/NET-1212) - Fix
S2259 FP: Learn bool from NotNull constraint and Null value
* [NET-1208](https://sonarsource.atlassian.net/browse/NET-1208) - Fix
S2589 FP: Rule ignores case guards
* [NET-1207](https://sonarsource.atlassian.net/browse/NET-1207) - Fix
S3966 FP: disposing element of indexable after declaration pattern
* [NET-1203](https://sonarsource.atlassian.net/browse/NET-1203) - Fix
S3966 FP: Enumerating a collection of tuples
* [NET-1202](https://sonarsource.atlassian.net/browse/NET-1202) - Fix
S2259 FP: Foreach nested in try, nested in loop
* [NET-1188](https://sonarsource.atlassian.net/browse/NET-1188) -
Improve S4158 - Empty Collections should not be Enumerated
* [NET-1088](https://sonarsource.atlassian.net/browse/NET-1088) - Fix
S3240 FP: Ignore when a conditional block contains a ternary
* [NET-800](https://sonarsource.atlassian.net/browse/NET-800) - Fix
S2259 FP: FlowCaptures in loops and try-regions
### False Negative
* [NET-1299](https://sonarsource.atlassian.net/browse/NET-1299) - Fix
S2053 FN: Support Copy methods
* [NET-1257](https://sonarsource.atlassian.net/browse/NET-1257) - Fix
S4790 FN: New HashData overloads not recognized
* [NET-1194](https://sonarsource.atlassian.net/browse/NET-1194) - Fix
S4158 FN: Collection Expressions (C# 12)
* [NET-357](https://sonarsource.atlassian.net/browse/NET-357) - Fix
S2068 FN: does not consider `launchSettings.json` files
* [NET-210](https://sonarsource.atlassian.net/browse/NET-210) - Fix
S4158 FN: AddRange with empty collection
### Bug
* [NET-1267](https://sonarsource.atlassian.net/browse/NET-1267) - Fix
S2068 bug: Issue location is out of range in web.config for elements or
attributes with an xml namespace
* [NET-1184](https://sonarsource.atlassian.net/browse/NET-1184) - Roslyn
rule import should map the issue severity to the Software Quality impact
in SonarQube Server
### Improvement
* [NET-1217](https://sonarsource.atlassian.net/browse/NET-1217) -
Improve S3996: Set location to the property instead of record
## 10.8
A small release with a few improvements for S1172, S2222 and S4158:
### False Positive
* [NET-1210](https://sonarsource.atlassian.net/browse/NET-1210) - Fix
S4158 FP: collection filled by another function
* [NET-1168](https://sonarsource.atlassian.net/browse/NET-1168) - Fix
S1172 FP: When parameter is used in local function in a null-conditional
or null-coalescing statement
### False Negative
* [NET-427](https://sonarsource.atlassian.net/browse/NET-427) - Fix
S2222 FN: Support locking via Lock object primitives
* [NET-1228](https://sonarsource.atlassian.net/browse/NET-1228) - Fix
S4158 FN: Support LinkedList
## 10.7
### Improvement
* [NET-1116](https://sonarsource.atlassian.net/browse/NET-1116) -
Deprecate S1227: break statements should not be used except for switch
cases
* [NET-1045](https://sonarsource.atlassian.net/browse/NET-1045) - Remove
unused AnalyzerId and RuleNamespace server properties
### Bug
* [NET-1047](https://sonarsource.atlassian.net/browse/NET-1047) - Fix
install scripts for NuGet packages
## 10.6
### Improvement
* [NET-735](https://sonarsource.atlassian.net/browse/NET-735) - Remove
RoslynProfileExporter
* [NET-1031](https://sonarsource.atlassian.net/browse/NET-1031) - Remove
deprecated SonarLintProfileExporter
* [NET-1038](https://sonarsource.atlassian.net/browse/NET-1038) - Add
symbolic-execution tag to our rules
* [NET-988](https://sonarsource.atlassian.net/browse/NET-988) - Remove
S1197 from SonarWay for VB.NET
* [NET-989](https://sonarsource.atlassian.net/browse/NET-989) - S3444:
Add secondary location message
* [NET-982](https://sonarsource.atlassian.net/browse/NET-982) - S4144:
Add secondary location message
* [NET-979](https://sonarsource.atlassian.net/browse/NET-979) - S4663:
Add secondary location message
* [NET-978](https://sonarsource.atlassian.net/browse/NET-978) - S1168:
Add secondary location message
* [NET-977](https://sonarsource.atlassian.net/browse/NET-977) - S4047:
Add secondary location message
* [NET-976](https://sonarsource.atlassian.net/browse/NET-976) - S4457:
Add secondary location message
* [NET-975](https://sonarsource.atlassian.net/browse/NET-975) - S1066:
Add secondary location message
* [NET-974](https://sonarsource.atlassian.net/browse/NET-974) - S4070:
Add secondary location message
* [NET-973](https://sonarsource.atlassian.net/browse/NET-973) - S1110:
Add secondary location message
* [NET-971](https://sonarsource.atlassian.net/browse/NET-971) - S2612:
Add secondary location message
* [NET-970](https://sonarsource.atlassian.net/browse/NET-970) - S6667:
Add secondary location message
* [NET-969](https://sonarsource.atlassian.net/browse/NET-969) - S6931:
Add secondary location message
* [NET-968](https://sonarsource.atlassian.net/browse/NET-968) - S6934:
Add secondary location message
* [NET-967](https://sonarsource.atlassian.net/browse/NET-967) - S5034:
Add secondary location message
* [NET-966](https://sonarsource.atlassian.net/browse/NET-966) - S6607:
Add secondary location message
* [NET-965](https://sonarsource.atlassian.net/browse/NET-965) - S4143:
Add secondary location message
* [NET-961](https://sonarsource.atlassian.net/browse/NET-961) - S6664:
Add secondary location message
* [NET-960](https://sonarsource.atlassian.net/browse/NET-960) - S6677:
Add secondary location message
* [NET-956](https://sonarsource.atlassian.net/browse/NET-956) - S6673:
Add secondary location message
## 10.5
### Improvement
* [NET-957](https://sonarsource.atlassian.net/browse/NET-957) - S5693:
Add secondary location message
Commits viewable in [compare
view](https://github.com/SonarSource/sonar-dotnet/commits).
</details>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This was referenced Apr 24, 2026
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
MA0173 flagged
Interlocked.CompareExchange(ref _field, new T(), null)but provided no automated fix.Changes
UseLazyInitializerEnsureInitializeFixer: rewrites the flagged call toLazyInitializer.EnsureInitialized, wrapping the factory expression in a lambda and dropping the null comparand argument. Supports fix-all viaBatchFixer.ShouldFixCodeWithassertions for the four diagnostic cases.Example
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
1s1vsblobprodcus386.vsblob.vsassets.io/usr/share/dotnet/dotnet dotnet restore --no-dependencies /home/REDACTED/work/Meziantou.Analyzer/Meziantou.Analyzer/Meziantou.Analyzer.slnx --packages /tmp/codeql-scratch-8ad8dc5536a632e8/dbs/csharp/working/packages /p:DisableImplicitNuGetFallbackFolder=true --verbosity normal /p:TargetFrameworkRootPath=/tmp/codeql-scratch-8ad8dc5536a632e8/dbs/csharp/working/emptyFakeDotnetRoot /p:NetCoreTargetingPackRoot=/tmp/codeql-scratch-8ad8dc5536a632e8/dbs/csharp/working/emptyFakeDotnetRoot /p:AllowMissingPrunePackageData=true(dns block)pdfvsblobprodcus380.vsblob.vsassets.io/usr/share/dotnet/dotnet dotnet restore --no-dependencies /home/REDACTED/work/Meziantou.Analyzer/Meziantou.Analyzer/Meziantou.Analyzer.slnx --packages /tmp/codeql-scratch-8ad8dc5536a632e8/dbs/csharp/working/packages /p:DisableImplicitNuGetFallbackFolder=true --verbosity normal /p:TargetFrameworkRootPath=/tmp/codeql-scratch-8ad8dc5536a632e8/dbs/csharp/working/emptyFakeDotnetRoot /p:NetCoreTargetingPackRoot=/tmp/codeql-scratch-8ad8dc5536a632e8/dbs/csharp/working/emptyFakeDotnetRoot /p:AllowMissingPrunePackageData=true(dns block)st8vsblobprodcus339.vsblob.vsassets.io/usr/share/dotnet/dotnet dotnet restore --no-dependencies /home/REDACTED/work/Meziantou.Analyzer/Meziantou.Analyzer/Meziantou.Analyzer.slnx --packages /tmp/codeql-scratch-8ad8dc5536a632e8/dbs/csharp/working/packages /p:DisableImplicitNuGetFallbackFolder=true --verbosity normal /p:TargetFrameworkRootPath=/tmp/codeql-scratch-8ad8dc5536a632e8/dbs/csharp/working/emptyFakeDotnetRoot /p:NetCoreTargetingPackRoot=/tmp/codeql-scratch-8ad8dc5536a632e8/dbs/csharp/working/emptyFakeDotnetRoot /p:AllowMissingPrunePackageData=true(dns block)/usr/share/dotnet/dotnet dotnet restore --no-dependencies /home/REDACTED/work/Meziantou.Analyzer/Meziantou.Analyzer/tests/Meziantou.Analyzer.Test/Meziantou.Analyzer.Test.csproj --packages /tmp/codeql-scratch-8ad8dc5536a632e8/dbs/csharp/working/packages /p:DisableImplicitNuGetFallbackFolder=true --verbosity normal /p:TargetFrameworkRootPath=/tmp/codeql-scratch-8ad8dc5536a632e8/dbs/csharp/working/emptyFakeDotnetRoot /p:NetCoreTargetingPackRoot=/tmp/codeql-scratch-8ad8dc5536a632e8/dbs/csharp/working/emptyFakeDotnetRoot /p:AllowMissingPrunePackageData=true(dns block)If you need me to access, download, or install something from one of these locations, you can either: