From fe7ecceb646cd30e94f108870c63ba4fe538bb5f Mon Sep 17 00:00:00 2001 From: YoshiRulz Date: Wed, 29 Jan 2025 22:29:59 +1000 Subject: [PATCH] Enable RCS1043 and fix noncompliance "Remove 'partial' modifier from type with a single part" --- .global.editorconfig.ini | 2 ++ src/BizHawk.Common/Extensions/SpanSplit.cs | 2 +- .../Computers/AmstradCPC/Hardware/CRTC.cs | 2 +- .../SinclairSpectrum/Machine/ZXSpectrum128KPlus2/ZX128Plus2.cs | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.global.editorconfig.ini b/.global.editorconfig.ini index e96a05554f..41faa9de5e 100644 --- a/.global.editorconfig.ini +++ b/.global.editorconfig.ini @@ -397,6 +397,8 @@ dotnet_diagnostic.MEN018.severity = warning ## Roslynator.Analyzers rules +# Remove 'partial' modifier from type with a single part +dotnet_diagnostic.RCS1043.severity = warning # Avoid locking on publicly accessible instance dotnet_diagnostic.RCS1059.severity = silent # Avoid empty catch clause that catches System.Exception diff --git a/src/BizHawk.Common/Extensions/SpanSplit.cs b/src/BizHawk.Common/Extensions/SpanSplit.cs index 729f61f5d5..9fc43a4a76 100644 --- a/src/BizHawk.Common/Extensions/SpanSplit.cs +++ b/src/BizHawk.Common/Extensions/SpanSplit.cs @@ -759,7 +759,7 @@ namespace BizHawk.Common } } - private ref partial struct ValueListBuilder + private ref struct ValueListBuilder { private Span _span; private T[]? _arrayFromPool; diff --git a/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/CRTC.cs b/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/CRTC.cs index 9a84b633bc..283ff4b7f9 100644 --- a/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/CRTC.cs +++ b/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/CRTC.cs @@ -37,7 +37,7 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC /// Datasheet: {none} /// /// - public abstract partial class CRTC : IPortIODevice + public abstract class CRTC : IPortIODevice { /// /// Instantiation helper diff --git a/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Machine/ZXSpectrum128KPlus2/ZX128Plus2.cs b/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Machine/ZXSpectrum128KPlus2/ZX128Plus2.cs index 6125399f3f..5af04015e0 100644 --- a/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Machine/ZXSpectrum128KPlus2/ZX128Plus2.cs +++ b/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Machine/ZXSpectrum128KPlus2/ZX128Plus2.cs @@ -7,7 +7,7 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum /// The +2 is almost identical to the 128k from an emulation point of view /// There are just a few small changes in the ROMs /// - public partial class ZX128Plus2 : ZX128 + public sealed class ZX128Plus2 : ZX128 { /// /// Main constructor