Put comments on each input in resources-noncompilable folder
This commit is contained in:
parent
f0bb06fddd
commit
a2f1f3ecb3
|
|
@ -250,9 +250,7 @@ public class CustomImportOrderCheckTest extends BaseCheckTestSupport
|
|||
checkConfig.addAttribute("sortImportsInGroupAlphabetically", "true");
|
||||
|
||||
final String[] expected = {
|
||||
"5: Wrong lexicographical order for 'java.awt.Button.ABORT' import.",
|
||||
"8: Import statement is in the wrong order. Should be in the 'STANDARD_JAVA_PACKAGE' group.",
|
||||
"9: Import statement is in the wrong order. Should be in the 'STANDARD_JAVA_PACKAGE' group.",
|
||||
"7: Wrong lexicographical order for 'java.awt.Button.ABORT' import.",
|
||||
"10: Import statement is in the wrong order. Should be in the 'STANDARD_JAVA_PACKAGE' group.",
|
||||
"11: Import statement is in the wrong order. Should be in the 'STANDARD_JAVA_PACKAGE' group.",
|
||||
"12: Import statement is in the wrong order. Should be in the 'STANDARD_JAVA_PACKAGE' group.",
|
||||
|
|
@ -261,7 +259,9 @@ public class CustomImportOrderCheckTest extends BaseCheckTestSupport
|
|||
"15: Import statement is in the wrong order. Should be in the 'STANDARD_JAVA_PACKAGE' group.",
|
||||
"16: Import statement is in the wrong order. Should be in the 'STANDARD_JAVA_PACKAGE' group.",
|
||||
"17: Import statement is in the wrong order. Should be in the 'STANDARD_JAVA_PACKAGE' group.",
|
||||
"21: Wrong lexicographical order for 'com.google.common.*' import.",
|
||||
"18: Import statement is in the wrong order. Should be in the 'STANDARD_JAVA_PACKAGE' group.",
|
||||
"19: Import statement is in the wrong order. Should be in the 'STANDARD_JAVA_PACKAGE' group.",
|
||||
"23: Wrong lexicographical order for 'com.google.common.*' import.",
|
||||
};
|
||||
|
||||
verify(checkConfig, new File("src/test/resources-noncompilable/com/puppycrawl/tools/"
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
//Compilable with Java8
|
||||
public interface MyInterface {
|
||||
|
||||
final int k = 5; //WARNING
|
||||
|
||||
default int defaultMethod(final int x) {
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
//Compilable with Java8
|
||||
package com.puppycrawl.tools.checkstyle;
|
||||
import java.util.Comparator;
|
||||
public interface InputModifier2 extends Comparator<Integer> {
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
//Compilable with Java8
|
||||
public interface InputStaticModifierInInterface
|
||||
{
|
||||
static int f()
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
//Compilable with Java8
|
||||
package com.puppycrawl.tools.checkstyle.coding;
|
||||
|
||||
public interface JsonTranslator {
|
||||
|
||||
String toJson(Response one, Response two, Response three);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
//Compilable with Java8
|
||||
package com.puppycrawl.tools.checkstyle.coding;
|
||||
|
||||
|
||||
import com.sun.corba.se.impl.protocol.giopmsgheaders.Message;
|
||||
|
||||
public class InputIllegalInstantiationCheckTest2
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* No package here.
|
||||
* No package here. Compilable by javac, but noncompilable by eclipse
|
||||
*/
|
||||
public class InputNoPackage {
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,9 +1,12 @@
|
|||
package com.puppycrawl.tools.checkstyle.grammars;
|
||||
|
||||
import java.util.Arrays;
|
||||
;
|
||||
;
|
||||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
* Compilable by javac, but noncompilable by eclipse due to
|
||||
* this <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=425140">bug</a>
|
||||
*/
|
||||
public class SemicolonBetweenImports
|
||||
{
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
//Compilable with Java8
|
||||
package com.puppycrawl.tools.checkstyle.grammars.java8;
|
||||
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
//Compilable with Java8
|
||||
package com.puppycrawl.tools.checkstyle.grammars.java8;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
//Compilable with Java8
|
||||
package com.puppycrawl.tools.checkstyle.grammars.java8;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
//Compilable with Java8
|
||||
package com.puppycrawl.tools.checkstyle.grammars.java8;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
//Compilable with Java8
|
||||
package com.puppycrawl.tools.checkstyle.grammars.java8;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
//Compilable with Java8
|
||||
package com.puppycrawl.tools.checkstyle.grammars.java8;
|
||||
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Target;
|
||||
import java.util.List;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
//Compilable with Java8
|
||||
package com.puppycrawl.tools.checkstyle.grammars.java8;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Target;
|
||||
import java.util.List;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
//Compilable with Java8
|
||||
package com.puppycrawl.tools.checkstyle.grammars.java8;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Target;
|
||||
import java.util.Map;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
//Compilable with Java8
|
||||
package com.puppycrawl.tools.checkstyle.grammars.java8;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Target;
|
||||
import java.util.List;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
//Compilable with Java8
|
||||
package com.puppycrawl.tools.checkstyle.grammars.java8;
|
||||
|
||||
public interface InputDefaultMethodsTest {
|
||||
|
||||
default public void doSomething(){
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
//Compilable with Java8
|
||||
package com.puppycrawl.tools.checkstyle.grammars.java8;
|
||||
|
||||
public class InputLambdaTest1 {
|
||||
|
||||
static Runnable r1 = ()->System.out.println("Hello world one!");
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
//Compilable with Java8
|
||||
package com.puppycrawl.tools.checkstyle.grammars.java8;
|
||||
|
||||
public class InputLambdaTest10 {
|
||||
|
||||
public static void testVoidLambda(TestOfVoidLambdas test) {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
//Compilable with Java8
|
||||
package com.puppycrawl.tools.checkstyle.grammars.java8;
|
||||
|
||||
public class InputLambdaTest11 {
|
||||
|
||||
public static void testVoidLambda(TestOfVoidLambdas test) {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
//Compilable with Java8
|
||||
package com.puppycrawl.tools.checkstyle.grammars.java8;
|
||||
|
||||
public class InputLambdaTest12 {
|
||||
|
||||
public static void testVoidLambda(TestOfVoidLambdas test) {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
//Compilable with Java8
|
||||
package com.puppycrawl.tools.checkstyle.grammars.java8;
|
||||
|
||||
public class InputLambdaTest13 {
|
||||
|
||||
public static void testVoidLambda(TestOfVoidLambdas test) {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
//Compilable with Java8
|
||||
package com.puppycrawl.tools.checkstyle.grammars.java8;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
//Compilable with Java8
|
||||
package com.puppycrawl.tools.checkstyle.grammars.java8;
|
||||
import java.util.function.Function;
|
||||
|
||||
public class InputLambdaTest15
|
||||
{
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
//Compilable with Java8
|
||||
package com.puppycrawl.tools.checkstyle.grammars.java8;
|
||||
|
||||
import java.time.chrono.ChronoLocalDate;
|
||||
import java.time.chrono.ChronoLocalDateTime;
|
||||
import java.util.Comparator;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
//Compilable with Java8
|
||||
import java.util.function.Supplier;
|
||||
|
||||
public class InputLambdaTest17{
|
||||
|
||||
void initPartialTraversalState() {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
//Compilable with Java8
|
||||
import java.util.function.Predicate;
|
||||
|
||||
public class InputLambdaTest19 {
|
||||
|
||||
static <T> Predicate<T> isEqual(Object targetRef) {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
//Compilable with Java8
|
||||
package com.puppycrawl.tools.checkstyle.grammars.java8;
|
||||
|
||||
public class InputLambdaTest2 {
|
||||
|
||||
public static void testVoidLambda(TestOfVoidLambdas test) {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
//Compilable with Java8
|
||||
package com.puppycrawl.tools.checkstyle.grammars.java8;
|
||||
|
||||
public class InputLambdaTest3 {
|
||||
|
||||
public static void testVoidLambda(TestOfVoidLambdas test) {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
//Compilable with Java8
|
||||
package com.puppycrawl.tools.checkstyle.grammars.java8;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
//Compilable with Java8
|
||||
package com.puppycrawl.tools.checkstyle.grammars.java8;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
//Compilable with Java8
|
||||
package com.puppycrawl.tools.checkstyle.grammars.java8;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
//Compilable with Java8
|
||||
package com.puppycrawl.tools.checkstyle.grammars.java8;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
//Compilable with Java8
|
||||
package com.puppycrawl.tools.checkstyle.grammars.java8;
|
||||
|
||||
public class InputLambdaTest8 {
|
||||
public static void testVoidLambda(TestOfVoidLambdas test) {
|
||||
System.out.println("Method called");
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
//Compilable with Java8
|
||||
package com.puppycrawl.tools.checkstyle.grammars.java8;
|
||||
|
||||
public class InputLambdaTest9 {
|
||||
public static void testVoidLambda(TestOfVoidLambdas test) {
|
||||
System.out.println("Method called");
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
//Compilable with Java8
|
||||
package com.puppycrawl.tools.checkstyle.grammars.java8;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.function.Supplier;
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
//Compilable with Java8
|
||||
package com.puppycrawl.tools.checkstyle.grammars.java8;
|
||||
import java.util.function.Function;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
import com.sun.corba.se.impl.protocol.giopmsgheaders.Message;
|
||||
|
||||
public class InputMethodReferencesTest2
|
||||
{
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
//Compilable with Java8
|
||||
package com.puppycrawl.tools.checkstyle.grammars.java8;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
public static class InputMethodReferencesTest3
|
||||
{
|
||||
public static class SomeClass {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
//Moved to noncompilable because UT requires imports from the same package
|
||||
package java.util.concurrent;
|
||||
|
||||
import com.google.common.*;
|
||||
import java.util.StringTokenizer;
|
||||
import java.util.*;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
//Moved to noncompilable because UT requires imports from the same package
|
||||
package java.util.concurrent;
|
||||
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.List;
|
||||
import java.util.regex.Matcher;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
//Compilable by javac, but noncompilable by eclipse
|
||||
|
||||
//////////////////////////////////////////
|
||||
//Some header
|
||||
//////////////////////////////////////////
|
||||
|
|
@ -22,4 +24,4 @@ import com.google.common.*;
|
|||
import org.apache.*;
|
||||
|
||||
public class InputImportOrder {
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue