jmeter-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Graham Russell <>
Subject Code Style Guidelines
Date Sat, 11 Feb 2017 22:27:48 GMT
Hi all

Do we have any (written) guidance on code style?

I know we have checkstyle, but this has very few rules.

The reason for asking is that I think having a consistent style is very
important for readability (which helps writing new feature or fixing
existing code etc.).

The main things I think contribute to this are (and which are fairly easy
to detect/fix):
* (soft) line lengths (80, 100?)
* spacing between elements on a line e.g. if (..., while (...,
methodCall(arg1, arg2), "con" + "cat"
* import order, spacing and not using .*
* line length of methods (soft limit of 50?)
* line length of classes (soft limit of 500?)

>From Phillippe's Java 8 email:
* Use of Optional
* Default/static methods on Interfaces
* Lambas where possible (max ~5 lines?)

I have found this:
which suggests some formatting e.g. 80 char line length and new line before
opening brace but most of the code doesn't conform to that - it was also
updated 8 years ago.

Any other ideas/thoughts?



  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message