An extra newline was being added by the editor

pull/206/head
Josh Asplund 7 years ago
parent 45a8c47a10
commit 71e512a682
  1. 3
      .editorconfig
  2. 2
      mythril/analysis/report.py
  3. 26
      mythril/analysis/templates/report_as_markdown.jinja2
  4. 23
      mythril/analysis/templates/report_as_text.jinja2
  5. 2
      tests/testdata/outputs_expected/calls.sol.o.markdown
  6. 2
      tests/testdata/outputs_expected/ether_send.sol.o.markdown
  7. 8
      tests/testdata/outputs_expected/exceptions.sol.o.markdown
  8. 2
      tests/testdata/outputs_expected/kinds_of_calls.sol.o.markdown
  9. 2
      tests/testdata/outputs_expected/metacoin.sol.o.markdown
  10. 2
      tests/testdata/outputs_expected/multi_contracts.sol.markdown
  11. 2
      tests/testdata/outputs_expected/multi_contracts.sol.o.markdown
  12. 2
      tests/testdata/outputs_expected/origin.sol.o.markdown
  13. 2
      tests/testdata/outputs_expected/overflow.sol.markdown
  14. 2
      tests/testdata/outputs_expected/overflow.sol.o.markdown
  15. 2
      tests/testdata/outputs_expected/returnvalue.sol.o.markdown
  16. 2
      tests/testdata/outputs_expected/suicide.sol.markdown
  17. 2
      tests/testdata/outputs_expected/suicide.sol.o.markdown
  18. 2
      tests/testdata/outputs_expected/underflow.sol.markdown
  19. 2
      tests/testdata/outputs_expected/underflow.sol.o.markdown

@ -8,3 +8,6 @@ insert_final_newline = true
indent_style = space
indent_size = 4
charset = utf-8
[*.jinja2]
insert_final_newline = false

@ -38,7 +38,7 @@ class Issue:
self.lineno = codeinfo.lineno
class Report:
environment = Environment(loader=PackageLoader('mythril.analysis'))
environment = Environment(loader=PackageLoader('mythril.analysis'), trim_blocks=True)
def __init__(self, verbose=False):
self.issues = {}

@ -1,7 +1,7 @@
# Analysis results for {{ filename }}
{%- if issues %}
{% if issues %}
{% for key, issue in issues.items() %}
## {{ issue.title }}
- Type: {{ issue.type }}
@ -11,25 +11,27 @@
### Description
{{ issue.description }}
{% if issue.filename and issue.lineno -%}
{{ issue.description.rstrip() }}
{% if issue.filename and issue.lineno %}
In file: {{ issue.filename }}:{{ issue.lineno }}
{%- endif -%}
{%- if issue.code %}
{% endif %}
{% if issue.code %}
### Code
```
{{ issue.code }}
```
{%- endif %}
{%- if verbose and issue.debug -%}
{% endif %}
{% if verbose and issue.debug %}
--------------------
### Debugging Information:
{{ issue.debug }}
{%- endif %}
{% endfor -%}
{%- else -%}
{% endif %}
{% endfor %}
{% else %}
The analysis was completed successfully. No issues were detected.
{%- endif -%}
{% endif %}

@ -1,5 +1,5 @@
{%- if issues -%}
{% for key, issue in issues.items() -%}
{% if issues %}
{% for key, issue in issues.items() %}
==== {{ issue.title }} ====
Type: {{ issue.type }}
Contract: {{ issue.contract | default("Unknown") }}
@ -7,22 +7,23 @@ Function name: {{ issue.function }}
PC address: {{ issue.address }}
{{ issue.description }}
--------------------
{% if issue.filename and issue.lineno -%}
{% if issue.filename and issue.lineno %}
In file: {{ issue.filename }}:{{ issue.lineno }}
{%- endif %}
{%- if issue.code %}
{% endif %}
{% if issue.code %}
{{ issue.code }}
--------------------
{% endif -%}
{% if verbose and issue.debug -%}
{% endif %}
{% if verbose and issue.debug %}
--------------------
DEBUGGING INFORMATION:
{{ issue.debug }}
{%- endif %}
{% endfor -%}
{%- else -%}
{% endif %}
{% endfor %}
{% else %}
The analysis was completed successfully. No issues were detected.
{%- endif -%}
{% endif %}

@ -108,4 +108,4 @@ The return value of an external call is not checked. Note that execution continu
### Description
The return value of an external call is not checked. Note that execution continue even if the called contract throws.
The return value of an external call is not checked. Note that execution continue even if the called contract throws.

@ -23,4 +23,4 @@ There is a check on storage index 1. This storage slot can be written to by call
### Description
A possible integer overflow exists in the function `invest()`.
The addition or multiplication may result in a value higher than the maximum representable integer.
The addition or multiplication may result in a value higher than the maximum representable integer.

@ -9,7 +9,7 @@
### Description
A reachable exception (opcode 0xfe) has been detected. This can be caused by type errors, division by zero, out-of-bounds array access, or assert violations. This is acceptable in most situations. Note however that `assert()` should only be used to check invariants. Use `require()` for regular input checking.
A reachable exception (opcode 0xfe) has been detected. This can be caused by type errors, division by zero, out-of-bounds array access, or assert violations. This is acceptable in most situations. Note however that `assert()` should only be used to check invariants. Use `require()` for regular input checking.
## Exception state
@ -20,7 +20,7 @@ A reachable exception (opcode 0xfe) has been detected. This can be caused by typ
### Description
A reachable exception (opcode 0xfe) has been detected. This can be caused by type errors, division by zero, out-of-bounds array access, or assert violations. This is acceptable in most situations. Note however that `assert()` should only be used to check invariants. Use `require()` for regular input checking.
A reachable exception (opcode 0xfe) has been detected. This can be caused by type errors, division by zero, out-of-bounds array access, or assert violations. This is acceptable in most situations. Note however that `assert()` should only be used to check invariants. Use `require()` for regular input checking.
## Exception state
@ -31,7 +31,7 @@ A reachable exception (opcode 0xfe) has been detected. This can be caused by typ
### Description
A reachable exception (opcode 0xfe) has been detected. This can be caused by type errors, division by zero, out-of-bounds array access, or assert violations. This is acceptable in most situations. Note however that `assert()` should only be used to check invariants. Use `require()` for regular input checking.
A reachable exception (opcode 0xfe) has been detected. This can be caused by type errors, division by zero, out-of-bounds array access, or assert violations. This is acceptable in most situations. Note however that `assert()` should only be used to check invariants. Use `require()` for regular input checking.
## Exception state
@ -42,4 +42,4 @@ A reachable exception (opcode 0xfe) has been detected. This can be caused by typ
### Description
A reachable exception (opcode 0xfe) has been detected. This can be caused by type errors, division by zero, out-of-bounds array access, or assert violations. This is acceptable in most situations. Note however that `assert()` should only be used to check invariants. Use `require()` for regular input checking.
A reachable exception (opcode 0xfe) has been detected. This can be caused by type errors, division by zero, out-of-bounds array access, or assert violations. This is acceptable in most situations. Note however that `assert()` should only be used to check invariants. Use `require()` for regular input checking.

@ -20,4 +20,4 @@ This contract executes a message call to an address provided as a function argum
### Description
The return value of an external call is not checked. Note that execution continue even if the called contract throws.
The return value of an external call is not checked. Note that execution continue even if the called contract throws.

@ -10,4 +10,4 @@
### Description
A possible integer overflow exists in the function `sendToken(address,uint256)`.
The addition or multiplication may result in a value higher than the maximum representable integer.
The addition or multiplication may result in a value higher than the maximum representable integer.

@ -15,4 +15,4 @@ In *<TESTDATA>/inputs/multi_contracts.sol:14*
```
msg.sender.transfer(2 ether)
```
```

@ -10,4 +10,4 @@
### Description
In the function `_function_0x8a4068dd` a non-zero amount of Ether is sent to msg.sender.
It seems that this function can be called without restrictions.
It seems that this function can be called without restrictions.

@ -10,4 +10,4 @@
### Description
Function transferOwnership(address) retrieves the transaction origin (tx.origin) using the ORIGIN opcode. Use tx.sender instead.
See also: https://solidity.readthedocs.io/en/develop/security-considerations.html#tx-origin
See also: https://solidity.readthedocs.io/en/develop/security-considerations.html#tx-origin

@ -49,4 +49,4 @@ In *<TESTDATA>/inputs/overflow.sol:11*
```
balances[msg.sender] - _value
```
```

@ -34,4 +34,4 @@ The addition or multiplication may result in a value higher than the maximum rep
### Description
A possible integer underflow exists in the function `sendeth(address,uint256)`.
The subtraction may result in a value < 0.
The subtraction may result in a value < 0.

@ -31,4 +31,4 @@ This contract executes a message call to to another contract. Make sure that the
### Description
The return value of an external call is not checked. Note that execution continue even if the called contract throws.
The return value of an external call is not checked. Note that execution continue even if the called contract throws.

@ -16,4 +16,4 @@ In *<TESTDATA>/inputs/suicide.sol:4*
```
selfdestruct(addr)
```
```

@ -11,4 +11,4 @@
The function `_function_0xcbf0b0c0` executes the SUICIDE instruction. The remaining Ether is sent to an address provided as a function argument.
It seems that this function can be called without restrictions.
It seems that this function can be called without restrictions.

@ -49,4 +49,4 @@ In *<TESTDATA>/inputs/underflow.sol:11*
```
balances[msg.sender] - _value
```
```

@ -34,4 +34,4 @@ The addition or multiplication may result in a value higher than the maximum rep
### Description
A possible integer underflow exists in the function `sendeth(address,uint256)`.
The subtraction may result in a value < 0.
The subtraction may result in a value < 0.

Loading…
Cancel
Save