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

Warning wishlist #312

Open
1 of 21 tasks
DJRHails opened this issue Aug 10, 2018 · 0 comments
Open
1 of 21 tasks

Warning wishlist #312

DJRHails opened this issue Aug 10, 2018 · 0 comments
Labels

Comments

@DJRHails
Copy link
Member

DJRHails commented Aug 10, 2018

These are a list of possible warnings we'd want to embed into the compiler based upon "best practices" in the field. Most deserve their own issue and discussion, and should be removed from this list as work is started.

  • Block.timestamp not allowed in functions
  • Extract magic numbers to constant
  • Fallback rejects those with value if it isn't marked payable
  • Warning for variable newlines
  • Contract files all use the same solidity pragma
  • Warning without pragma
  • Disallow emitting events without keyword
  • Warning for different function orders
  • Return value is not used
  • Self destruct support
  • Insecure instantiation of array
  • Uses send/call.value but has no payable functions
  • Similar identifiers
  • Explicit public, private, internal
  • Support constant/view keyword
  • Modifying for loop iteration counting variable in loop body (can we create an infinite loop this way)
  • Warning on similar names (fuzzy matching)
  • Multiple declaration groups
  • Imports at the top of the file
  • Loops (check/estimate gas consumption so that loops don't exceed block gas limit) - For instance if we have a rough estimate of inner loops cost and outer loops cost we can add a check to see if the size is larger than the allowed amount. E.g. If we have 800 gas <= 100 outer code + size * 50 inner loop ==> size <= 14
  • Function ordered:
    • constructor
    • fallback function (if exists)
    • external
    • public
    • internal
    • private
@DJRHails DJRHails changed the title Warning wishlist (Temp) Warning wishlist Aug 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants