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

ExcessiveConstantUsage smell #621

Closed
troessner opened this issue Jul 24, 2015 · 9 comments
Closed

ExcessiveConstantUsage smell #621

troessner opened this issue Jul 24, 2015 · 9 comments

Comments

@troessner
Copy link
Owner

I think such a smell would be really helpful.

E.g. code like this:

class Omg
  FOO = ....
  BAR = ....
  WALDFEE = ....
end

would reek of this smell. The category for this smell would be "SRP violation" in my mind.

What are your thoughts on this?

@mvz
Copy link
Collaborator

mvz commented Oct 26, 2015

How would you resolve this smell if it occurs?

@troessner
Copy link
Owner Author

How would you resolve this smell if it occurs?

For me ExcessiveConstantUsage is similar to TooManyInstanceVariables

@chastell
Copy link
Collaborator

The devil, as usual, is in the detail. How many is too many? 😈

@troessner
Copy link
Owner Author

How about the same as for TooManyInstanceVariables, so 4?

@chastell
Copy link
Collaborator

I’m not sure how well it’s going to play with your campaign against literals in code. ;)

@troessner
Copy link
Owner Author

YMMD :)

@troessner
Copy link
Owner Author

Cleaning up our issues: Linked this issue in #556 - closing this one.

@mvz
Copy link
Collaborator

mvz commented Jun 24, 2016

Reopening this since we now have a candidate implementation.

@mvz mvz reopened this Jun 24, 2016
@troessner
Copy link
Owner Author

Closing this one with #956 merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants