THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
- 4 spaces for indentation
- No tabs
- "Soft" maximum line length of ~80 characters
- Editors and monitors used by most programmers with good eyes can easily handle 120 characters. However:
- Here is an example from
CLUtilUrlConfigGui.java
- which do you find easier to read?
- also interesting to note that by looking at long lines we've spotted a simplification/refactor
No Format |
---|
boolean argumentOptional = (flags & CLOptionDescriptor.ARGUMENT_OPTIONAL) == CLOptionDescriptor.ARGUMENT_OPTIONAL;
boolean argumentRequired = (flags & CLOptionDescriptor.ARGUMENT_REQUIRED) == CLOptionDescriptor.ARGUMENT_REQUIRED;
boolean twoArgumentsRequired = (flags & CLOptionDescriptor.ARGUMENTS_REQUIRED_2) == CLOptionDescriptor.ARGUMENTS_REQUIRED_2;
|
or
...
{{ element.setProperty(HTTPSamplerBase.BROWSER_COMPATIBLE_MULTIPART, useBrowserCompatibleMultipartMode.isSelected(),HTTPSamplerBase.BROWSER_COMPATIBLE_MULTIPART_MODE_DEFAULT);}}
or
{{ element.setProperty(}}
{{ HTTPSamplerBase.BROWSER_COMPATIBLE_MULTIPART,}}
{{ useBrowserCompatibleMultipartMode.isSelected(),}}
{{ HTTPSamplerBase.BROWSER_COMPATIBLE_MULTIPART_MODE_DEFAULT);}}
...
- "Hard" maximum line length of 120 characters
- Except for imports or other places where breaking the line wouldn't aid readability
...