Skip to content

Report MA0070 on every declaration that can be obsolete - #1508

Merged
meziantou merged 1 commit into
mainfrom
feature/ma0070-obsolete-coverage-8bbf9f
Sep 12, 2026
Merged

meziantou merged 1 commit into
mainfrom
feature/ma0070-obsolete-coverage-8bbf9f

Conversation

@meziantou

Copy link
Copy Markdown
Owner

What

MA0070 (Obsolete attributes should include explanations) only registered SymbolKind.Method, so [Obsolete] without an explanation was silently ignored on every other declaration:

[Obsolete]                      // was not reported
public class Sample
{
    [Obsolete]                  // was not reported
    public int Prop { get; set; }

    [Obsolete]                  // was not reported
    public int Field;

    [Obsolete]                  // reported
    public void M() { }
}

Property and event accessors are SymbolKind.Method, but [Obsolete] on a property is stored on the IPropertySymbol rather than on get_/set_, so the accessor registration did not cover properties either.

AnalyzeMethod became AnalyzeSymbol working on ISymbol, and the registration now covers NamedType, Method, Property, Field and Event.

Why those five kinds

They cover every target ObsoleteAttribute actually allows — class, struct, enum, interface, delegate, constructor, method, property, indexer, field, event — with enum members falling under Field and indexers under Property.

Worth flagging for review: ObsoleteAttribute is not AttributeTargets.All, so parameters and assemblies are deliberately excluded. The compiler already reports CS0592 for [Obsolete] on a parameter or an assembly, so registering SymbolKind.Parameter or analyzing assembly attributes would only produce MA0070 on code that does not compile. I confirmed this with throwaway tests before dropping them.

Two guards that are needed

  • IsImplicitlyDeclared — synthesized symbols cannot carry an attribute of their own; the guard keeps them from re-reporting the attribute of the symbol they are generated from.
  • IsSecondaryVariableDeclarator[Obsolete] public int A, B; produces two field symbols sharing a single AttributeData, which reported the same diagnostic twice at the same span. The attribute is now reported once, on the first declarator. The same applies to field-like events (event EventHandler A, B;), which use the same VariableDeclarationSyntax.

On using OperationKind.Attribute instead

I prototyped an IAttributeOperation version (green on all five Roslyn versions, 71 lines vs 92) and did not ship it. Two assumptions did not survive testing:

  • Attribute operations are produced per symbol, not per syntax, so the multi-declarator duplicate is not solved by them — IsSecondaryVariableDeclarator is required either way.
  • Local functions and lambdas ([Obsolete] void Local() {}, [Obsolete] () => {}) compile fine but are missed by both approaches. Pre-existing gap, unchanged here.

It would drop the IsImplicitlyDeclared guard and be immune to the too-narrow-SymbolKind-list mistake this PR fixes, which is a genuine point in its favour. Against it: registering any operation action makes the driver build and walk full operation trees, method bodies included, for every symbol with executable code — cost symbol.GetAttributes() does not incur, and cost that lands on anyone running MA0070 on its own or in the IDE. Since ObsoleteAttribute's targets are fixed by the framework and now fully enumerated, I judged the robustness win theoretical and the cost real. Happy to swap if you prefer the operation form.

Tests

19 new tests in the existing test file (22 total), covering class, interface, struct, enum, enum member, delegate, constructor, property, property accessor, indexer, field, event, both multi-declarator cases, records (type-targeted and [property:]-targeted), and [Obsolete(DiagnosticId = "ID1")] — a named argument with no constructor argument still reports, which the new test pins down.

  • dotnet build (whole solution): succeeded, 0 warnings
  • MA0070 tests on roslyn4.8, 4.14, 5.0, 5.6 and 5.9: 22/22 on each
  • Full suite on roslyn5.9: 4614/4614
  • dotnet run --project src/DocumentationGenerator: exit 0, no markdown changes

Docs

docs/Rules/MA0070.md now lists the covered declarations and shows type, property, field, event and enum-member examples. No change to docs/comparison-with-other-analyzers.md: MA0070 was already listed as equivalent to CA1041, and the broader coverage makes that equivalence accurate rather than aspirational.

MA0070 only registered SymbolKind.Method, so [Obsolete] without an
explanation was ignored everywhere else: types, properties, indexers,
fields, events and enum members. Property accessors are methods, but the
attribute is stored on the IPropertySymbol rather than on get_/set_, so
the accessor registration did not cover properties either.

