mirror of
https://github.com/hohn/sarif-cli.git
synced 2025-12-16 17:23:03 +01:00
Reduce zero results from error to warning
This commit is contained in:
committed by
=Michael Hohn
parent
235acf6b93
commit
8ad69a503b
@@ -1,11 +1,13 @@
|
|||||||
""" Collection of joins for the derived tables
|
""" Collection of joins for the derived tables
|
||||||
|
|
||||||
"""
|
"""
|
||||||
import pandas as pd
|
|
||||||
import numpy
|
|
||||||
import re
|
|
||||||
from . import snowflake_id
|
from . import snowflake_id
|
||||||
|
|
||||||
|
import logging
|
||||||
|
import numpy
|
||||||
|
import pandas as pd
|
||||||
|
import re
|
||||||
|
|
||||||
class ZeroResults(Exception):
|
class ZeroResults(Exception):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@@ -153,10 +155,9 @@ def joins_for_results(basetables, external_info):
|
|||||||
res = pd.concat(stack)
|
res = pd.concat(stack)
|
||||||
else:
|
else:
|
||||||
if stack == []:
|
if stack == []:
|
||||||
# Sanity check: The case of zero results must be handled at
|
# TODO: The case of zero results should be handled at sarif read time
|
||||||
# sarif read time and should never reach here.
|
logging.warning("Zero problem/path_problem results found in sarif "
|
||||||
raise ZeroResults("Zero problem/path_problem results found in sarif "
|
"file but processing anyway.")
|
||||||
"file but processing anyway. Internal error.")
|
|
||||||
res = tables[0]
|
res = tables[0]
|
||||||
|
|
||||||
# Force all column types to ensure appropriate formatting
|
# Force all column types to ensure appropriate formatting
|
||||||
|
|||||||
Reference in New Issue
Block a user