-
-
Notifications
You must be signed in to change notification settings - Fork 10
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
Detect offenses within class_eval/exec
block
#55
Detect offenses within class_eval/exec
block
#55
Conversation
I agree. Thank you for that. :) I added you on rubygems.org. Feel free to bump the version and publish a release. 👍 |
Thanks! I'll do it a little bit later, gonna take a look at the changes to make sure they're all fine first |
Regarding this PR, it might be that we need to change the offense message to avoid confusion. This cop now reports class instance variables which are not in a method, so "Avoid instance variables in class methods." is a little bit misleading. |
Makes sense 👍 You could extract a new cop or make the message longer to explain things. 🤷 |
I think the message "Avoid class instance variables" should be good (that's basically what we're trying to say: any class instance variable is potentially unsafe, we mostly track it inside class methods, but that's just an implementation detail/restriction). But it implies we should change cop's name as well ( |
That sounds right to me 👍 |
Fine 👍🏻, let me do it in separate PR to keep this one simple, is it OK to merge as is? |
@mikegee I'l cut 0.6.0 today, everything looks fine |
Resolves #2
BTW @mikegee maybe it's time for a release? There are a lot of unpublished changes atm 🙂