Get rid of --verbose-report flag

pull/1108/head
Bernhard Mueller 5 years ago
parent 5f11a0f38d
commit 3ebd6949c6
  1. 14
      mythril/analysis/report.py
  2. 6
      mythril/interfaces/cli.py
  3. 4
      mythril/mythril/mythril_analyzer.py

@ -162,13 +162,13 @@ class Report:
loader=PackageLoader("mythril.analysis"), trim_blocks=True
)
def __init__(self, verbose=False, contracts=None, exceptions=None):
def __init__(self, contracts=None, exceptions=None):
"""
:param verbose:
:param :contracts:
:param :exceptions:
"""
self.issues = {}
self.verbose = verbose
self.solc_version = ""
self.meta = {}
self.source = Source()
@ -200,9 +200,7 @@ class Report:
name = self._file_name()
template = Report.environment.get_template("report_as_text.jinja2")
return template.render(
filename=name, issues=self.sorted_issues(), verbose=self.verbose
)
return template.render(filename=name, issues=self.sorted_issues())
def as_json(self):
"""
@ -271,9 +269,7 @@ class Report:
"""
filename = self._file_name()
template = Report.environment.get_template("report_as_markdown.jinja2")
return template.render(
filename=filename, issues=self.sorted_issues(), verbose=self.verbose
)
return template.render(filename=filename, issues=self.sorted_issues())
def _file_name(self):
"""

@ -119,11 +119,6 @@ def get_output_parser() -> ArgumentParser:
help="report output format",
metavar="<text/markdown/json/jsonv2>",
)
parser.add_argument(
"--verbose-report",
action="store_true",
help="Include debugging information in report",
)
return parser
@ -599,7 +594,6 @@ def execute_command(
modules=[m.strip() for m in args.modules.strip().split(",")]
if args.modules
else [],
verbose_report=args.verbose_report,
transaction_count=args.transaction_count,
)
outputs = {

@ -122,12 +122,10 @@ class MythrilAnalyzer:
def fire_lasers(
self,
modules: Optional[List[str]] = None,
verbose_report: bool = False,
transaction_count: Optional[int] = None,
) -> Report:
"""
:param modules: The analysis modules which should be executed
:param verbose_report: Gives out the transaction sequence of the vulnerability
:param transaction_count: The amount of transactions to be executed
:return: The Report class which contains the all the issues/vulnerabilities
"""
@ -177,7 +175,7 @@ class MythrilAnalyzer:
source_data = Source()
source_data.get_source_from_contracts_list(self.contracts)
# Finally, output the results
report = Report(verbose_report, contracts=self.contracts, exceptions=exceptions)
report = Report(contracts=self.contracts, exceptions=exceptions)
for issue in all_issues:
report.append_issue(issue)

Loading…
Cancel
Save