mirror of
https://github.com/icsharpcode/ILSpy.git
synced 2026-10-12 02:15:58 +00:00
Every version-gated setting was bookkept in four places that had to stay in sync by hand: the property boilerplate, SetLanguageVersion, GetMinimumRequiredVersion, and the [Category] display string - and that sync had already drifted in a handful of settings. A new source generator in ICSharpCode.Decompiler.Generators now derives all four from a single [DecompilerSetting] attribute on a partial property: backing field, accessors with change notification, the version-derived [Category], and both version methods. [Description] stays handwritten because its resource keys are irregular and are grepped from the resx. This commit is a 1:1 translation: the current inconsistencies are reproduced exactly (AffectsMinimumRequiredVersion = false on ExtensionMethods, UseLambdaSyntax and UseEnhancedUsing; no gate on SwitchOnReadOnlySpanChar), verified against the old build by comparing SetLanguageVersion and GetMinimumRequiredVersion behavior for every setting at every language version, plus a reflection diff of the full per-property attribute surface. Assisted-by: Claude:claude-fable-5:Claude Code
745 B
745 B
; Unshipped analyzer release ; https://github.com/dotnet/roslyn-analyzers/blob/main/src/Microsoft.CodeAnalysis.Analyzers/ReleaseTrackingAnalyzers.Help.md
New Rules
| Rule ID | Category | Severity | Notes |
|---|---|---|---|
| DSTG001 | DecompilerSyntaxTreeGenerator | Error | Slot kind must map to a single child type |
| DSTG002 | DecompilerSettingsGenerator | Error | [DecompilerSetting] target must be a partial instance bool property |
| DSTG003 | DecompilerSettingsGenerator | Error | Version-gated setting must not declare [Category] |
| DSTG004 | DecompilerSettingsGenerator | Error | Language version has no display category |
| DSTG005 | DecompilerSettingsGenerator | Error | Setting must be declared in a non-nested partial class |