Skip to content

Commit

Permalink
Improving memory usage (#2301)
Browse files Browse the repository at this point in the history
  • Loading branch information
eddynaka authored Feb 28, 2021
1 parent 8a66700 commit 7262308
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Sarif/Writers/CachingLogger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ public void Log(ReportingDescriptor rule, Result result)
throw new ArgumentNullException(nameof(result));
}

if (!ShouldLog(result))
{
return;
}

if (rule.GetType().Name != nameof(ReportingDescriptor))
{
rule = rule.DeepClone();
Expand Down

0 comments on commit 7262308

Please sign in to comment.