|
|
|
@ -107,6 +107,17 @@ class Issue: |
|
|
|
|
|
|
|
|
|
return issue |
|
|
|
|
|
|
|
|
|
def _set_internal_compiler_error(self): |
|
|
|
|
""" |
|
|
|
|
Adds the false positive to description and changes severity to low |
|
|
|
|
""" |
|
|
|
|
self.severity = "Low" |
|
|
|
|
self.description_tail += ( |
|
|
|
|
" This issue is reported for internal compiler generated code." |
|
|
|
|
) |
|
|
|
|
self.description = "%s\n%s" % (self.description_head, self.description_tail) |
|
|
|
|
self.code = "" |
|
|
|
|
|
|
|
|
|
def add_code_info(self, contract): |
|
|
|
|
""" |
|
|
|
|
|
|
|
|
@ -119,6 +130,8 @@ class Issue: |
|
|
|
|
self.filename = codeinfo.filename |
|
|
|
|
self.code = codeinfo.code |
|
|
|
|
self.lineno = codeinfo.lineno |
|
|
|
|
if self.lineno is None: |
|
|
|
|
self._set_internal_compiler_error() |
|
|
|
|
self.source_mapping = codeinfo.solc_mapping |
|
|
|
|
else: |
|
|
|
|
self.source_mapping = self.address |
|
|
|
|