Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Mention tools for identifying magic numbers #98

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

Merged
merged 2 commits into from
Jan 10, 2017
Merged

Mention tools for identifying magic numbers #98

merged 2 commits into from
Jan 10, 2017

Conversation

danielstjules
Copy link
Contributor

@danielstjules danielstjules commented Jan 10, 2017

https://github.com/danielstjules/buddy.js is a tool that exists to identify magic numbers. Here's the result of running the example in the readme:

screen shot 2017-01-09 at 3 48 06 pm

Here's another example from the buddy.js readme:

intro-screenshot

I also mention eslint, which added a magic number rule based on buddy.js in https://github.com/eslint/eslint/blob/660e0918933e6e7fede26bc675a0763a6b357c94/lib/rules/no-magic-numbers.js#L2 Not sure if it handles the same test cases, but it's the only general linter I know of that detects these things.

@ryanmcdermott ryanmcdermott merged commit bfa3eb3 into ryanmcdermott:master Jan 10, 2017
@ryanmcdermott
Copy link
Owner

Woo hoo bring on the tools πŸŽ‰ You've got some great ones!

Tell Greg I say Hi by the way!

@danielstjules danielstjules deleted the magic-numbers branch January 10, 2017 05:00
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