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

"object calisthenics" checks? #4

Open
enygma opened this issue Nov 12, 2014 · 4 comments
Open

"object calisthenics" checks? #4

enygma opened this issue Nov 12, 2014 · 4 comments

Comments

@enygma
Copy link
Member

enygma commented Nov 12, 2014

Think about possibly adding "object calisthenics" checks...

  • One level of indentation
  • Don't use else
  • Wrap primitive types (if they contain behavior)
  • Only one -> per line
  • Do not abbreviate
  • Keep you classes small
  • Limit your instance variables (dependencies passed into methods)
  • Using first class collections
  • Use getters and setters
  • Document your code

Not really about security but could be useful for checking

@redbeardcreator
Copy link
Contributor

It's an interesting thought. I would probably use it. I have used similar features in other tools.

@enygma
Copy link
Member Author

enygma commented Dec 8, 2014

Yeah, this was more of a passing thought recorded in a conference talk. This probably more relates to code quality and less to security specifically.

@redbeardcreator
Copy link
Contributor

I understand that. It might be something to add later as a plugin-type tool.

@garrettw
Copy link
Contributor

Some of those are already well-covered by other static analysis tools, specifically these, at the very least (I think):

  • Don't use else
  • Keep your classes small
  • Limit your instance variables (dependencies passed into methods)
  • Use getters and setters
  • Document your code

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

3 participants