コード例 #1
0
 /// <summary>
 /// Get a Result Matching Baseliner that matches results between two groups of Sarif Logs using a sensible default set of rules for matching results.
 /// </summary>
 /// <returns>A result matching baseliner instance with the default set of strategies.</returns>
 public static ISarifLogMatcher GetDefaultResultMatchingBaseliner(bool oldAlgorithm = false)
 {
     if (oldAlgorithm)
     {
         return(new SarifLogResultMatcher
                (
                    // Exact matchers run first, in order.  These should do *no* remapping and offer fast comparisons to filter out
                    // common cases (e.x. identical results).
                    new List <IResultMatcher>()
         {
             ExactResultMatcherFactory.GetIdenticalResultMatcher(considerPropertyBagsWhenComparing: true)
         },
                    // Heuristic matchers run in order after the exact matchers.
                    // These can do remapping, and catch the long tail of "changed" results.
                    new List <IResultMatcher>()
         {
             HeuristicResultMatcherFactory.GetPartialFingerprintResultMatcher()
         }
                ));
     }
     else
     {
         return(new SarifLogResultMatcher(
                    new List <IResultMatcher>()
         {
             new V2ResultMatcher()
         },
                    new List <IResultMatcher>()
                    ));
     }
 }
コード例 #2
0
 /// <summary>
 /// Get a Result Matching Baseliner that matches results between two groups of Sarif Logs using a sensible default set of rules for matching results.
 /// </summary>
 /// <returns>A result matching baseliner instance with the default set of strategies.</returns>
 public static ISarifLogMatcher GetDefaultResultMatchingBaseliner()
 {
     return(new SarifLogResultMatcher
            (
                // Exact matchers run first, in order.  These should do *no* remapping and offer fast comparisons to filter out
                // common cases (e.x. identical results).
                new List <IResultMatcher>()
     {
         ExactResultMatcherFactory.GetIdenticalResultMatcher()
     },
                // Heuristic matchers run in order after the exact matchers.
                // These can do remapping, and catch the long tail of "changed" results.
                new List <IResultMatcher>()
     {
         HeuristicResultMatcherFactory.GetPartialFingerprintResultMatcher()
     }
            ));
 }