diff --git a/Makefile b/Makefile index a09350193..ab1e1994d 100644 --- a/Makefile +++ b/Makefile @@ -186,7 +186,7 @@ endif ifneq ($(BUCK),no) -BUILD_SYSTEMS_TESTS += buck genrule genrulecapture buck_javac_jar +BUILD_SYSTEMS_TESTS += genrule genrulecapture endif ifneq ($(MVN),no) BUILD_SYSTEMS_TESTS += mvn diff --git a/infer/tests/build_systems/buck/.buckconfig b/infer/tests/build_systems/buck/.buckconfig deleted file mode 100644 index 250f76f47..000000000 --- a/infer/tests/build_systems/buck/.buckconfig +++ /dev/null @@ -1,9 +0,0 @@ -[buildfile] - includes = //DEFS - -[project] - ignore = .git, .ml, .mli - -[java] - source_level = 8 - target_level = 8 \ No newline at end of file diff --git a/infer/tests/build_systems/buck/.buckversion b/infer/tests/build_systems/buck/.buckversion deleted file mode 120000 index 0a46cf46a..000000000 --- a/infer/tests/build_systems/buck/.buckversion +++ /dev/null @@ -1 +0,0 @@ -../../../../.buckversion \ No newline at end of file diff --git a/infer/tests/build_systems/buck/DEFS b/infer/tests/build_systems/buck/DEFS deleted file mode 100644 index bebab3220..000000000 --- a/infer/tests/build_systems/buck/DEFS +++ /dev/null @@ -1,52 +0,0 @@ -import os - -original_java_library = java_library -def java_library( - name, - srcs=[], - **kwargs - ): - - original_java_library( - name=name, - srcs=srcs, - **kwargs - ) - - create_infer_genrule(name, srcs) - -original_android_library = android_library -def android_library( - name, - srcs=[], - **kwargs - ): - - original_android_library( - name=name, - srcs=srcs, - **kwargs - ) - - create_infer_genrule(name, srcs) - -def create_infer_genrule( - name, - srcs - ): - genrule_name = name + '_infer' - genrule( - name = genrule_name, - srcs=srcs, - cmd = ' '.join([ - os.getenv('INFER_BIN', 'infer'), - '--genrule-mode', - '--project-root', os.getenv('PROJECT_ROOT', os.environ['PWD']), - '--eradicate-only', - '--results-dir', '$OUT', - '--classpath', '$(classpath :{})'.format(name), - '--sourcepath', '$SRCDIR', - '--generated-classes', '$(location :{})'.format(name), - ]), - out = 'infer_out', - ) diff --git a/infer/tests/build_systems/buck/Makefile b/infer/tests/build_systems/buck/Makefile deleted file mode 100644 index 532377e84..000000000 --- a/infer/tests/build_systems/buck/Makefile +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright (c) Facebook, Inc. and its affiliates. -# -# This source code is licensed under the MIT license found in the -# LICENSE file in the root directory of this source tree. - -TESTS_DIR = ../.. - -BUCK_TARGET = //module2:module2 -INFER_OPTIONS = --eradicate --no-linters --buck-java-deprecated -INFERPRINT_OPTIONS = --issues-tests -CLEAN_EXTRA = buck-out -SOURCES = $(shell find . -name '*.java') - -include $(TESTS_DIR)/java.make -include $(TESTS_DIR)/infer.make - -infer-out/report.json: $(JAVA_DEPS) $(SOURCES) - $(QUIET)$(REMOVE_DIR) buck-out && \ - $(call silent_on_success,Testing Buck Java integration,\ - INFER_BIN=$(INFER_BIN) \ - $(INFER_BIN) $(INFER_OPTIONS) --results-dir $(CURDIR)/infer-out -- \ - $(BUCK) build --deep --no-cache $(BUCK_TARGET)) diff --git a/infer/tests/build_systems/buck/annotations/BUCK b/infer/tests/build_systems/buck/annotations/BUCK deleted file mode 100644 index bc0b50a7f..000000000 --- a/infer/tests/build_systems/buck/annotations/BUCK +++ /dev/null @@ -1,7 +0,0 @@ -java_library( - name='annotations', - srcs=['Nullable.java'], - visibility=[ - 'PUBLIC' - ], -) diff --git a/infer/tests/build_systems/buck/annotations/Nullable.java b/infer/tests/build_systems/buck/annotations/Nullable.java deleted file mode 100644 index f87c223c5..000000000 --- a/infer/tests/build_systems/buck/annotations/Nullable.java +++ /dev/null @@ -1,9 +0,0 @@ -/* - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -package genrule.annotations; - -public @interface Nullable {} diff --git a/infer/tests/build_systems/buck/issues.exp b/infer/tests/build_systems/buck/issues.exp deleted file mode 100644 index 7554d1b50..000000000 --- a/infer/tests/build_systems/buck/issues.exp +++ /dev/null @@ -1,22 +0,0 @@ -module1/Class1.java, genrule.module1.Class1.localNPE1():void, 1, ERADICATE_NULLABLE_DEREFERENCE, no_bucket, WARNING, [NullPointerException will be thrown at this line! `obj` is `null` and is dereferenced via calling `toString()`: null constant at line 24] -module1/Class1.java, genrule.module1.Class1.localNPE1():void, 1, NULL_DEREFERENCE, no_bucket, ERROR, [start of procedure localNPE1()] -module1/Class1.java, genrule.module1.Class1.unannotatedReturnNull():java.lang.Object, 0, ERADICATE_RETURN_NOT_NULLABLE, no_bucket, WARNING, [`unannotatedReturnNull()`: return type is declared non-nullable but the method returns `null`: null constant at line 33.] -module2/Class2.java, genrule.module2.Class2$Sub.subtypingInconsistency(java.lang.Object):java.lang.Object, 0, ERADICATE_INCONSISTENT_SUBCLASS_PARAMETER_ANNOTATION, no_bucket, WARNING, [First parameter `object` of method `Class2$Sub.subtypingInconsistency(...)` is not `@Nullable` but is declared `@Nullable`in the parent class method `Class1$Sub.subtypingInconsistency(...)`.] -module2/Class2.java, genrule.module2.Class2$Sub.subtypingInconsistency(java.lang.Object):java.lang.Object, 0, ERADICATE_INCONSISTENT_SUBCLASS_RETURN_ANNOTATION, no_bucket, WARNING, [Method `Class2$Sub.subtypingInconsistency(...)` is annotated with `@Nullable` but overrides unannotated method `Class1$Sub.subtypingInconsistency(...)`.] -module2/Class2.java, genrule.module2.Class2.dereferenceInterTargetField1Bad(genrule.module1.Class1):void, 0, ERADICATE_NULLABLE_DEREFERENCE, no_bucket, WARNING, [`class1.field1` is nullable and is not locally checked for null when calling `toString()`.] -module2/Class2.java, genrule.module2.Class2.dereferenceInterTargetField1Bad(genrule.module1.Class1):void, 0, NULL_DEREFERENCE, no_bucket, ERROR, [start of procedure dereferenceInterTargetField1Bad(...)] -module2/Class2.java, genrule.module2.Class2.dereferenceInterTargetField2Bad(genrule.module1.Class1):int, 0, ERADICATE_NULLABLE_DEREFERENCE, no_bucket, WARNING, [`class1.field2` is nullable and is not locally checked for null when accessing field `Class1.x`.] -module2/Class2.java, genrule.module2.Class2.dereferenceInterTargetField2Bad(genrule.module1.Class1):int, 0, NULL_DEREFERENCE, no_bucket, ERROR, [start of procedure dereferenceInterTargetField2Bad(...)] -module2/Class2.java, genrule.module2.Class2.dereferenceLocalNullableFieldBad():void, 0, ERADICATE_NULLABLE_DEREFERENCE, no_bucket, WARNING, [`Class2.field` is nullable and is not locally checked for null when calling `toString()`.] -module2/Class2.java, genrule.module2.Class2.dereferenceLocalNullableFieldBad():void, 0, NULL_DEREFERENCE, no_bucket, ERROR, [start of procedure dereferenceLocalNullableFieldBad()] -module2/Class2.java, genrule.module2.Class2.dereferenceUnannotatedMethodReturningNullBad(genrule.module1.Class1):void, 0, NULL_DEREFERENCE, no_bucket, ERROR, [start of procedure dereferenceUnannotatedMethodReturningNullBad(...),start of procedure unannotatedReturnNull(),return from a call to Object Class1.unannotatedReturnNull()] -module2/Class2.java, genrule.module2.Class2.followMethodDeclarationOnlyBad(genrule.module1.SkipImplementationClass1):void, 1, ERADICATE_NULLABLE_DEREFERENCE, no_bucket, WARNING, [`obj2` is nullable and is not locally checked for null when calling `toString()`: call to annotatedNullable() at line 39] -module2/Class2.java, genrule.module2.Class2.followMethodDeclarationOnlyBad(genrule.module1.SkipImplementationClass1):void, 1, NULL_DEREFERENCE, no_bucket, ERROR, [start of procedure followMethodDeclarationOnlyBad(...)] -module2/Class2.java, genrule.module2.Class2.interTargetAbstractNPEBad(genrule.module1.Class1):void, 1, ERADICATE_NULLABLE_DEREFERENCE, no_bucket, WARNING, [`obj` is nullable and is not locally checked for null when calling `toString()`: call to abstractMayReturnNull() at line 29] -module2/Class2.java, genrule.module2.Class2.interTargetAbstractNPEBad(genrule.module1.Class1):void, 1, NULL_DEREFERENCE, no_bucket, ERROR, [start of procedure interTargetAbstractNPEBad(...)] -module2/Class2.java, genrule.module2.Class2.interTargetNPEBad():void, 1, ERADICATE_NULLABLE_DEREFERENCE, no_bucket, WARNING, [`obj` is nullable and is not locally checked for null when calling `toString()`: call to returnsNull() at line 24] -module2/Class2.java, genrule.module2.Class2.interTargetNPEBad():void, 1, NULL_DEREFERENCE, no_bucket, ERROR, [start of procedure interTargetNPEBad(),start of procedure returnsNull(),return from a call to String Class1.returnsNull()] -module2/Class2.java, genrule.module2.Class2.interTargetNativeNPEBad(genrule.module1.Class1):void, 1, ERADICATE_NULLABLE_DEREFERENCE, no_bucket, WARNING, [`obj` is nullable and is not locally checked for null when calling `toString()`: call to nativeMayReturnNull() at line 34] -module2/Class2.java, genrule.module2.Class2.interTargetNativeNPEBad(genrule.module1.Class1):void, 1, NULL_DEREFERENCE, no_bucket, ERROR, [start of procedure interTargetNativeNPEBad(...)] -module2/Class2.java, genrule.module2.Class2.localNPE2Bad():void, 1, ERADICATE_NULLABLE_DEREFERENCE, no_bucket, WARNING, [NullPointerException will be thrown at this line! `obj` is `null` and is dereferenced via calling `toString()`: null constant at line 19] -module2/Class2.java, genrule.module2.Class2.localNPE2Bad():void, 1, NULL_DEREFERENCE, no_bucket, ERROR, [start of procedure localNPE2Bad()] diff --git a/infer/tests/build_systems/buck/module1/BUCK b/infer/tests/build_systems/buck/module1/BUCK deleted file mode 100644 index 4ac82ec7d..000000000 --- a/infer/tests/build_systems/buck/module1/BUCK +++ /dev/null @@ -1,10 +0,0 @@ -java_library( - name='module1', - srcs=glob(["*.java"]), - deps=[ - '//annotations:annotations', - ], - visibility=[ - 'PUBLIC' - ], -) diff --git a/infer/tests/build_systems/buck/module1/Class1.java b/infer/tests/build_systems/buck/module1/Class1.java deleted file mode 100644 index 418840bc7..000000000 --- a/infer/tests/build_systems/buck/module1/Class1.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -package genrule.module1; - -import genrule.annotations.Nullable; - -public abstract class Class1 { - - public @Nullable Object field1; - - public int x; - public @Nullable Class1 field2; - - public static @Nullable String returnsNull() { - return null; - } - - void localNPE1() { - Object obj = null; - obj.toString(); - } - - public abstract @Nullable Object abstractMayReturnNull(); - - public native @Nullable Object nativeMayReturnNull(); - - public Object unannotatedReturnNull() { - return null; - } - - public static class Sub { - public Object subtypingInconsistency(@Nullable Object object) { - return new Object(); - } - } -} diff --git a/infer/tests/build_systems/buck/module1/SkipImplementationClass1.java b/infer/tests/build_systems/buck/module1/SkipImplementationClass1.java deleted file mode 100644 index d5b060418..000000000 --- a/infer/tests/build_systems/buck/module1/SkipImplementationClass1.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -// _SHOULD_SKIP_IMPLEMENTATION_ - -package genrule.module1; - -import genrule.annotations.Nullable; - -public class SkipImplementationClass1 { - - public @Nullable Object annotatedNullable() { - return new Object(); - } - - public Object notAnnotatedNullable() { - return null; - } -} diff --git a/infer/tests/build_systems/buck/module2/BUCK b/infer/tests/build_systems/buck/module2/BUCK deleted file mode 100644 index 33f3d881f..000000000 --- a/infer/tests/build_systems/buck/module2/BUCK +++ /dev/null @@ -1,8 +0,0 @@ -java_library( - name='module2', - srcs=glob(["*.java"]), - deps=[ - '//module1:module1', - '//annotations:annotations', - ] -) diff --git a/infer/tests/build_systems/buck/module2/Class2.java b/infer/tests/build_systems/buck/module2/Class2.java deleted file mode 100644 index 013577507..000000000 --- a/infer/tests/build_systems/buck/module2/Class2.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -package genrule.module2; - -import genrule.annotations.Nullable; -import genrule.module1.Class1; -import genrule.module1.SkipImplementationClass1; - -public class Class2 { - - @Nullable Object field; - - void localNPE2Bad() { - Object obj = null; - obj.toString(); - } - - void interTargetNPEBad() { - Object obj = Class1.returnsNull(); - obj.toString(); - } - - void interTargetAbstractNPEBad(Class1 class1) { - Object obj = class1.abstractMayReturnNull(); - obj.toString(); - } - - void interTargetNativeNPEBad(Class1 class1) { - Object obj = class1.nativeMayReturnNull(); - obj.toString(); - } - - void followMethodDeclarationOnlyBad(SkipImplementationClass1 obj1) { - Object obj2 = obj1.annotatedNullable(); - obj2.toString(); - } - - void followMethodDeclarationOnlyOk(SkipImplementationClass1 obj1) { - Object obj2 = obj1.notAnnotatedNullable(); - obj2.toString(); - } - - void dereferenceLocalNullableFieldBad() { - field.toString(); - } - - void dereferenceInterTargetField1Bad(Class1 class1) { - class1.field1.toString(); - } - - int dereferenceInterTargetField2Bad(Class1 class1) { - return class1.field2.x; - } - - void dereferenceUnannotatedMethodReturningNullBad(Class1 class1) { - class1.unannotatedReturnNull().toString(); - } - - static class Sub extends Class1.Sub { - @Override - public @Nullable Object subtypingInconsistency(Object object) { - return null; - } - } -} diff --git a/infer/tests/build_systems/buck_cross_module/.buckconfig b/infer/tests/build_systems/buck_cross_module/.buckconfig deleted file mode 100644 index 250f76f47..000000000 --- a/infer/tests/build_systems/buck_cross_module/.buckconfig +++ /dev/null @@ -1,9 +0,0 @@ -[buildfile] - includes = //DEFS - -[project] - ignore = .git, .ml, .mli - -[java] - source_level = 8 - target_level = 8 \ No newline at end of file diff --git a/infer/tests/build_systems/buck_cross_module/.buckversion b/infer/tests/build_systems/buck_cross_module/.buckversion deleted file mode 120000 index 0a46cf46a..000000000 --- a/infer/tests/build_systems/buck_cross_module/.buckversion +++ /dev/null @@ -1 +0,0 @@ -../../../../.buckversion \ No newline at end of file diff --git a/infer/tests/build_systems/buck_cross_module/DEFS b/infer/tests/build_systems/buck_cross_module/DEFS deleted file mode 100644 index bebab3220..000000000 --- a/infer/tests/build_systems/buck_cross_module/DEFS +++ /dev/null @@ -1,52 +0,0 @@ -import os - -original_java_library = java_library -def java_library( - name, - srcs=[], - **kwargs - ): - - original_java_library( - name=name, - srcs=srcs, - **kwargs - ) - - create_infer_genrule(name, srcs) - -original_android_library = android_library -def android_library( - name, - srcs=[], - **kwargs - ): - - original_android_library( - name=name, - srcs=srcs, - **kwargs - ) - - create_infer_genrule(name, srcs) - -def create_infer_genrule( - name, - srcs - ): - genrule_name = name + '_infer' - genrule( - name = genrule_name, - srcs=srcs, - cmd = ' '.join([ - os.getenv('INFER_BIN', 'infer'), - '--genrule-mode', - '--project-root', os.getenv('PROJECT_ROOT', os.environ['PWD']), - '--eradicate-only', - '--results-dir', '$OUT', - '--classpath', '$(classpath :{})'.format(name), - '--sourcepath', '$SRCDIR', - '--generated-classes', '$(location :{})'.format(name), - ]), - out = 'infer_out', - ) diff --git a/infer/tests/build_systems/buck_cross_module/Makefile b/infer/tests/build_systems/buck_cross_module/Makefile deleted file mode 100644 index f0b5f68bc..000000000 --- a/infer/tests/build_systems/buck_cross_module/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# Copyright (c) Facebook, Inc. and its affiliates. -# -# This source code is licensed under the MIT license found in the -# LICENSE file in the root directory of this source tree. - -TESTS_DIR = ../.. - -BUCK_TARGET = //module2:module2 -INFERPRINT_OPTIONS = --issues-tests -CLEAN_EXTRA = buck-out -SOURCES = $(shell find . -name '*.java') - -include $(TESTS_DIR)/java.make -include $(TESTS_DIR)/infer.make - -infer-out/report.json: $(JAVA_DEPS) $(JAVA_SOURCE_FILES) - $(QUIET)$(REMOVE_DIR) buck-out && \ - $(call silent_on_success,Testing Buck Java cross module integration,\ - INFER_BIN=$(INFER_BIN) \ - $(INFER_BIN) --buck-java-deprecated --results-dir $(CURDIR)/infer-out -- \ - $(BUCK) build --no-cache $(BUCK_TARGET)) diff --git a/infer/tests/build_systems/buck_cross_module/annotations/BUCK b/infer/tests/build_systems/buck_cross_module/annotations/BUCK deleted file mode 100644 index bc0b50a7f..000000000 --- a/infer/tests/build_systems/buck_cross_module/annotations/BUCK +++ /dev/null @@ -1,7 +0,0 @@ -java_library( - name='annotations', - srcs=['Nullable.java'], - visibility=[ - 'PUBLIC' - ], -) diff --git a/infer/tests/build_systems/buck_cross_module/annotations/Nullable.java b/infer/tests/build_systems/buck_cross_module/annotations/Nullable.java deleted file mode 100644 index f87c223c5..000000000 --- a/infer/tests/build_systems/buck_cross_module/annotations/Nullable.java +++ /dev/null @@ -1,9 +0,0 @@ -/* - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -package genrule.annotations; - -public @interface Nullable {} diff --git a/infer/tests/build_systems/buck_cross_module/issues.exp b/infer/tests/build_systems/buck_cross_module/issues.exp deleted file mode 100644 index de4d4ef00..000000000 --- a/infer/tests/build_systems/buck_cross_module/issues.exp +++ /dev/null @@ -1,2 +0,0 @@ -module2/Class2.java, crossmodule.module2.Class2.crossModuleNPE1():void, 1, NULL_DEREFERENCE, no_bucket, ERROR, [start of procedure crossModuleNPE1(),start of procedure returnsNull(),return from a call to String Class1.returnsNull()] -module2/Class2.java, crossmodule.module2.Class2.crossModuleNPE2(crossmodule.module1.Class1):void, 1, NULL_DEREFERENCE, no_bucket, ERROR, [start of procedure crossModuleNPE2(...)] diff --git a/infer/tests/build_systems/buck_cross_module/module1/BUCK b/infer/tests/build_systems/buck_cross_module/module1/BUCK deleted file mode 100644 index f828d55ef..000000000 --- a/infer/tests/build_systems/buck_cross_module/module1/BUCK +++ /dev/null @@ -1,10 +0,0 @@ -java_library( - name='module1', - srcs=['Class1.java'], - deps=[ - '//annotations:annotations', - ], - visibility=[ - 'PUBLIC' - ], -) diff --git a/infer/tests/build_systems/buck_cross_module/module1/Class1.java b/infer/tests/build_systems/buck_cross_module/module1/Class1.java deleted file mode 100644 index 3cc5ed0b8..000000000 --- a/infer/tests/build_systems/buck_cross_module/module1/Class1.java +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -package crossmodule.module1; - -import genrule.annotations.Nullable; - -public class Class1 { - - public static String returnsNull() { - return null; - } - - @Nullable public Object nullableField; -} diff --git a/infer/tests/build_systems/buck_cross_module/module2/BUCK b/infer/tests/build_systems/buck_cross_module/module2/BUCK deleted file mode 100644 index 783d8b20d..000000000 --- a/infer/tests/build_systems/buck_cross_module/module2/BUCK +++ /dev/null @@ -1,7 +0,0 @@ -java_library( - name='module2', - srcs=['Class2.java'], - deps=[ - '//module1:module1' - ] -) diff --git a/infer/tests/build_systems/buck_cross_module/module2/Class2.java b/infer/tests/build_systems/buck_cross_module/module2/Class2.java deleted file mode 100644 index a71e0d430..000000000 --- a/infer/tests/build_systems/buck_cross_module/module2/Class2.java +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -package crossmodule.module2; - -import crossmodule.module1.Class1; - -public class Class2 { - - void crossModuleNPE1() { - Class1.returnsNull().toString(); - } - - void crossModuleNPE2(Class1 c) { - c.nullableField.toString(); - } -} diff --git a/infer/tests/build_systems/buck_javac_jar/.buckconfig b/infer/tests/build_systems/buck_javac_jar/.buckconfig deleted file mode 100644 index 8f67ce98e..000000000 --- a/infer/tests/build_systems/buck_javac_jar/.buckconfig +++ /dev/null @@ -1,2 +0,0 @@ -[tools] - javac_jar = /dev/null diff --git a/infer/tests/build_systems/buck_javac_jar/.buckversion b/infer/tests/build_systems/buck_javac_jar/.buckversion deleted file mode 120000 index 0a46cf46a..000000000 --- a/infer/tests/build_systems/buck_javac_jar/.buckversion +++ /dev/null @@ -1 +0,0 @@ -../../../../.buckversion \ No newline at end of file diff --git a/infer/tests/build_systems/buck_javac_jar/Makefile b/infer/tests/build_systems/buck_javac_jar/Makefile deleted file mode 100644 index f4f843073..000000000 --- a/infer/tests/build_systems/buck_javac_jar/Makefile +++ /dev/null @@ -1,26 +0,0 @@ -# Copyright (c) Facebook, Inc. and its affiliates. -# -# This source code is licensed under the MIT license found in the -# LICENSE file in the root directory of this source tree. - -TESTS_DIR = ../.. -ROOT_DIR = $(TESTS_DIR)/../.. - -TARGET = //src:target -SOURCES = src/UsingJavacJar.java -OBJECTS = buck-out/gen/src/lib__target__output/target.jar -BUCKCONFIG = .buckconfig -INFER_OPTIONS = --eradicate-only --buck-java-deprecated -INFERPRINT_OPTIONS = --issues-tests -CLEAN_EXTRA = buck-out - -include $(TESTS_DIR)/infer.make - -$(OBJECTS): $(SOURCES) $(BUCKCONFIG) - $(TESTLOCK) $(BUCK) build --config tools.javac_jar= $(TARGET) - -infer-out/report.json: $(JAVA_DEPS) $(SOURCES) $(BUCKCONFIG) - $(QUIET)$(REMOVE_DIR) buck-out && \ - $(call silent_on_success,Testing Buck Java integration with javac_jar,\ - INFER_BIN=$(INFER_BIN) \ - $(INFER_BIN) $(INFER_OPTIONS) -- $(BUCK) build $(TARGET)) diff --git a/infer/tests/build_systems/buck_javac_jar/issues.exp b/infer/tests/build_systems/buck_javac_jar/issues.exp deleted file mode 100644 index 385eee6dc..000000000 --- a/infer/tests/build_systems/buck_javac_jar/issues.exp +++ /dev/null @@ -1 +0,0 @@ -src/UsingJavacJar.java, UsingJavacJar.foo():java.lang.Object, 0, ERADICATE_RETURN_NOT_NULLABLE, no_bucket, WARNING, [`foo()`: return type is declared non-nullable but the method returns `null`: null constant at line 10.] diff --git a/infer/tests/build_systems/buck_javac_jar/src/BUCK b/infer/tests/build_systems/buck_javac_jar/src/BUCK deleted file mode 100644 index b40bf5cc9..000000000 --- a/infer/tests/build_systems/buck_javac_jar/src/BUCK +++ /dev/null @@ -1,4 +0,0 @@ -java_library( - name = 'target', - srcs = glob(['*.java']), -) diff --git a/infer/tests/build_systems/buck_javac_jar/src/UsingJavacJar.java b/infer/tests/build_systems/buck_javac_jar/src/UsingJavacJar.java deleted file mode 100644 index c1636fb9c..000000000 --- a/infer/tests/build_systems/buck_javac_jar/src/UsingJavacJar.java +++ /dev/null @@ -1,12 +0,0 @@ -/* - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -public class UsingJavacJar { - - Object foo() { - return null; - } -}