oraclesorg / oracles-contract

New version of POA Network consensus contracts is here: https://github.com/poanetwork/poa-network-consensus-contracts
MIT License
24 stars 8 forks source link

Fix errors and warning by solhint in BallotsManager.sol #11

Closed igorbarinov closed 6 years ago

igorbarinov commented 6 years ago
BallotsManager.sol
    1:17  warning  Compiler version must be fixed                                   compiler-fixed
    6:1   error    Definition must be surrounded with two blank line indent         two-lines-top-level-separator
   14:5   error    Function has cyclomatic complexity 9 but allowed no more than 7  code-complexity
   19:7   warning  Explicitly mark visibility in function                           func-visibility
   20:50  error    "throw" is deprecated, avoid to use it                           avoid-throw
   21:59  error    "throw" is deprecated, avoid to use it                           avoid-throw
   24:58  error    "throw" is deprecated, avoid to use it                           avoid-throw
   30:14  warning  Variable "disabledValidatorIsAdded" is unused                    no-unused-vars
   32:53  error    "throw" is deprecated, avoid to use it                           avoid-throw
   34:46  error    "throw" is deprecated, avoid to use it                           avoid-throw
   35:28  warning  Avoid to make time-based decisions in your business logic        not-rely-on-time
   40:24  warning  Avoid to make time-based decisions in your business logic        not-rely-on-time
   56:27  warning  Explicitly mark visibility in function                           func-visibility
   65:43  warning  Explicitly mark visibility in function                           func-visibility
   74:45  warning  Explicitly mark visibility in function                           func-visibility
   83:48  warning  Explicitly mark visibility in function                           func-visibility
   92:44  warning  Explicitly mark visibility in function                           func-visibility
  101:45  warning  Explicitly mark visibility in function                           func-visibility
  110:50  warning  Explicitly mark visibility in function                           func-visibility
  119:48  warning  Explicitly mark visibility in function                           func-visibility
  128:41  warning  Explicitly mark visibility in function                           func-visibility
  137:45  warning  Explicitly mark visibility in function                           func-visibility
  146:44  warning  Explicitly mark visibility in function                           func-visibility
  155:43  warning  Explicitly mark visibility in function                           func-visibility
  164:47  warning  Explicitly mark visibility in function                           func-visibility
  165:50  error    "throw" is deprecated, avoid to use it                           avoid-throw
  167:32  warning  Avoid to make time-based decisions in your business logic        not-rely-on-time
  167:37  error    "throw" is deprecated, avoid to use it                           avoid-throw
  168:42  error    "throw" is deprecated, avoid to use it                           avoid-throw
  172:14  error    Expected indentation of 12 spaces but found 13                   indent
  178:2   error    Line length must be no more than 120 but current length is 176   max-line-length
  180:5   error    Function has cyclomatic complexity 8 but allowed no more than 7  code-complexity
  183:36  warning  Avoid to make time-based decisions in your business logic        not-rely-on-time
  198:64  warning  Avoid to make time-based decisions in your business logic        not-rely-on-time
lorien commented 6 years ago

@igorbarinov Ethlint? Did you mean solhint?

igorbarinov commented 6 years ago

Lol, right. I see eth everywhere

vbaranov commented 6 years ago

All issues resolved except

  1. "1:17 error Compiler version must be fixed compiler-fixed"

  2. Avoid to make time-based decisions in your business logic