File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -177,17 +177,18 @@ def fuzzy_column_match(pos: CodeRange, location: Location) -> bool:
177177
178178
179179class ResultSet (dict [str , dict [Path , list [Result ]]]):
180- results_for_rule : dict [str , list [Result ]]
181-
182- def __init__ (self , * args , ** kwargs ):
183- super ().__init__ (* args , ** kwargs )
184- self .results_for_rule = {}
180+ results_for_rule : dict [str , list [Result ]] = {}
181+ # stores SARIF runs.tool data
182+ tools : list [dict [str , dict ]] = []
185183
186184 def add_result (self , result : Result ):
187185 self .results_for_rule .setdefault (result .rule_id , []).append (result )
188186 for loc in result .locations :
189187 self .setdefault (result .rule_id , {}).setdefault (loc .file , []).append (result )
190188
189+ def store_tool_data (self , tool_data : dict ):
190+ self .tools .append (tool_data )
191+
191192 def results_for_rule_and_file (
192193 self , context : CodemodExecutionContext , rule_id : str , file : Path
193194 ) -> list [Result ]:
You can’t perform that action at this time.
0 commit comments