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

Maximum methods per class #22

Open
sbradl opened this issue May 20, 2020 · 2 comments
Open

Maximum methods per class #22

sbradl opened this issue May 20, 2020 · 2 comments

Comments

@sbradl
Copy link

sbradl commented May 20, 2020

I think this should only take public and maybe protected methods into account. At the moment it counts private methods too.

Nice work btw .)

@MO2k4
Copy link
Owner

MO2k4 commented May 27, 2020

I think that is a tricky question, because would you consider a class with 2-3 public methods and 10-100 private methods clean? I don't think that a class should be divided by access identifier, because the overall size of the class increases and so would the responsibility.

@sbradl
Copy link
Author

sbradl commented May 27, 2020

Yeah indeed it is tricky. Without any actual numbers I would rather tolerate 20 private methods but not 20 public ones. But 1 public method with 20 private ones seems off too.

Maybe these are two separate concerns. One is the view from the outside - the amount of public methods and the other one is the actual code size

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

No branches or pull requests

2 participants