From d9d4c9b3fa017492dda3369b5ae774e8e73723d8 Mon Sep 17 00:00:00 2001 From: Caelan Sayler Date: Fri, 2 Feb 2024 12:10:53 +0000 Subject: [PATCH] enforce file-scoped namespaces --- .editorconfig | 6 +++++- examples/AvaloniaCrossPlat/AvaloniaCrossPlat.csproj | 1 + examples/VeloWpfSample/VeloWpfSample.csproj | 1 + test/Divergic.Logging.Xunit/Divergic.Logging.Xunit.csproj | 1 + 4 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.editorconfig b/.editorconfig index ce0e8678..b8df92b9 100644 --- a/.editorconfig +++ b/.editorconfig @@ -202,5 +202,9 @@ cpp_wrap_preserve_blocks = one_liners indent_size = 2 [*.cs] +# for mapperly dotnet_diagnostic.RMG012.severity = error # Unmapped target member -dotnet_diagnostic.RMG020.severity = error # Unmapped source member \ No newline at end of file +dotnet_diagnostic.RMG020.severity = error # Unmapped source member + +# file scoped namespaces +csharp_style_namespace_declarations = file_scoped:warning \ No newline at end of file diff --git a/examples/AvaloniaCrossPlat/AvaloniaCrossPlat.csproj b/examples/AvaloniaCrossPlat/AvaloniaCrossPlat.csproj index 26ef7b97..8fac37fc 100644 --- a/examples/AvaloniaCrossPlat/AvaloniaCrossPlat.csproj +++ b/examples/AvaloniaCrossPlat/AvaloniaCrossPlat.csproj @@ -6,6 +6,7 @@ true app.manifest true + $(NoWarn);IDE0161 diff --git a/examples/VeloWpfSample/VeloWpfSample.csproj b/examples/VeloWpfSample/VeloWpfSample.csproj index 2dbac68f..aae60bfd 100644 --- a/examples/VeloWpfSample/VeloWpfSample.csproj +++ b/examples/VeloWpfSample/VeloWpfSample.csproj @@ -7,6 +7,7 @@ true true latest + $(NoWarn);IDE0161 diff --git a/test/Divergic.Logging.Xunit/Divergic.Logging.Xunit.csproj b/test/Divergic.Logging.Xunit/Divergic.Logging.Xunit.csproj index 86ee3a35..a02c6c46 100644 --- a/test/Divergic.Logging.Xunit/Divergic.Logging.Xunit.csproj +++ b/test/Divergic.Logging.Xunit/Divergic.Logging.Xunit.csproj @@ -6,6 +6,7 @@ enable True ..\..\Velopack.snk + $(NoWarn);IDE0161