-
Notifications
You must be signed in to change notification settings - Fork 46
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
Check for named constants #86
base: master
Are you sure you want to change the base?
Conversation
Not sure why appveyor is complaining. Will take a look later. Passes travis |
9bca0f4
to
2553540
Compare
This should be multilingual now. |
Is the complexity really worth the benefit? I mean, you can still call your constant |
Completely agree. Since using this Ive seen more and more bad constant naming. That can not be prevented but the main cases I have seen, this will prevent that. To be clear this check is not enabled by default, so its only if you want the additional level of checking.
|
@sidz thoughts on getting this in soon ? It will solve lots of magic constants. I don't think it should be Included in all but as a separate flag to not suddenly include lots of magic numbers |
As an idea it's ok for me so far. But we need to rebase this PR against latest master and fix all conflicts first. |
Yeah was just checking that before I did that work. I'll sort the conflicts this week |
Eg remove $six = 6
or $week = 7
These sorts of numbers are still magic, fixes #83