File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
src/macaron/slsa_analyzer/checks Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -99,10 +99,14 @@ def _should_skip(
9999 Returns True if any result of the dependency heuristic does not match the expected result.
100100 Otherwise, returns False.
101101 """
102+ mapped_h : dict [Heuristics , list [HeuristicResult ]] = {}
102103 for heuristic , expected_result in depends_on :
103- dep_heuristic_result : HeuristicResult = results [heuristic ]
104- if dep_heuristic_result is not expected_result :
105- return True
104+ mapped_h .setdefault (heuristic , []).append (expected_result )
105+
106+ for heuristic , exp_results in mapped_h .items ():
107+ dep_heuristic_result = results .get (heuristic )
108+ if dep_heuristic_result not in exp_results :
109+ return True
106110 return False
107111
108112 def analyze_source (
You can’t perform that action at this time.
0 commit comments