Skip to content

Commit

Permalink
fixing spacing + optimizing nugets
Browse files Browse the repository at this point in the history
  • Loading branch information
eddynaka committed Oct 26, 2020
1 parent 8b88a71 commit ec4e414
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 13 deletions.
16 changes: 8 additions & 8 deletions src/Sarif.Multitool.Library/MergeCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public int Run(MergeOptions mergeOptions)

var logLoadOptions = new BoundedChannelOptions(1000)
{
SingleWriter = true,
SingleWriter = true,
SingleReader = false,
};
_logLoadChannel = Channel.CreateBounded<string>(logLoadOptions);
Expand Down Expand Up @@ -170,10 +170,10 @@ private async Task<bool> MergeSarifLogsAsync()
if (!_ruleIdToRunsMap.TryGetValue(key, out Run splitRun))
{
IEqualityComparer<Run> comparer = Microsoft.CodeAnalysis.Sarif.Run.ValueComparer;
splitRun = _ruleIdToRunsMap[key] = new Run()
{
splitRun = _ruleIdToRunsMap[key] = new Run()
{
Tool = emptyRun.Tool,
Results = new List<Result>()
Results = new List<Result>()
};
splitLog.Runs.Add(splitRun);
}
Expand Down Expand Up @@ -230,7 +230,7 @@ private void ProcessInputSarifLog(string filePath)
{
new FixupVisitor().VisitSarifLog(sarifLog);
}

_mergeLogsChannel.Writer.WriteAsync(sarifLog);
Interlocked.Decrement(ref _filesToProcessCount);

Expand All @@ -257,7 +257,7 @@ private async Task<bool> FindFilesAsync()
{
directory = @".\";
}

foreach (string file in Directory.EnumerateFiles(directory, filter, searchOption))
{
Interlocked.Increment(ref _filesToProcessCount);
Expand Down Expand Up @@ -293,7 +293,7 @@ public override Run VisitRun(Run node)
{
_run = node;
_run = base.VisitRun(node);

_run.Invocations = null;
_run.Artifacts = null;
_run.Tool.Driver = new ToolComponent
Expand All @@ -309,7 +309,7 @@ public override Run VisitRun(Run node)

public override Result VisitResult(Result node)
{
node.RuleIndex = -1;
node.RuleIndex = -1;
return base.VisitResult(node);
}

Expand Down
4 changes: 0 additions & 4 deletions src/Sarif.Multitool/Sarif.Multitool.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,6 @@

<ItemGroup>
<PackageReference Include="CommandLineParser" Version="2.7.82" />
<PackageReference Include="Microsoft.Json.Pointer" Version="1.1.2" />
<PackageReference Include="Microsoft.Json.Schema" Version="1.1.2" />
<PackageReference Include="Microsoft.Json.Schema.Validation" Version="1.1.2" />
<PackageReference Include="System.IO.FileSystem" Version="4.3.0" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public MergeCommandTests(ITestOutputHelper outputHelper) : base(outputHelper) {
[Trait(TestTraits.Bug, "https://github.com/microsoft/sarif-sdk/issues/1592")]
public void MergeCommand_WhenThereAreNoInputFiles_ProducesEmptyRunsArray()
{
// RunTest("NoInputFiles.sarif");
RunTest("NoInputFiles.sarif");
}

protected override string ConstructTestOutputFromInputResource(string inputResourceName, object parameter)
Expand Down

0 comments on commit ec4e414

Please sign in to comment.