File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -178,16 +178,22 @@ def fuzzy_column_match(pos: CodeRange, location: Location) -> bool:
178178
179179class ResultSet (dict [str , dict [Path , list [Result ]]]):
180180 results_for_rule : dict [str , list [Result ]]
181+ # stores SARIF runs.tool data
182+ tools : list [dict [str , dict ]]
181183
182184 def __init__ (self , * args , ** kwargs ):
183185 super ().__init__ (* args , ** kwargs )
184186 self .results_for_rule = {}
187+ self .tools = []
185188
186189 def add_result (self , result : Result ):
187190 self .results_for_rule .setdefault (result .rule_id , []).append (result )
188191 for loc in result .locations :
189192 self .setdefault (result .rule_id , {}).setdefault (loc .file , []).append (result )
190193
194+ def store_tool_data (self , tool_data : dict ):
195+ self .tools .append (tool_data )
196+
191197 def results_for_rule_and_file (
192198 self , context : CodemodExecutionContext , rule_id : str , file : Path
193199 ) -> list [Result ]:
You can’t perform that action at this time.
0 commit comments