Put comments on each input in resources-noncompilable folder

This commit is contained in:
alexkravin 2014-12-10 14:25:13 +04:00 committed by Roman Ivanov
parent f0bb06fddd
commit a2f1f3ecb3
42 changed files with 51 additions and 44 deletions

View File

@ -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/"

View File

@ -1,5 +1,5 @@
//Compilable with Java8
public interface MyInterface {
final int k = 5; //WARNING
default int defaultMethod(final int x) {

View File

@ -1,3 +1,4 @@
//Compilable with Java8
package com.puppycrawl.tools.checkstyle;
import java.util.Comparator;
public interface InputModifier2 extends Comparator<Integer> {

View File

@ -1,3 +1,4 @@
//Compilable with Java8
public interface InputStaticModifierInInterface
{
static int f()

View File

@ -1,5 +1,5 @@
//Compilable with Java8
package com.puppycrawl.tools.checkstyle.coding;
public interface JsonTranslator {
String toJson(Response one, Response two, Response three);

View File

@ -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

View File

@ -1,5 +1,5 @@
/**
* No package here.
* No package here. Compilable by javac, but noncompilable by eclipse
*/
public class InputNoPackage {
}

View File

@ -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
{
}

View File

@ -1,6 +1,6 @@
//Compilable with Java8
package com.puppycrawl.tools.checkstyle.grammars.java8;
import java.lang.annotation.ElementType;
import java.lang.annotation.Target;

View File

@ -1,5 +1,5 @@
//Compilable with Java8
package com.puppycrawl.tools.checkstyle.grammars.java8;
import java.lang.annotation.ElementType;
import java.lang.annotation.Target;

View File

@ -1,5 +1,5 @@
//Compilable with Java8
package com.puppycrawl.tools.checkstyle.grammars.java8;
import java.lang.annotation.ElementType;
import java.lang.annotation.Target;

View File

@ -1,5 +1,5 @@
//Compilable with Java8
package com.puppycrawl.tools.checkstyle.grammars.java8;
import java.lang.annotation.ElementType;
import java.lang.annotation.Target;

View File

@ -1,5 +1,5 @@
//Compilable with Java8
package com.puppycrawl.tools.checkstyle.grammars.java8;
import java.lang.annotation.ElementType;
import java.lang.annotation.Target;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -1,5 +1,5 @@
//Compilable with Java8
package com.puppycrawl.tools.checkstyle.grammars.java8;
public interface InputDefaultMethodsTest {
default public void doSomething(){

View File

@ -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!");

View File

@ -1,5 +1,5 @@
//Compilable with Java8
package com.puppycrawl.tools.checkstyle.grammars.java8;
public class InputLambdaTest10 {
public static void testVoidLambda(TestOfVoidLambdas test) {

View File

@ -1,5 +1,5 @@
//Compilable with Java8
package com.puppycrawl.tools.checkstyle.grammars.java8;
public class InputLambdaTest11 {
public static void testVoidLambda(TestOfVoidLambdas test) {

View File

@ -1,5 +1,5 @@
//Compilable with Java8
package com.puppycrawl.tools.checkstyle.grammars.java8;
public class InputLambdaTest12 {
public static void testVoidLambda(TestOfVoidLambdas test) {

View File

@ -1,5 +1,5 @@
//Compilable with Java8
package com.puppycrawl.tools.checkstyle.grammars.java8;
public class InputLambdaTest13 {
public static void testVoidLambda(TestOfVoidLambdas test) {

View File

@ -1,5 +1,5 @@
//Compilable with Java8
package com.puppycrawl.tools.checkstyle.grammars.java8;
import java.util.Arrays;
import java.util.List;

View File

@ -1,6 +1,6 @@
//Compilable with Java8
package com.puppycrawl.tools.checkstyle.grammars.java8;
import java.util.function.Function;
public class InputLambdaTest15
{

View File

@ -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;

View File

@ -1,5 +1,5 @@
//Compilable with Java8
import java.util.function.Supplier;
public class InputLambdaTest17{
void initPartialTraversalState() {

View File

@ -1,5 +1,5 @@
//Compilable with Java8
import java.util.function.Predicate;
public class InputLambdaTest19 {
static <T> Predicate<T> isEqual(Object targetRef) {

View File

@ -1,5 +1,5 @@
//Compilable with Java8
package com.puppycrawl.tools.checkstyle.grammars.java8;
public class InputLambdaTest2 {
public static void testVoidLambda(TestOfVoidLambdas test) {

View File

@ -1,5 +1,5 @@
//Compilable with Java8
package com.puppycrawl.tools.checkstyle.grammars.java8;
public class InputLambdaTest3 {
public static void testVoidLambda(TestOfVoidLambdas test) {

View File

@ -1,5 +1,5 @@
//Compilable with Java8
package com.puppycrawl.tools.checkstyle.grammars.java8;
import java.util.Arrays;
import java.util.List;

View File

@ -1,5 +1,5 @@
//Compilable with Java8
package com.puppycrawl.tools.checkstyle.grammars.java8;
import java.util.Arrays;
import java.util.List;

View File

@ -1,5 +1,5 @@
//Compilable with Java8
package com.puppycrawl.tools.checkstyle.grammars.java8;
import java.util.Arrays;
import java.util.List;

View File

@ -1,5 +1,5 @@
//Compilable with Java8
package com.puppycrawl.tools.checkstyle.grammars.java8;
import java.util.Arrays;
import java.util.List;

View File

@ -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");

View File

@ -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");

View File

@ -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;

View File

@ -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
{

View File

@ -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 {

View File

@ -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.*;

View File

@ -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;

View File

@ -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 {
}
}