Skip to content

Commit

Permalink
rollback
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel-iel committed May 18, 2024
1 parent 6bfb58f commit eaec127
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 23 deletions.
25 changes: 12 additions & 13 deletions src/ByReplace.Test/Analyzers/AnalyzerRunnerTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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));
});
}

Expand Down
6 changes: 1 addition & 5 deletions src/ByReplace/Analyzers/AnalyzerRunner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@ internal AnalyzerAndFixer RunAnalysis(ImmutableList<DirectoryNode> 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;
}
}
9 changes: 4 additions & 5 deletions src/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
#
# FROM mcr.microsoft.com/dotnet/runtime:8.0 AS runtime
# WORKDIR /app
# COPY --from=build /app .
# ENTRYPOINT ["dotnet", "ByReplace.dll"]

0 comments on commit eaec127

Please sign in to comment.