开发者

What are the optimal checkstyle settings for MethodLength and FileLength?

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 开发者_如何学GomethodLength and fileLength?


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.


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