From 66257babd9e7df830662353540c1b3894ccc2006 Mon Sep 17 00:00:00 2001 From: smaillet Date: Fri, 18 Jul 2025 08:53:18 -0700 Subject: [PATCH] Unified editor config with consumer to provide more common support. * Includes updates to StyleCop.json - This enables doc check for interfaces - Sadly this applies to any interface even internal ones. If any member of the interface has XML docs it will trigger an issue that the whole thing doesn't have docs. --- .editorconfig | 5 ++++- src/Ubiquity.NET.Llvm/IGlobalHandleOwner.cs | 2 ++ stylecop.json | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.editorconfig b/.editorconfig index ab1d4cff34..7601683c98 100644 --- a/.editorconfig +++ b/.editorconfig @@ -161,7 +161,7 @@ dotnet_style_prefer_auto_properties = true:error dotnet_style_object_initializer = true:suggestion dotnet_style_collection_initializer = true:warning dotnet_style_prefer_simplified_boolean_expressions = true:error -dotnet_style_prefer_conditional_expression_over_assignment = true:warning +dotnet_style_prefer_conditional_expression_over_assignment = true:suggestion dotnet_style_prefer_conditional_expression_over_return = true:warning dotnet_style_explicit_tuple_names = true:warning dotnet_style_operator_placement_when_wrapping = beginning_of_line @@ -1608,3 +1608,6 @@ dotnet_diagnostic.SA1652.severity = warning dotnet_diagnostic.SX1101.severity = error + +# IDE0045: Convert to conditional expression +dotnet_diagnostic.IDE0045.severity = suggestion diff --git a/src/Ubiquity.NET.Llvm/IGlobalHandleOwner.cs b/src/Ubiquity.NET.Llvm/IGlobalHandleOwner.cs index a004256f45..50752ee35c 100644 --- a/src/Ubiquity.NET.Llvm/IGlobalHandleOwner.cs +++ b/src/Ubiquity.NET.Llvm/IGlobalHandleOwner.cs @@ -7,6 +7,7 @@ namespace Ubiquity.NET.Llvm { [SuppressMessage( "StyleCop.CSharp.DocumentationRules", "SA1649:File name should match first type name", Justification = "Closely related interfaces" )] + [SuppressMessage( "StyleCop.CSharp.DocumentationRules", "SA1600:Elements should be documented", Justification = "Internal Interface" )] internal interface IHandleWrapper { /// Gets the handle for this wrapper @@ -19,6 +20,7 @@ internal interface IHandleWrapper internal THandle Handle { get; } } + [SuppressMessage( "StyleCop.CSharp.DocumentationRules", "SA1600:Elements should be documented", Justification = "Internal Interface" )] internal interface IGlobalHandleOwner : IDisposable where THandle : GlobalHandleBase diff --git a/stylecop.json b/stylecop.json index 0a687fa02c..29ab5aa70d 100644 --- a/stylecop.json +++ b/stylecop.json @@ -35,7 +35,7 @@ "companyName": "Ubiquity.NET Contributors", "headerDecoration": "-----------------------------------------------------------------------", "documentExposedElements": true, - "documentInterfaces": false, + "documentInterfaces": true, "documentInternalElements": false, "documentPrivateElements": false, "documentPrivateFields": false,