From eaec127f14b17ff0f7982b31b0fe46c3c78284bd Mon Sep 17 00:00:00 2001 From: Daniel-iel Date: Sat, 18 May 2024 14:50:34 -0300 Subject: [PATCH] rollback --- .../Analyzers/AnalyzerRunnerTest.cs | 25 +++++++++---------- src/ByReplace/Analyzers/AnalyzerRunner.cs | 6 +---- src/Dockerfile | 9 +++---- 3 files changed, 17 insertions(+), 23 deletions(-) diff --git a/src/ByReplace.Test/Analyzers/AnalyzerRunnerTest.cs b/src/ByReplace.Test/Analyzers/AnalyzerRunnerTest.cs index 010cf46..55c70f3 100644 --- a/src/ByReplace.Test/Analyzers/AnalyzerRunnerTest.cs +++ b/src/ByReplace.Test/Analyzers/AnalyzerRunnerTest.cs @@ -84,19 +84,6 @@ public void RunAnalysis_MapAllRulesThatMatchToFileInSourceTree_ShouldReturnRules Assert.Equal(4, analyzersAndFixers.Count); Assert.Collection(analyzersAndFixers, - entry => - { - Assert.Equal("bin2.txt", entry.Key.Name); - Assert.Equal(".txt", entry.Key.Extension); - Assert.Collection(entry.Value, rule => Assert.Equal("RuleTest", rule.Name)); - }, - entry => - { - Assert.Equal("obj1.txt", entry.Key.Name); - Assert.Equal(".txt", entry.Key.Extension); - Assert.Collection(entry.Value, rule => Assert.Equal("RuleTest", rule.Name)); - }, - entry => { Assert.Equal("RootFile1.cs", entry.Key.Name); @@ -108,6 +95,18 @@ public void RunAnalysis_MapAllRulesThatMatchToFileInSourceTree_ShouldReturnRules Assert.Equal("RootFile2.cs", entry.Key.Name); Assert.Equal(".cs", entry.Key.Extension); Assert.Collection(entry.Value, rule => Assert.Equal("RuleTest", rule.Name)); + }, + entry => + { + Assert.Equal("bin2.txt", entry.Key.Name); + Assert.Equal(".txt", entry.Key.Extension); + Assert.Collection(entry.Value, rule => Assert.Equal("RuleTest", rule.Name)); + }, + entry => + { + Assert.Equal("obj1.txt", entry.Key.Name); + Assert.Equal(".txt", entry.Key.Extension); + Assert.Collection(entry.Value, rule => Assert.Equal("RuleTest", rule.Name)); }); } diff --git a/src/ByReplace/Analyzers/AnalyzerRunner.cs b/src/ByReplace/Analyzers/AnalyzerRunner.cs index 55433b5..1fda79b 100644 --- a/src/ByReplace/Analyzers/AnalyzerRunner.cs +++ b/src/ByReplace/Analyzers/AnalyzerRunner.cs @@ -24,10 +24,6 @@ internal AnalyzerAndFixer RunAnalysis(ImmutableList directoryThre analyzersAndFixers.TryMatchRule(dir, brConfiguration.Rules); } - return new AnalyzerAndFixer( - analyzersAndFixers - .OrderBy(x => x.Key.FullName) - .ToDictionary(x => x.Key, x => x.Value), print); - + return analyzersAndFixers; } } diff --git a/src/Dockerfile b/src/Dockerfile index dcf792e..d7d827f 100644 --- a/src/Dockerfile +++ b/src/Dockerfile @@ -6,8 +6,7 @@ RUN dotnet build ByReplace.sln -c Release -o /app RUN dotnet test ByReplace.sln # Build runtime image -#FROM mcr.microsoft.com/dotnet/runtime:8.0 AS runtime -#WORKDIR /app -#COPY --from=build /app . -#ENTRYPOINT ["dotnet", "ByReplace.dll"] -# \ No newline at end of file +# FROM mcr.microsoft.com/dotnet/runtime:8.0 AS runtime +# WORKDIR /app +# COPY --from=build /app . +# ENTRYPOINT ["dotnet", "ByReplace.dll"]