From 7263df610e2f9405fd8f49f5973f0e4182b0ad5f Mon Sep 17 00:00:00 2001 From: Marek Safar Date: Fri, 24 Apr 2020 01:01:35 +0200 Subject: Ensure consistent sources formatting (#1138) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Apply consistent formatting based on .editorconfig ``` dotnet format -f ``` * Add lint step to the CI * Use local tool * Suppress publish logs warning * Fix more style errors * Fixes bad merge * Write something to log dir * Move lint job to global scope So it doesn't get the arcade publish logs/test steps injected. * Split sources and tests reporting * Include also src folder in the run * Exclude cecil sources * Remove duplicate line * Trigger notification * Format more code Co-authored-by: Alexander Köplinger --- .../References/AssemblyOnlyUsedByUsingWithCsc.cs | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'test/Mono.Linker.Tests.Cases/References/AssemblyOnlyUsedByUsingWithCsc.cs') diff --git a/test/Mono.Linker.Tests.Cases/References/AssemblyOnlyUsedByUsingWithCsc.cs b/test/Mono.Linker.Tests.Cases/References/AssemblyOnlyUsedByUsingWithCsc.cs index 32ef0a3c6..bb7141228 100644 --- a/test/Mono.Linker.Tests.Cases/References/AssemblyOnlyUsedByUsingWithCsc.cs +++ b/test/Mono.Linker.Tests.Cases/References/AssemblyOnlyUsedByUsingWithCsc.cs @@ -2,29 +2,31 @@ using Mono.Linker.Tests.Cases.Expectations.Assertions; using Mono.Linker.Tests.Cases.Expectations.Metadata; using Mono.Linker.Tests.Cases.References.Dependencies; -namespace Mono.Linker.Tests.Cases.References { +namespace Mono.Linker.Tests.Cases.References +{ /// /// We can't detect the using usage in the assembly. As a result, nothing in `library` is going to be marked and that assembly will be deleted. /// Because of that, `copied` needs to have it's reference to `library` removed even though we specified an assembly action of `copy` /// [SetupLinkerAction ("copy", "copied")] [SetupLinkerArgument ("--keep-facades", "false")] - [SetupCompileBefore ("library.dll", new [] {"Dependencies/AssemblyOnlyUsedByUsing_Lib.cs"})] - + [SetupCompileBefore ("library.dll", new[] { "Dependencies/AssemblyOnlyUsedByUsing_Lib.cs" })] + // When csc is used, `copied.dll` will have a reference to `library.dll` - [SetupCompileBefore ("copied.dll", new [] {"Dependencies/AssemblyOnlyUsedByUsing_Copied.cs"}, new [] {"library.dll"}, compilerToUse: "csc")] + [SetupCompileBefore ("copied.dll", new[] { "Dependencies/AssemblyOnlyUsedByUsing_Copied.cs" }, new[] { "library.dll" }, compilerToUse: "csc")] // Here to assert that the test is setup correctly to copy the copied assembly. This is an important aspect of the bug [KeptMemberInAssembly ("copied.dll", typeof (AssemblyOnlyUsedByUsing_Copied), "Unused()")] - + // We library should be gone. The `using` statement leaves no traces in the IL so nothing in `library` will be marked [RemovedAssembly ("library.dll")] #if NETCOREAPP [KeptReferencesInAssembly ("copied.dll", new [] {"System.Private.CoreLib"})] #else - [KeptReferencesInAssembly ("copied.dll", new [] {"mscorlib"})] + [KeptReferencesInAssembly ("copied.dll", new[] { "mscorlib" })] #endif - public class AssemblyOnlyUsedByUsingWithCsc { + public class AssemblyOnlyUsedByUsingWithCsc + { public static void Main () { // Use something to keep the reference at compile time -- cgit v1.2.3