Skip to content

Commit

Permalink
Issue #5941: remove all unnecessary tabs
Browse files Browse the repository at this point in the history
  • Loading branch information
rnveach authored and romani committed Jul 1, 2019
1 parent 5f53ed3 commit 0bdbf15
Show file tree
Hide file tree
Showing 57 changed files with 513 additions and 513 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,10 @@ boolean fooMethodWithIf(String stringStringStringStringLooooongString, //indent:
} //indent:6 exp:6

boolean fooReturn() { //indent:6 exp:6
return conditionFirst("Loooooooooooooooooong", new //indent:8 exp:8
return conditionFirst("Loooooooooooooooooong", new //indent:8 exp:8
SecondClassLongNam4("Loooooooooooooooooog"). //indent:12 exp:12
getInteger(new FooReturnClass(), "Loooooooooooooooooog"), //indent:16 exp:>=12
new InnerClassFoo()); //indent:19 exp:>=12
getInteger(new FooReturnClass(), "Loooooooooooooooooog"), //indent:16 exp:>=12
new InnerClassFoo()); //indent:19 exp:>=12
} //indent:6 exp:6
}; //indent:4 exp:4
} //indent:2 exp:2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ void fooMethodWithIf() { //indent:4 exp:4
conditionNoArg() || conditionNoArg()) {} //indent:14 exp:>=10

do { //indent:6 exp:6
/* Do smth*/ //indent:8 exp:8
/* Do smth*/ //indent:8 exp:8
} while (conditionSecond(10000000000.0, new //indent:6 exp:6
SecondWhileLongNam1("Looooooooooooo" //indent:10 exp:10
+ "oooooooooooong").getString(new FooWhileClass(), //indent:10 exp:10
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,10 @@ boolean fooMethodWithIf(String stringStringStringStringLooooongString, //indent:
} //indent:6 exp:6

boolean fooReturn() { //indent:6 exp:6
return conditionFirst("Loooooooooooooooooong", new //indent:8 exp:8
return conditionFirst("Loooooooooooooooooong", new //indent:8 exp:8
SecondClassLongName("Loooooooooooooooooog"). //indent:12 exp:12
getInteger(new FooReturnClass(), "Loooooooooooooooooog"), //indent:16 exp:>=12
new InnerClassFoo()); //indent:19 exp:>=12
getInteger(new FooReturnClass(), "Loooooooooooooooooog"), //indent:16 exp:>=12
new InnerClassFoo()); //indent:19 exp:>=12
} //indent:6 exp:6
}; //indent:4 exp:4
} //indent:2 exp:2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ void fooMethodWithIf() { //indent:4 exp:4
conditionNoArg() || conditionNoArg()) {} //indent:14 exp:>=10

do { //indent:6 exp:6
/* Do smth*/ //indent:8 exp:8
/* Do smth*/ //indent:8 exp:8
} while (conditionSecond(10000000000.0, new //indent:6 exp:6
SecondWhileLongName("Looooooooooooo" //indent:10 exp:10
+ "oooooooooooong").getString(new FooWhileClass(), //indent:10 exp:10
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,10 @@ boolean fooMethodWithIf(String stringStringStringStringLooooongString, //indent:
} //indent:6 exp:6

boolean fooReturn() { //indent:6 exp:6
return conditionFirst("Loooooooooooooooooong", new //indent:8 exp:8
return conditionFirst("Loooooooooooooooooong", new //indent:8 exp:8
SecondClassLongName("Loooooooooooooooooog"). //indent:12 exp:12
getInteger(new FooReturnClass(), "Loooooooooooooooooog"), //indent:16 exp:>=12
new InnerClassFoo()); //indent:19 exp:>=12
getInteger(new FooReturnClass(), "Loooooooooooooooooog"), //indent:16 exp:>=12
new InnerClassFoo()); //indent:19 exp:>=12
} //indent:6 exp:6
}; //indent:4 exp:4
} //indent:2 exp:2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ void fooMethodWithIf() { //indent:4 exp:4
conditionNoArg() || conditionNoArg()) {} //indent:14 exp:>=10

do { //indent:6 exp:6
/* Do smth*/ //indent:8 exp:8
/* Do smth*/ //indent:8 exp:8
} while (conditionSecond(10000000000.0, new //indent:6 exp:6
SecondWhileLongName("Looooooooooooo" //indent:10 exp:10
+ "oooooooooooong").getString(new FooWhileClass(), //indent:10 exp:10
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public void method1(@MyAnnotation3 @MyAnnotation2 Object param1) {

@interface MyAnnotation1 {

String value();}
String value();}

@interface MyAnnotation2 {}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,102 +4,102 @@

public class InputAvoidEscapedUnicodeCharacters {

private String unitAbbrev2 = "\u03bcs";
private String unitAbbrev2 = "\u03bcs";

private String unitAbbrev3 = "\u03bcs"; // Greek letter mu
private String unitAbbrev3 = "\u03bcs"; // Greek letter mu

private String unitAbbrev4 = "\u03bcs"; // Greek letter mu
private String unitAbbrev4 = "\u03bcs"; // Greek letter mu

public Object fooString() {
String unitAbbrev = "μs";
String unitAbbrev2 = "\u03bcs";
String unitAbbrev3 = "\u03bcs"; // Greek letter mu, "s"
String fakeUnicode = "asd\tsasd";
String fakeUnicode2 = "\\u23\\u123i\\u";
String content = null;
return "\ufeff" + content; // byte order mark
}
public Object fooString() {
String unitAbbrev = "μs";
String unitAbbrev2 = "\u03bcs";
String unitAbbrev3 = "\u03bcs"; // Greek letter mu, "s"
String fakeUnicode = "asd\tsasd";
String fakeUnicode2 = "\\u23\\u123i\\u";
String content = null;
return "\ufeff" + content; // byte order mark
}

public Object fooChar() {
char unitAbbrev2 = '\u03bc';
char unitAbbrev3 = '\u03bc'; // Greek letter mu, "s"
char content = 0;
return '\ufeff' + content; // byte order mark
}
public Object fooChar() {
char unitAbbrev2 = '\u03bc';
char unitAbbrev3 = '\u03bc'; // Greek letter mu, "s"
char content = 0;
return '\ufeff' + content; // byte order mark
}

public void multiplyString() {
String unitAbbrev2 = "asd\u03bcsasd";
String unitAbbrev3 = "aBc\u03bcssdf\u03bc"; /* Greek letter mu, "s" */
String unitAbbrev4 = "\u03bcaBc\u03bcssdf\u03bc";
String allCharactersEscaped = "\u03bc\u03bc";
}
public void multiplyString() {
String unitAbbrev2 = "asd\u03bcsasd";
String unitAbbrev3 = "aBc\u03bcssdf\u03bc"; /* Greek letter mu, "s" */
String unitAbbrev4 = "\u03bcaBc\u03bcssdf\u03bc";
String allCharactersEscaped = "\u03bc\u03bc";
}

private static String abbreviate(TimeUnit unit) {
switch (unit) {
case NANOSECONDS:
return "ns";
case MICROSECONDS:
return "\u03bcs"; // μs
case MILLISECONDS:
return "ms";
case SECONDS:
return "s";
case MINUTES:
return "min";
case HOURS:
return "h";
case DAYS:
return "d";
default:
throw new AssertionError();
}
}
private static String abbreviate(TimeUnit unit) {
switch (unit) {
case NANOSECONDS:
return "ns";
case MICROSECONDS:
return "\u03bcs"; // μs
case MILLISECONDS:
return "ms";
case SECONDS:
return "s";
case MINUTES:
return "min";
case HOURS:
return "h";
case DAYS:
return "d";
default:
throw new AssertionError();
}
}

static final String WHITESPACE_TABLE = ""
+ "\u2002\u3000\r\u0085\u200A\u2005\u2000\u3000\\"
+ "\u2029\u000B\u3000\u2008\u2003\u205F\u3000\u1680"
+ "\u0009\u0020\u2006\u2001\u202F\u00A0\u000C\u2009"
+ "\u3000\u2004\u3000\u3000\u2028\n\u2007\u3000";
static final String WHITESPACE_TABLE = ""
+ "\u2002\u3000\r\u0085\u200A\u2005\u2000\u3000\\"
+ "\u2029\u000B\u3000\u2008\u2003\u205F\u3000\u1680"
+ "\u0009\u0020\u2006\u2001\u202F\u00A0\u000C\u2009"
+ "\u3000\u2004\u3000\u3000\u2028\n\u2007\u3000";

public boolean matches(char c) {
switch (c) {
case '\t':
case '\n':
case '\013':
case '\f':
case '\r':
case ' ':
case '\u0085': // some comment
case '\u1680':
case '\u2028':
case '\u2029':
case '\u205f':
case '\u3000':
return true;
case '\u2007':
return false;
default:
return c >= '\u2000' && c <= '\u200a';
}
}
public boolean matches(char c) {
switch (c) {
case '\t':
case '\n':
case '\013':
case '\f':
case '\r':
case ' ':
case '\u0085': // some comment
case '\u1680':
case '\u2028':
case '\u2029':
case '\u205f':
case '\u3000':
return true;
case '\u2007':
return false;
default:
return c >= '\u2000' && c <= '\u200a';
}
}

private String unitAbbrev5 = "\u03bcs"; // comment is separated by space + tab
private String unitAbbrev6 = "\u03bcs"; // comment is separated by tab
private String unitAbbrev7 = "\u03bcs"; /* comment is separated by tab */
private String unitAbbrev8 = "\u03bcs"; /* comment
has 2 lines */
void foo() {
for (char c = '\u0000'; c < '\uffff'; c++) {
if (c == '\u001b' || // ESC
c == '\u2014') // Em-Dash?
continue;
}
}
private String unitAbbrev9 = "\u03bcs"; /* comment */ int i;
private String unitAbbrev5 = "\u03bcs"; // comment is separated by space + tab
private String unitAbbrev6 = "\u03bcs"; // comment is separated by tab
private String unitAbbrev7 = "\u03bcs"; /* comment is separated by tab */
private String unitAbbrev8 = "\u03bcs"; /* comment
has 2 lines */
void foo() {
for (char c = '\u0000'; c < '\uffff'; c++) {
if (c == '\u001b' || // ESC
c == '\u2014') // Em-Dash?
continue;
}
}
private String unitAbbrev9 = "\u03bcs"; /* comment */ int i;

private String notAUnicodeEscaped1 = "\\u1234";
private String notAUnicodeEscaped1 = "\\u1234";

private String notAUnicodeEscaped2 = "\\\\u1234";
private String notAUnicodeEscaped2 = "\\\\u1234";

private String onlyEscaped = "\\\u1234";
private String onlyEscaped = "\\\u1234";
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,29 +10,29 @@

class InputEmptyBlockSemantic2
{
public void fooMethod()
{
int a = 1;
if (a == 1) {} //is not OK
char[] s = {'1', '2'};
int index = 2;
if (doSideEffect() == 1) {} //is not OK,
while ((a = index - 1) != 0) {} // is OK
for (; index < s.length && s[index] != 'x'; index++) {} // is OK
if (a == 1) {} else {System.identityHashCode("a");} // is not OK
switch (a) {} //warn
switch (a) { //ok
public void fooMethod()
{
int a = 1;
if (a == 1) {} //is not OK
char[] s = {'1', '2'};
int index = 2;
if (doSideEffect() == 1) {} //is not OK,
while ((a = index - 1) != 0) {} // is OK
for (; index < s.length && s[index] != 'x'; index++) {} // is OK
if (a == 1) {} else {System.identityHashCode("a");} // is not OK
switch (a) {} //warn
switch (a) { //ok
case 1:
a = 2;
case 2:
a = 3;
default:
a = 0;
}
}
}

public int doSideEffect()
{
return 1;
}
public int doSideEffect()
{
return 1;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,10 @@ void method2()
*/
class FooCtor
{
int i;
public FooCtor()
int i;
public FooCtor()
{
i = 1;
i = 1;
}}

/**
Expand All @@ -116,9 +116,9 @@ public FooCtor()
*/
class FooMethod
{
public void fooMethod()
public void fooMethod()
{
int i = 1;
int i = 1;
}}

/**
Expand All @@ -127,12 +127,12 @@ public void fooMethod()
*/
class FooInner
{
class InnerFoo
class InnerFoo
{
public void fooInnerMethod ()
public void fooInnerMethod ()
{

}
}
}}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ else if (x < 0) {
for (int k = 0; k < 1; k++) { String innerBlockVariable = ""; }

for (int k = 0; k < 1; k++) {}
return a;
return a;
}

static { int x = 1; }
Expand Down

0 comments on commit 0bdbf15

Please sign in to comment.