Validate buck linters used with compilation database

Reviewed By: jvillard

Differential Revision: D8933070

fbshipit-source-id: d3f59c083
master
Katie Ots 6 years ago committed by Facebook Github Bot
parent 2d889791e2
commit d86737946c

@ -485,6 +485,12 @@ let mode_of_build_command build_cmd =
XcodeXcpretty (prog, args)
| BBuck when not Config.flavors && Config.reactive_mode ->
L.die UserError "The Buck Java integration does not support --reactive@."
| BBuck
when Option.is_none Config.buck_compilation_database && Config.flavors && Config.linters ->
L.user_warning
"WARNING: the linters require --buck-compilation-database to be set.@ Alternatively, \
set --no-linters to disable them and this warning.@." ;
PythonCapture (BBuck, build_cmd)
| (BAnt | BBuck | BGradle | BNdk | BXcode) as build_system ->
PythonCapture (build_system, build_cmd)

@ -10,7 +10,7 @@ ANALYZER = checkers
BUCK_TARGET = //infer/tests/build_systems/genrule/module2:module2
SOURCES = $(wildcard $(TESTS_DIR)/codetoanalyze/java/infer/*.java)
OBJECTS = $(ROOT_DIR)/buck-out/gen/infer/tests/build_systems/genrule/module2/lib__module2__output/module2.jar
INFER_OPTIONS = --eradicate
INFER_OPTIONS = --eradicate --no-linters
INFERPRINT_OPTIONS = --project-root $(ROOT_DIR) --issues-tests
CLEAN_EXTRA = $(ROOT_DIR)/buck-out

@ -10,7 +10,7 @@ ANALYZER = checkers
BUCK_TARGET = //src:hello @buck_target.txt
SOURCES = $(wildcard src/*.c) $(wildcard src/subtarget1/*.c) $(wildcard src/subtarget2/*.c)
OBJECTS = buck-out/gen/src/hello\#compile-hello.c.o1f717d69,default/hello.c.o
INFER_OPTIONS = --report-custom-error --developer-mode --project-root $(TESTS_DIR)
INFER_OPTIONS = --report-custom-error --developer-mode --project-root $(TESTS_DIR) --no-linters
INFERPRINT_OPTIONS = --project-root $(TESTS_DIR) --issues-tests
CLEAN_EXTRA = buck-out

@ -10,7 +10,7 @@ ANALYZER = checkers
BUCK_TARGET = //src:hello
SOURCES = $(wildcard src/hello.c)
OBJECTS = buck-out/gen/src/hello\#compile-hello.c.o1f717d69,default/hello.c.o
INFER_OPTIONS = --report-custom-error --project-root $(TESTS_DIR)
INFER_OPTIONS = --report-custom-error --project-root $(TESTS_DIR) --no-linters
INFERPRINT_OPTIONS = --project-root $(TESTS_DIR) --issues-tests
CLEAN_EXTRA = buck-out capture_hash-1.sha capture_hash-2.sha

@ -13,7 +13,7 @@ include $(TESTS_DIR)/differential.make
$(CURRENT_REPORT) $(PREVIOUS_REPORT): $(CLANG_DEPS)
BUCK_TARGET = //src:hello
INFER_OPTIONS = $(DIFFERENTIAL_ARGS) --flavors --reactive --debug-exceptions
INFER_OPTIONS = $(DIFFERENTIAL_ARGS) --flavors --reactive --debug-exceptions --no-linters
SRC_DIR = $(CURDIR)/../codetoanalyze
.PHONY: compare_reports

@ -10,7 +10,7 @@ ANALYZER = checkers
BUCK_TARGET = //src:hello
SOURCES = src/hello.c src/hello2.c
OBJECTS = buck-out/gen/src/hello\#compile-hello.c.o1f717d69,default/hello.c.o
INFER_OPTIONS = --report-custom-error --developer-mode --project-root $(TESTS_DIR)
INFER_OPTIONS = --report-custom-error --developer-mode --project-root $(TESTS_DIR) --no-linters
INFERPRINT_OPTIONS = --project-root $(TESTS_DIR) --issues-tests
CLEAN_EXTRA = buck-out

Loading…
Cancel
Save