Summary: This makes sure that the javac_jar is disabled when setting the external compiler option to point at the Infer wrapper Closes #976 Reviewed By: jvillard Differential Revision: D9193336 fbshipit-source-id: abafb51fcmaster
parent
987ef9ef67
commit
bdbb8242cf
@ -0,0 +1,2 @@
|
|||||||
|
[tools]
|
||||||
|
javac_jar = /dev/null
|
@ -0,0 +1,27 @@
|
|||||||
|
# Copyright (c) 2018-present, Facebook, Inc.
|
||||||
|
#
|
||||||
|
# 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)/../..
|
||||||
|
|
||||||
|
ANALYZER = checkers
|
||||||
|
TARGET = //src:target
|
||||||
|
SOURCES = src/UsingJavacJar.java
|
||||||
|
OBJECTS = buck-out/gen/src/lib__target__output/target.jar
|
||||||
|
BUCKCONFIG = .buckconfig
|
||||||
|
INFER_OPTIONS = --eradicate-only
|
||||||
|
INFERPRINT_OPTIONS = --issues-tests
|
||||||
|
CLEAN_EXTRA = buck-out
|
||||||
|
|
||||||
|
include $(TESTS_DIR)/infer.make
|
||||||
|
|
||||||
|
$(OBJECTS): $(SOURCES) $(BUCKCONFIG)
|
||||||
|
$(BUCK) build --config tools.javac_jar= $(TARGET)
|
||||||
|
|
||||||
|
infer-out/report.json: $(SOURCES) $(BUCKCONFIG)
|
||||||
|
$(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))
|
@ -0,0 +1 @@
|
|||||||
|
src/UsingJavacJar.java, Object UsingJavacJar.foo(), 0, ERADICATE_RETURN_NOT_NULLABLE, no_bucket, WARNING, [origin,Method `foo()` may return null but it is not annotated with `@Nullable`. (Origin: null constant at line 10)]
|
@ -0,0 +1,4 @@
|
|||||||
|
java_library(
|
||||||
|
name = 'target',
|
||||||
|
srcs = glob(['*.java']),
|
||||||
|
)
|
@ -0,0 +1,12 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2018-present, Facebook, Inc.
|
||||||
|
*
|
||||||
|
* 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;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in new issue