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

Magic number warning #190

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from
Open

Conversation

mushketyk
Copy link
Contributor

@mushketyk mushketyk commented Apr 4, 2018

I've also implemented a couple of helper functions that should make writing unit tests for rules easier.

Implements one of the rules in #44

@mushketyk
Copy link
Contributor Author

I've removed deprecated: true from the "magic-to-const" rule that accidentally was added there.

@duaraghav8
Copy link
Owner

@mushketyk Am I right in understanding that this rule intends to flag any numbers in the code being used without being declared as constants first? Like callMySolidityFunction(42); should be flagged but var foo = 42; callMySolidityFunction(foo); shouldn't, right?

I'm confused because you only seem to pass on the number if its declared as a constant state variable.

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

Successfully merging this pull request may close these issues.

2 participants