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
According to
http://google-styleguide.googlecode.com/svn/trunk/javaguide.html#s3.3.3-import-o
rdering-and-spacing
"Import statements are divided into the following groups, in this order, with
each group separated by a single blank line:
1. All static imports in a single group ..."
static imports should come first. But in intellij-java-google-style.xml they
are listed as last:
https://code.google.com/p/google-styleguide/source/browse/trunk/intellij-java-go
ogle-style.xml#251
Steps to reproduce
1. Open the attached Test.java in IntelliJ
2. In IntelliJ IDEA, do Reformat Code (CTRL+ALT+L on Windows)
3. Check "Organize Import" and "Rearrange Entries"
4. Click OK
What is the expected output?
package test;
import static java.lang.System.out;
import java.text.NumberFormat;
public class Test {
public void test() {
out.println(NumberFormat.getInstance().format(Math.PI));
}
}
What do you see instead?
package test;
import java.text.NumberFormat;
import static java.lang.System.out;
public class Test {
public void test() {
out.println(NumberFormat.getInstance().format(Math.PI));
}
}
What version of the product are you using?
* r134 of intellij-java-google-style.xml
* IntelliJ IDEA 13.03
* JRE 1.7.0_40-b43 x86
On what operating system?
* Windows 7 Enterprise (V 6.1 SP1)
Please provide any additional information below.
I attached the corrected intellij-java-google-style.xml to places the static
imports first as per the code style.
Original issue reported on code.google.com by [email protected] on 8 Jul 2014 at 5:39
The IntelliJ XML settings file for Google Style seems to have a lot other
errors as well. Expected: Line width limited to 100 characters. Actual: No
specification.
This configuration file hasn't been updated since 2011, while the Eclipse file
has been steadily updated over time. Could we please update this?
I second (or 4th) this: we have developers working with IntelliJ and Eclipse
and it doesn't make sense to have constant reformats because of this
inconsistency.
Original issue reported on code.google.com by
[email protected]
on 8 Jul 2014 at 5:39Attachments:
The text was updated successfully, but these errors were encountered: