-
Notifications
You must be signed in to change notification settings - Fork 13k
Open
Labels
lang:javaThe Java languageThe Java language
Description
From https://google.github.io/styleguide/javaguide.html#s3.3.3-import-ordering-and-spacing:
If there are both static and non-static imports, a single blank line separates the two blocks.
Now, all imports are in a single block:
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import java.net.URI;
import java.util.Collections;
import org.eclipse.core.runtime.CoreException;
import org.junit.Test;
Empty line should be left between static and non-static imports, so it should be like this:
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import java.net.URI;
import java.util.Collections;
import org.eclipse.core.runtime.CoreException;
import org.junit.Test;
This formatting is done by this line in config:
<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_import_groups" value="0"/>
The problem is that Eclipse doesn't seem to support custom spacing between static and non-static groups.
mzayikin, nicolai86 and oliviercailloux
Metadata
Metadata
Assignees
Labels
lang:javaThe Java languageThe Java language