views:

52

answers:

2

I am starting a new Java web project that will be worked on by up to 10 developers.

It will probably be hard to change once the codebase grows large, so what are the best checkstyle settings to use for methodLength and fileLength?

A: 

Off the top of my head, I'd say that methods greater than 100 lines and classes greater than 1000 lines are deserving a second look. But these should not be "hard" limits. Depending on your application, methods and classes larger than this can be justified.

Stephen C
A: 

The sun style guide recommends avoiding classes longer than 2000 lines. I'm not sure if it says anything about method length.

Tom Castle