You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We add an empty line after a multi-line definition. For example,
registry.longVar(
nameWithSuffix("startTime"),
runtimeMxBean::getStartTime,
longVarConfigBuilderSupplier("The start time of the Java virtual machine in milliseconds"));
registry.longVar(
nameWithSuffix("uptime", "ms"),
runtimeMxBean::getUptime,
longVarConfigBuilderSupplier("The uptime of the Java virtual machine in milliseconds"));
We don't use the prefix 'is' for fields or parameters, only for methods: isDimensional.
We don't add an empty line after a method signature:
publicvoidproduceMetrics(MetricRegistryregistry) {
// no empty line herefor (inti = 0; i < ATTRS.length; ++i) {
We don't use a space for type casting: (double)i
There should be an empty line before and after if/try inside a method body (but not for the last statement).
There should be no empty before closing brace in a class definition.
The text was updated successfully, but these errors were encountered:
We should create an automatic formatter for IDEA.
The list of rules:
There should be no empty lines if the definition of the class consists only of constants.
or
We add an empty line after a multi-line definition. For example,
The text was updated successfully, but these errors were encountered: