Add missing columns to column order list

prev missing cols: source_location and sink_location
missing from prev patch
but were missing in problem only results case anyways
This commit is contained in:
Kristen Newbury
2023-06-02 16:22:18 -04:00
parent a3aed444c1
commit 6b248d2474
2 changed files with 8 additions and 1 deletions

View File

@@ -26,6 +26,7 @@ columns = {
'message' , 'message' ,
'message_object' , 'message_object' ,
'location' , 'location' ,
'source_startLine', 'source_startLine',
'source_startCol', 'source_startCol',
'source_endLine' , 'source_endLine' ,
@@ -35,7 +36,9 @@ columns = {
'sink_endLine' , 'sink_endLine' ,
'sink_endCol' , 'sink_endCol' ,
'source_object' , 'source_object' ,
'sink_object' 'sink_object',
'source_location',
'sink_location'
], ],
"projects" : [ "projects" : [
"id" , "id" ,

View File

@@ -47,11 +47,13 @@ class ScanTablesTypes:
'message_object' : numpy.dtype('O'), 'message_object' : numpy.dtype('O'),
'location' : pd.StringDtype(), 'location' : pd.StringDtype(),
'source_location' : pd.StringDtype(),
'source_startLine' : pd.Int64Dtype(), 'source_startLine' : pd.Int64Dtype(),
'source_startCol' : pd.Int64Dtype(), 'source_startCol' : pd.Int64Dtype(),
'source_endLine' : pd.Int64Dtype(), 'source_endLine' : pd.Int64Dtype(),
'source_endCol' : pd.Int64Dtype(), 'source_endCol' : pd.Int64Dtype(),
'sink_location' : pd.StringDtype(),
'sink_startLine' : pd.Int64Dtype(), 'sink_startLine' : pd.Int64Dtype(),
'sink_startCol' : pd.Int64Dtype(), 'sink_startCol' : pd.Int64Dtype(),
'sink_endLine' : pd.Int64Dtype(), 'sink_endLine' : pd.Int64Dtype(),
@@ -213,11 +215,13 @@ def _results_from_kind_problem(basetables, external_info):
'location': b.kind_problem.location_uri, 'location': b.kind_problem.location_uri,
# for kind_problem, use the same location for source and sink # for kind_problem, use the same location for source and sink
'source_location' : pd.NA,
'source_startLine' : b.kind_problem.location_startLine, 'source_startLine' : b.kind_problem.location_startLine,
'source_startCol' : b.kind_problem.location_startColumn, 'source_startCol' : b.kind_problem.location_startColumn,
'source_endLine' : b.kind_problem.location_endLine, 'source_endLine' : b.kind_problem.location_endLine,
'source_endCol' : b.kind_problem.location_endColumn, 'source_endCol' : b.kind_problem.location_endColumn,
'sink_location' : pd.NA,
'sink_startLine' : b.kind_problem.location_startLine, 'sink_startLine' : b.kind_problem.location_startLine,
'sink_startCol' : b.kind_problem.location_startColumn, 'sink_startCol' : b.kind_problem.location_startColumn,
'sink_endLine' : b.kind_problem.location_endLine, 'sink_endLine' : b.kind_problem.location_endLine,