Register NamedType, Property, Field and Event as well, and read the
attributes through ISymbol. Those five kinds cover every target
ObsoleteAttribute allows (class, struct, enum, interface, delegate,
constructor, method, property, indexer, field, event), with enum members
and indexers falling under Field and Property. Parameters and assemblies
are not valid targets, so they are deliberately left out: the compiler
already reports CS0592 there, and analyzing them would only add
diagnostics on code that does not compile.

Skip implicitly declared symbols, which cannot carry an attribute of
their own, and report an attribute shared by several variable
declarators only once, since "[Obsolete] int a, b;" produces one
attribute for two field symbols and reported the same location twice.
@meziantou
meziantou merged commit db8d01d into main Sep 12, 2026
13 checks passed
@meziantou
meziantou deleted the feature/ma0070-obsolete-coverage-8bbf9f branch September 12, 2026 20:17
This was referenced Sep 12, 2026
vdolek pushed a commit to EvilBrainsTechnology/EvilCase that referenced this pull request Sep 14, 2026
Updated
[Meziantou.Analyzer](https://github.com/meziantou/Meziantou.Analyzer)
from 3.0.200 to 3.0.257.

<details>
<summary>Release notes</summary>

_Sourced from [Meziantou.Analyzer's
releases](https://github.com/meziantou/Meziantou.Analyzer/releases)._

## 3.0.257

NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/3.0.257>

## What's Changed
* Use GetTypeByMetadataName unless the type is commonly declared as
internal in several assemblies by @​meziantou in
meziantou/Meziantou.Analyzer#1523


**Full Changelog**:
meziantou/Meziantou.Analyzer@3.0.256...3.0.257

## 3.0.256

NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/3.0.256>

## What's Changed
* Fix metadata names that could never resolve in MA0003, MA0001 and
MA0060 by @​meziantou in
meziantou/Meziantou.Analyzer#1522


**Full Changelog**:
meziantou/Meziantou.Analyzer@3.0.255...3.0.256

## 3.0.255

NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/3.0.255>

## What's Changed
* Add an option to include extension methods from namespaces that are
not imported in the rules using OverloadFinder by @​meziantou in
meziantou/Meziantou.Analyzer#1521


**Full Changelog**:
meziantou/Meziantou.Analyzer@3.0.254...3.0.255

## 3.0.254

NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/3.0.254>

## What's Changed
* Remove the unreachable string.Join branch of MA0089 by @​meziantou in
meziantou/Meziantou.Analyzer#1504
* Fix MA0018 reporting one diagnostic per event accessor by @​meziantou
in meziantou/Meziantou.Analyzer#1505
* chore(deps): update all dependencies to 1.0.172 by @​renovate[bot] in
meziantou/Meziantou.Analyzer#1507
* Report MA0070 on every declaration that can be obsolete by @​meziantou
in meziantou/Meziantou.Analyzer#1508
* Remove the discarded message argument of MA0080 by @​meziantou in
meziantou/Meziantou.Analyzer#1509
* Report MA0068 on the parameter and property placements of
NotNullIfNotNull by @​meziantou in
meziantou/Meziantou.Analyzer#1510
* Include the preprocessor trivia in the MA0202 branch comparison by
@​meziantou in meziantou/Meziantou.Analyzer#1511
* Report MA0179 when the constant is on the left of the length
comparison by @​meziantou in
meziantou/Meziantou.Analyzer#1512
* Fix the MA0166 message saying "available tokens" by @​meziantou in
meziantou/Meziantou.Analyzer#1513
* Detect the ConfigureAwait of the async enumerable in the MA0004
foreach analysis by @​meziantou in
meziantou/Meziantou.Analyzer#1506
* Report MA0206 on record struct and interface declarations by
@​meziantou in meziantou/Meziantou.Analyzer#1514
* Report MA0147 on async void method groups by @​meziantou in
meziantou/Meziantou.Analyzer#1515
* Report MA0051 on expression bodies of properties, indexers, and
operators by @​meziantou in
meziantou/Meziantou.Analyzer#1517
* Clarify the MA0095 comment about the Equals(object) lookup by
@​meziantou in meziantou/Meziantou.Analyzer#1518
* Report relational and generic math NaN comparisons in MA0082 by
@​meziantou in meziantou/Meziantou.Analyzer#1519
* Cache the MA0042 "no async equivalent" results per call-site scope by
@​meziantou in meziantou/Meziantou.Analyzer#1520
* Report the contextual keywords in MA0154 by @​meziantou in
meziantou/Meziantou.Analyzer#1516


**Full Changelog**:
meziantou/Meziantou.Analyzer@3.0.253...3.0.254

## 3.0.253

NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/3.0.253>

## What's Changed
* Share the argument list logic of the code fixes that add an argument
by @​meziantou in
meziantou/Meziantou.Analyzer#1503


**Full Changelog**:
meziantou/Meziantou.Analyzer@3.0.252...3.0.253

## 3.0.252

NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/3.0.252>

## What's Changed
* Preserve the variable scope in the MA0004 code fix by @​meziantou in
meziantou/Meziantou.Analyzer#1502


**Full Changelog**:
meziantou/Meziantou.Analyzer@3.0.251...3.0.252

## 3.0.251

NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/3.0.251>

## What's Changed
* Keep the initialization order in the MA0004 code fix by @​meziantou in
meziantou/Meziantou.Analyzer#1496
* Do not offer the MA0082 code fix when both operands are NaN by
@​meziantou in meziantou/Meziantou.Analyzer#1497
* Report MA0224/MA0225 when an earlier assignment configures another
instance by @​meziantou in
meziantou/Meziantou.Analyzer#1498
* Fix MA0040 inserting the CancellationToken in an invalid argument
position by @​meziantou in
meziantou/Meziantou.Analyzer#1499
* Preserve argument binding in the MA0074 code fix by @​meziantou in
meziantou/Meziantou.Analyzer#1500
* Fix MA0011 inserting the IFormatProvider in an invalid argument
position by @​meziantou in
meziantou/Meziantou.Analyzer#1501


**Full Changelog**:
meziantou/Meziantou.Analyzer@3.0.250...3.0.251

## 3.0.250

NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/3.0.250>

## What's Changed
* Report MA0163 when an assignment cannot fix the configuration used by
Process.Start by @​meziantou in
meziantou/Meziantou.Analyzer#1489
* Fix MA0166 inserting the TimeProvider in an invalid argument position
by @​meziantou in
meziantou/Meziantou.Analyzer#1490
* Do not report MA0214 when the function cannot be made async by
@​meziantou in meziantou/Meziantou.Analyzer#1491
* Preserve argument binding in the MA0108 code fix by @​meziantou in
meziantou/Meziantou.Analyzer#1492
* Add the type to the parameter added by the MA0106 code fix on a typed
lambda by @​meziantou in
meziantou/Meziantou.Analyzer#1495


**Full Changelog**:
meziantou/Meziantou.Analyzer@3.0.249...3.0.250

## 3.0.249

NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/3.0.249>

## What's Changed
* MA0177: preserve nested XML elements such as <see/> when collapsing by
@​meziantou in meziantou/Meziantou.Analyzer#1481
* Fix MA0184 code fix keeping doubled braces as literal text by
@​meziantou in meziantou/Meziantou.Analyzer#1465
* Do not report MA0209/MA0210 for arguments that cannot be passed by
reference by @​meziantou in
meziantou/Meziantou.Analyzer#1469
* Do not report MA0148/MA0149 when the constant does not convert to the
operand type by @​meziantou in
meziantou/Meziantou.Analyzer#1470
* Do not report MA0028 for string.Join overloads without an AppendJoin
equivalent by @​meziantou in
meziantou/Meziantou.Analyzer#1475
* chore(deps): update all dependencies by @​renovate[bot] in
meziantou/Meziantou.Analyzer#1477
* Fix MA0193 code fix producing invalid calls with named arguments by
@​meziantou in meziantou/Meziantou.Analyzer#1486
* Do not report MA0173 when the value cannot be captured by a lambda by
@​meziantou in meziantou/Meziantou.Analyzer#1487
* Do not report MA0106 when the factory writes the captured variable by
@​meziantou in meziantou/Meziantou.Analyzer#1488


**Full Changelog**:
meziantou/Meziantou.Analyzer@3.0.248...3.0.249

## 3.0.248

NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/3.0.248>

## What's Changed
* Do not report MA0065 when the invoked equality member is overridden by
@​meziantou in meziantou/Meziantou.Analyzer#1485
* Do not report MA0152 when the inner await suppresses the exceptions by
@​meziantou in meziantou/Meziantou.Analyzer#1484


**Full Changelog**:
meziantou/Meziantou.Analyzer@3.0.247...3.0.248

## 3.0.247

NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/3.0.247>

## What's Changed
* Do not report MA0215 when ConfigureAwait changes what the method does
by @​meziantou in
meziantou/Meziantou.Analyzer#1483


**Full Changelog**:
meziantou/Meziantou.Analyzer@3.0.246...3.0.247

## 3.0.246

NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/3.0.246>

## What's Changed
* Fix MA0158 code fix when the field is assigned in another document by
@​meziantou in meziantou/Meziantou.Analyzer#1478
* Do not report MA0173 when the return value of CompareExchange is used
by @​meziantou in
meziantou/Meziantou.Analyzer#1479
* Do not report MA0066 on ImmutableSortedDictionary by @​meziantou in
meziantou/Meziantou.Analyzer#1480


**Full Changelog**:
meziantou/Meziantou.Analyzer@3.0.245...3.0.246

## 3.0.245

NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/3.0.245>

## What's Changed
* Do not report MA0158 when the value cannot be migrated to
System.Threading.Lock by @​meziantou in
meziantou/Meziantou.Analyzer#1476


**Full Changelog**:
meziantou/Meziantou.Analyzer@3.0.244...3.0.245

## 3.0.244

NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/3.0.244>

## What's Changed
* Fix MA0028 changing escaped braces when replacing AppendFormat with
Append by @​meziantou in
meziantou/Meziantou.Analyzer#1474


**Full Changelog**:
meziantou/Meziantou.Analyzer@3.0.243...3.0.244

## 3.0.243

NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/3.0.243>

## What's Changed
* Do not report MA0078 when the selector does more than casting its
element by @​meziantou in
meziantou/Meziantou.Analyzer#1473


**Full Changelog**:
meziantou/Meziantou.Analyzer@3.0.242...3.0.243

## 3.0.242

NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/3.0.242>

## What's Changed
* Do not report MA0111 in expression trees by @​meziantou in
meziantou/Meziantou.Analyzer#1471
* Do not offer the MA0098 Last() code fix when the source cannot be
evaluated twice by @​meziantou in
meziantou/Meziantou.Analyzer#1472


**Full Changelog**:
meziantou/Meziantou.Analyzer@3.0.241...3.0.242

## 3.0.241

NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/3.0.241>

## What's Changed
* Do not merge MA0148/MA0149 comparisons when the operand can change
between evaluations by @​meziantou in
meziantou/Meziantou.Analyzer#1466
* Fix MA0210 checking the wrong parameter for reordered named arguments
by @​meziantou in
meziantou/Meziantou.Analyzer#1467
* Do not report MA0184 when the interpolated string is converted to
IFormattable by @​meziantou in
meziantou/Meziantou.Analyzer#1468


**Full Changelog**:
meziantou/Meziantou.Analyzer@3.0.240...3.0.241

## 3.0.240

NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/3.0.240>

## What's Changed
* Remove every dollar of raw strings in MA0184 code fix by @​meziantou
in meziantou/Meziantou.Analyzer#1464


**Full Changelog**:
meziantou/Meziantou.Analyzer@3.0.239...3.0.240

## 3.0.239

NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/3.0.239>

## What's Changed
* Do not report MA0005 for arrays of pointers by @​meziantou in
meziantou/Meziantou.Analyzer#1460
* Fix MA0171 code fix omitting parentheses around the generated pattern
by @​meziantou in
meziantou/Meziantou.Analyzer#1461
* Do not offer the MA0044 code fix when removing ToString would drop
argument side effects by @​meziantou in
meziantou/Meziantou.Analyzer#1462
* Import System.Threading.Tasks in MA0152 code fix by @​meziantou in
meziantou/Meziantou.Analyzer#1463


**Full Changelog**:
meziantou/Meziantou.Analyzer@3.0.238...3.0.239

## 3.0.238

NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/3.0.238>

## What's Changed
* Preserve interpolation alignment in MA0052 code fix by @​meziantou in
meziantou/Meziantou.Analyzer#1454
* Do not report MA0160 when ContainsKey is explicitly implemented by
@​meziantou in meziantou/Meziantou.Analyzer#1453


**Full Changelog**:
meziantou/Meziantou.Analyzer@3.0.237...3.0.238

## 3.0.237

NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/3.0.237>

## What's Changed
* Fix MA0127 code fix producing uncompilable code for object and span
operands by @​meziantou in
meziantou/Meziantou.Analyzer#1459
* MA0113: Only report DateTime constructors with the Utc kind by
@​meziantou in meziantou/Meziantou.Analyzer#1458
* Preserve attribute inheritance behavior in the MA0179 code fix by
@​meziantou in meziantou/Meziantou.Analyzer#1457
* MA0239: Do not report GetType() on a property by @​meziantou in
meziantou/Meziantou.Analyzer#1456
* MA0052: Suggest the first declared member when the enum value has
aliases by @​meziantou in
meziantou/Meziantou.Analyzer#1455
* Fix MA0089 treating an integer start index or count as
StringComparison.Ordinal by @​meziantou in
meziantou/Meziantou.Analyzer#1452
* chore(deps): update all dependencies by @​renovate[bot] in
meziantou/Meziantou.Analyzer#1445


**Full Changelog**:
meziantou/Meziantou.Analyzer@3.0.236...3.0.237

## 3.0.236

NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/3.0.236>

## What's Changed
* Exclude CsWinRT-required partial types from MA0204 by @​meziantou with
@​Copilot in meziantou/Meziantou.Analyzer#1451


**Full Changelog**:
meziantou/Meziantou.Analyzer@3.0.235...3.0.236

## 3.0.235

NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/3.0.235>

## What's Changed
* Add MA0239: Use 'typeof' instead of 'GetType()' when the type is
sealed by @​meziantou in
meziantou/Meziantou.Analyzer#1449


**Full Changelog**:
meziantou/Meziantou.Analyzer@3.0.234...3.0.235

## 3.0.234

NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/3.0.234>

## What's Changed
* Add MA0228-MA0238: EventSource implementation rules by @​meziantou in
meziantou/Meziantou.Analyzer#1448


**Full Changelog**:
meziantou/Meziantou.Analyzer@3.0.233...3.0.234

## 3.0.233

NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/3.0.233>

## What's Changed
* Add MA0227: Avoid using 'Enumerable.Contains' on a set by @​meziantou
in meziantou/Meziantou.Analyzer#1447


**Full Changelog**:
meziantou/Meziantou.Analyzer@3.0.232...3.0.233

## 3.0.232

NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/3.0.232>

## What's Changed
* Add MA0226: EventSource class should be sealed by @​meziantou in
meziantou/Meziantou.Analyzer#1446


**Full Changelog**:
meziantou/Meziantou.Analyzer@3.0.231...3.0.232

## 3.0.231

NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/3.0.231>

## What's Changed
* Report MA0072 and MA0086 on throw expressions by @​meziantou in
meziantou/Meziantou.Analyzer#1444


**Full Changelog**:
meziantou/Meziantou.Analyzer@3.0.230...3.0.231

## 3.0.230

NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/3.0.230>

## What's Changed
* chore(deps): update all dependencies to 1.0.166 by @​renovate[bot] in
meziantou/Meziantou.Analyzer#1427
* Do not report MA0072 and MA0086 on the nested lambdas and local
functions by @​meziantou in
meziantou/Meziantou.Analyzer#1438
* Evaluate every component of the TimeSpan factory methods and
constructors by @​meziantou in
meziantou/Meziantou.Analyzer#1440
* Bound the regex cache, so it does not retain every configuration value
by @​meziantou in
meziantou/Meziantou.Analyzer#1441
* Do not report MA0192 when the HasFlag rewrite reorders an effectful
operand by @​meziantou in
meziantou/Meziantou.Analyzer#1442
* Bound the pooled queues by the number of items they contained by
@​meziantou in meziantou/Meziantou.Analyzer#1443


**Full Changelog**:
meziantou/Meziantou.Analyzer@3.0.229...3.0.230

## 3.0.229

NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/3.0.229>

## What's Changed
* Match the MA0110 regex arguments by parameter instead of position by
@​meziantou in meziantou/Meziantou.Analyzer#1439


**Full Changelog**:
meziantou/Meziantou.Analyzer@3.0.228...3.0.229

## 3.0.228

NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/3.0.228>

## What's Changed
* Detect the ProcessStartInfo properties set outside of the initializer
by @​meziantou in
meziantou/Meziantou.Analyzer#1437


**Full Changelog**:
meziantou/Meziantou.Analyzer@3.0.227...3.0.228

## 3.0.227

NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/3.0.227>

## What's Changed
* Cover the untested analyzer and fixer paths and remove the dead ones
by @​meziantou in
meziantou/Meziantou.Analyzer#1436


**Full Changelog**:
meziantou/Meziantou.Analyzer@3.0.226...3.0.227

## 3.0.226

NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/3.0.226>

## What's Changed
* Do not report MA0046 on events of type EventHandler<TSender,
TEventArgs> by @​meziantou in
meziantou/Meziantou.Analyzer#1435


**Full Changelog**:
meziantou/Meziantou.Analyzer@3.0.225...3.0.226

## 3.0.225

NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/3.0.225>

## What's Changed
* Add MA0224 and MA0225 to require the Respect* options on
JsonSerializerOptions by @​meziantou in
meziantou/Meziantou.Analyzer#1433


**Full Changelog**:
meziantou/Meziantou.Analyzer@3.0.224...3.0.225

## 3.0.224

NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/3.0.224>

## What's Changed
* Add MA0222 and MA0223 to require the System.Text.Json Respect* options
to be configured by @​meziantou in
meziantou/Meziantou.Analyzer#1432


**Full Changelog**:
meziantou/Meziantou.Analyzer@3.0.223...3.0.224

## 3.0.223

NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/3.0.223>

## What's Changed
* Remove the GetAllMembers extension methods superseded by
Meziantou.Framework.Roslyn by @​meziantou in
meziantou/Meziantou.Analyzer#1428


**Full Changelog**:
meziantou/Meziantou.Analyzer@3.0.222...3.0.223

## 3.0.222

NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/3.0.222>

## What's Changed
* Do not report MA0004, MA0068, MA0070, MA0160 and MA0176 in generated
code by @​meziantou in
meziantou/Meziantou.Analyzer#1430


**Full Changelog**:
meziantou/Meziantou.Analyzer@3.0.221...3.0.222

## 3.0.221

NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/3.0.221>

## What's Changed
* Do not report MA0028 on StringBuilder.Insert with a Substring argument
by @​meziantou in
meziantou/Meziantou.Analyzer#1429


**Full Changelog**:
meziantou/Meziantou.Analyzer@3.0.220...3.0.221

## 3.0.220

NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/3.0.220>

## What's Changed
* Reduce the allocations of OverloadFinder by @​meziantou in
meziantou/Meziantou.Analyzer#1426


**Full Changelog**:
meziantou/Meziantou.Analyzer@3.0.219...3.0.220

## 3.0.219

NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/3.0.219>

## What's Changed
* Make the analysis of generated code opt-in by @​meziantou in
meziantou/Meziantou.Analyzer#1425


**Full Changelog**:
meziantou/Meziantou.Analyzer@3.0.218...3.0.219

## 3.0.218

NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/3.0.218>

## What's Changed
* Gate the analysis of generated code behind
MEZIANTOU_ANALYZER_GENERATED_CODE by @​meziantou in
meziantou/Meziantou.Analyzer#1423


**Full Changelog**:
meziantou/Meziantou.Analyzer@3.0.217...3.0.218

## 3.0.217

NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/3.0.217>

## What's Changed
* Close the gaps in the documentation generator's configuration key
extractor by @​meziantou in
meziantou/Meziantou.Analyzer#1421


**Full Changelog**:
meziantou/Meziantou.Analyzer@3.0.216...3.0.217

## 3.0.216

NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/3.0.216>

## What's Changed
* Add tests for the .editorconfig options that were never set by a test
by @​meziantou in
meziantou/Meziantou.Analyzer#1419
* Report MA0130 on System.Type instances by @​meziantou in
meziantou/Meziantou.Analyzer#1422


**Full Changelog**:
meziantou/Meziantou.Analyzer@3.0.215...3.0.216

## 3.0.215

NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/3.0.215>

## What's Changed
* chore(deps): update dependency meziantou.framework.roslyn to 1.0.13 by
@​renovate[bot] in
meziantou/Meziantou.Analyzer#1420


**Full Changelog**:
meziantou/Meziantou.Analyzer@3.0.214...3.0.215

## 3.0.214

NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/3.0.214>

## What's Changed
* Resolve the NuGet packages of the tests from the global packages
folder by @​meziantou in
meziantou/Meziantou.Analyzer#1415
* Return the pooled StringBuilder on every path by @​meziantou in
meziantou/Meziantou.Analyzer#1416
* Split the TryGetValue part of MA0186 into a new rule MA0221 by
@​meziantou in meziantou/Meziantou.Analyzer#1417
* Report MA0153 when the type of a logged property or field is
classified by @​meziantou in
meziantou/Meziantou.Analyzer#1418


**Full Changelog**:
meziantou/Meziantou.Analyzer@3.0.213...3.0.214

## 3.0.213

NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/3.0.213>

## What's Changed
* Create the configured regexes from the options by @​meziantou in
meziantou/Meziantou.Analyzer#1414


**Full Changelog**:
meziantou/Meziantou.Analyzer@3.0.212...3.0.213

## 3.0.212

NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/3.0.212>

## What's Changed
* chore(deps): update all dependencies by @​renovate[bot] in
meziantou/Meziantou.Analyzer#1317


**Full Changelog**:
meziantou/Meziantou.Analyzer@3.0.211...3.0.212

## 3.0.211

NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/3.0.211>

## What's Changed
* Fix MA0065/MA0066 never checking for a GetHashCode override by
@​meziantou in meziantou/Meziantou.Analyzer#1391
* Report MA0124/MA0125/MA0126 on [LoggerMessage(Message = "...")] by
@​meziantou in meziantou/Meziantou.Analyzer#1392
* Report MA0179 on the array-returning GetCustomAttributes overloads by
@​meziantou in meziantou/Meziantou.Analyzer#1393
* Give MA0107 its own exclude_tostring_methods configuration key by
@​meziantou in meziantou/Meziantou.Analyzer#1394
* Report MA0060 on ignored return values behind a conditional access by
@​meziantou in meziantou/Meziantou.Analyzer#1395
* Cache the culture sensitivity of the types by @​meziantou in
meziantou/Meziantou.Analyzer#1396
* Discover the regex-valued options validated by MA0220 by @​meziantou
in meziantou/Meziantou.Analyzer#1397
* Apply the syntactic filter of MA0003 before binding the arguments by
@​meziantou in meziantou/Meziantou.Analyzer#1398
* Load the MA0104 BCL type tables lazily by @​meziantou in
meziantou/Meziantou.Analyzer#1399
* Remove the dnceng dotnet-tools NuGet source by @​meziantou in
meziantou/Meziantou.Analyzer#1400
* Share the diagnostic property keys between the analyzers and the
fixers by @​meziantou in
meziantou/Meziantou.Analyzer#1401
* Avoid the control flow analysis of MA0004 when the context is
irrelevant by @​meziantou in
meziantou/Meziantou.Analyzer#1402
* Remove dead VSIX release scripts by @​meziantou in
meziantou/Meziantou.Analyzer#1404
* Rename tests that assert no diagnostic but are named *_ShouldReport*
by @​meziantou in
meziantou/Meziantou.Analyzer#1405
* Remove the two NuGet audit suppressions by @​meziantou in
meziantou/Meziantou.Analyzer#1406
* Match the annotation attributes by name in MA0060, MA0124 and MA0139
by @​meziantou in
meziantou/Meziantou.Analyzer#1407
* Fix MA0183 false positive and missed diagnostic when named arguments
are reordered by @​meziantou in
meziantou/Meziantou.Analyzer#1408
* Do not report MA0106 on a lambda already reported by MA0105 by
@​meziantou in meziantou/Meziantou.Analyzer#1410
* Add tests for MA0080 by @​meziantou in
meziantou/Meziantou.Analyzer#1411
* Avoid walking the whole operation tree in IsInExpressionContext by
@​meziantou in meziantou/Meziantou.Analyzer#1409
* Fix two broken documentation links by @​meziantou in
meziantou/Meziantou.Analyzer#1413
* Remove the dead Roslyn 4.4 workaround from MA0099 by @​meziantou in
meziantou/Meziantou.Analyzer#1412
* Clear the pooled queue of UseLangwordInXmlCommentAnalyzer on return by
@​meziantou in meziantou/Meziantou.Analyzer#1403


**Full Changelog**:
meziantou/Meziantou.Analyzer@3.0.210...3.0.211

## 3.0.210

NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/3.0.210>

## What's Changed
* Fix MA0113 NullReferenceException and named-argument false negatives
by @​meziantou in
meziantou/Meziantou.Analyzer#1382
* Fix MA0078 false positive when the cast targets a captured parameter
by @​meziantou in
meziantou/Meziantou.Analyzer#1383
* Do not report MA0063 on the indexed Where overload by @​meziantou in
meziantou/Meziantou.Analyzer#1384
* Parenthesize the expressions produced by the MA0112 and MA0128 fixers
by @​meziantou in
meziantou/Meziantou.Analyzer#1385
* Do not report MA0179 on user-defined GetCustomAttribute(s) methods by
@​meziantou in meziantou/Meziantou.Analyzer#1386
* Fix MA0151 false positive on System.Object members of interface-typed
members by @​meziantou in
meziantou/Meziantou.Analyzer#1387


**Full Changelog**:
meziantou/Meziantou.Analyzer@3.0.209...3.0.210

## 3.0.209

NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/3.0.209>

## What's Changed
* chore(deps): update dependency meziantou.framework.roslyn to 1.0.12 by
@​renovate[bot] in
meziantou/Meziantou.Analyzer#1390
* Create the GitHub release from the commit that was built by
@​meziantou in meziantou/Meziantou.Analyzer#1389


**Full Changelog**:
meziantou/Meziantou.Analyzer@3.0.208...3.0.209

## 3.0.208

NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/3.0.208>

## What's Changed
* Do not offer the MA0028 Substring fix when it would duplicate side
effects by @​meziantou in
meziantou/Meziantou.Analyzer#1381


**Full Changelog**:
meziantou/Meziantou.Analyzer@3.0.207...3.0.208

## 3.0.207

NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/3.0.207>

## What's Changed
* Remove Feedz publishing from CI by @​meziantou in
meziantou/Meziantou.Analyzer#1380


**Full Changelog**:
meziantou/Meziantou.Analyzer@3.0.206...3.0.207

## 3.0.206

NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/3.0.206>

## What's Changed
* Add MA0048 options to skip parts of the file name by @​meziantou in
meziantou/Meziantou.Analyzer#1379
* Configure the reporting in generated code per rule by @​meziantou in
meziantou/Meziantou.Analyzer#1376


**Full Changelog**:
meziantou/Meziantou.Analyzer@3.0.205...3.0.206

## 3.0.205

NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/3.0.205>

## What's Changed
* chore(deps): update dependency meziantou.framework.roslyn to 1.0.11 by
@​renovate[bot] in
meziantou/Meziantou.Analyzer#1378


**Full Changelog**:
meziantou/Meziantou.Analyzer@3.0.204...3.0.205

## 3.0.204

NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/3.0.204>

## What's Changed
* chore(deps): update dependency meziantou.framework.roslyn to 1.0.10 by
@​renovate[bot] in
meziantou/Meziantou.Analyzer#1377


**Full Changelog**:
meziantou/Meziantou.Analyzer@3.0.203...3.0.204

## 3.0.203

NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/3.0.203>

## What's Changed
* Use Parenthesize from Meziantou.Framework.Roslyn 1.0.8 by @​meziantou
in meziantou/Meziantou.Analyzer#1374


**Full Changelog**:
meziantou/Meziantou.Analyzer@3.0.202...3.0.203

## 3.0.202

NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/3.0.202>

## What's Changed
* chore(deps): update dependency meziantou.framework.roslyn to 1.0.7 by
@​renovate[bot] in
meziantou/Meziantou.Analyzer#1373
* chore(deps): update dependency meziantou.framework.roslyn to 1.0.8 by
@​renovate[bot] in
meziantou/Meziantou.Analyzer#1375


**Full Changelog**:
meziantou/Meziantou.Analyzer@3.0.201...3.0.202

## 3.0.201

NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/3.0.201>

## What's Changed
* Remove DisabledDiagnostics from the tests by @​meziantou in
meziantou/Meziantou.Analyzer#1370
* Do not report MA0214 on functions returning only completed tasks by
@​meziantou in meziantou/Meziantou.Analyzer#1372


**Full Changelog**:
meziantou/Meziantou.Analyzer@3.0.200...3.0.201

Commits viewable in [compare
view](meziantou/Meziantou.Analyzer@3.0.200...3.0.257).
</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This was referenced Sep 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant