Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't generate function docstrings on the following file #1

Closed
matt-lough opened this issue Apr 15, 2018 · 1 comment
Closed

Doesn't generate function docstrings on the following file #1

matt-lough opened this issue Apr 15, 2018 · 1 comment

Comments

@matt-lough
Copy link
Owner

Solidity Code:

pragma solidity ^0.4.18;

contract Migrations {
  address public owner;
  uint public last_completed_migration;

  modifier restricted() {
    if (msg.sender == owner) _;
  }

  function Migrations() public {
    owner = msg.sender;
  }

  function setCompleted(uint completed) public restricted {
    last_completed_migration = completed;
  }

  function upgrade(address new_address) public restricted {
    Migrations upgraded = Migrations(new_address);
    upgraded.setCompleted(last_completed_migration);
  }
}

Error message:

Traceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 818, in run_
    return self.run(edit)
  File "/Users/mattbookpro/Library/Application Support/Sublime Text 3/Packages/SolidityDocstringGenerator/SolidityDocstringGenerator.py", line 208, in run
    self.process_file()
  File "/Users/mattbookpro/Library/Application Support/Sublime Text 3/Packages/SolidityDocstringGenerator/SolidityDocstringGenerator.py", line 168, in process_file
    self.insert_docstring(line_region)
  File "/Users/mattbookpro/Library/Application Support/Sublime Text 3/Packages/SolidityDocstringGenerator/SolidityDocstringGenerator.py", line 192, in insert_docstring
    docstring = construct_docstring(parse_declaration(line))
  File "/Users/mattbookpro/Library/Application Support/Sublime Text 3/Packages/SolidityDocstringGenerator/SolidityDocstringGenerator.py", line 134, in parse_declaration
    params.append(params_raw[i + 1])
IndexError: list index out of range
@matt-lough
Copy link
Owner Author

matt-lough commented May 14, 2018

This one fixed it 7b3febd

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant