microsoft / sarif-pattern-matcher

Quality domain agnostic regular expression pattern matcher that persists results to SARIF
MIT License
39 stars 18 forks source link

Stop JSON logical processing when we have an empty results list. #696

Closed michaelcfanning closed 1 year ago

michaelcfanning commented 1 year ago

@rtaket @HulonJenkins @suvamM

eddynaka commented 1 year ago
            var sarifLog = new SarifLog()

You could remove this since this is not used.


Refers to: Src/Sarif.PatternMatcher/AnalyzeCommand.cs:338 in 1a58e9d. [](commit_id = 1a58e9d09c99db7552322fe4eea8491863a37255, deletion_comment = False)

michaelcfanning commented 1 year ago
            var sarifLog = new SarifLog()

Yes, and we don't need to create the json logical location processor until the very last minute.


In reply to: 1373013400


Refers to: Src/Sarif.PatternMatcher/AnalyzeCommand.cs:338 in 1a58e9d. [](commit_id = 1a58e9d09c99db7552322fe4eea8491863a37255, deletion_comment = False)