[infer][nullsafe] rename the option to run the Nullsafe checker

Reviewed By: ngorogiannis

Differential Revision: D13352004

fbshipit-source-id: 4be2e361c
master
Jeremy Dubreil 6 years ago committed by Facebook Github Bot
parent 98d05044fb
commit 69af58506d

@ -46,15 +46,6 @@ OPTIONS
reactive analysis should start. Source files should be specified reactive analysis should start. Source files should be specified
relative to project root or be absolute relative to project root or be absolute
--check-nullable
Activates: checks that values annotated with nullable are always
checked for null before dereference (Conversely:
--no-check-nullable)
--check-nullable-only
Activates: Enable --check-nullable and disable all other checkers
(Conversely: --no-check-nullable-only)
--class-loads --class-loads
Activates: Java class loading analysis (Conversely: Activates: Java class loading analysis (Conversely:
--no-class-loads) --no-class-loads)
@ -194,6 +185,14 @@ OPTIONS
Activates: Enable --loop-hoisting and disable all other checkers Activates: Enable --loop-hoisting and disable all other checkers
(Conversely: --no-loop-hoisting-only) (Conversely: --no-loop-hoisting-only)
--nullsafe
Activates: [EXPERIMENTAL] Nullable type checker (incomplete: use
--eradicate for now) (Conversely: --no-nullsafe)
--nullsafe-only
Activates: Enable --nullsafe and disable all other checkers
(Conversely: --no-nullsafe-only)
--no-ownership --no-ownership
Deactivates: the detection of C++ lifetime bugs (Conversely: Deactivates: the detection of C++ lifetime bugs (Conversely:
--ownership) --ownership)

@ -134,15 +134,6 @@ OPTIONS
reactive analysis should start. Source files should be specified reactive analysis should start. Source files should be specified
relative to project root or be absolute See also infer-analyze(1) and infer-diff(1). relative to project root or be absolute See also infer-analyze(1) and infer-diff(1).
--check-nullable
Activates: checks that values annotated with nullable are always
checked for null before dereference (Conversely:
--no-check-nullable) See also infer-analyze(1).
--check-nullable-only
Activates: Enable --check-nullable and disable all other checkers
(Conversely: --no-check-nullable-only) See also infer-analyze(1).
--clang-biniou-file file --clang-biniou-file file
Specify a file containing the AST of the program, in biniou format Specify a file containing the AST of the program, in biniou format
See also infer-capture(1). See also infer-capture(1).
@ -571,6 +562,14 @@ OPTIONS
(default: cf) (default: cf)
See also infer-analyze(1). See also infer-analyze(1).
--nullsafe
Activates: [EXPERIMENTAL] Nullable type checker (incomplete: use
--eradicate for now) (Conversely: --no-nullsafe) See also infer-analyze(1).
--nullsafe-only
Activates: Enable --nullsafe and disable all other checkers
(Conversely: --no-nullsafe-only) See also infer-analyze(1).
--only-show --only-show
Activates: Show the list of reports and exit (Conversely: Activates: Show the list of reports and exit (Conversely:
--no-only-show) See also infer-explore(1). --no-only-show) See also infer-explore(1).

@ -134,15 +134,6 @@ OPTIONS
reactive analysis should start. Source files should be specified reactive analysis should start. Source files should be specified
relative to project root or be absolute See also infer-analyze(1) and infer-diff(1). relative to project root or be absolute See also infer-analyze(1) and infer-diff(1).
--check-nullable
Activates: checks that values annotated with nullable are always
checked for null before dereference (Conversely:
--no-check-nullable) See also infer-analyze(1).
--check-nullable-only
Activates: Enable --check-nullable and disable all other checkers
(Conversely: --no-check-nullable-only) See also infer-analyze(1).
--clang-biniou-file file --clang-biniou-file file
Specify a file containing the AST of the program, in biniou format Specify a file containing the AST of the program, in biniou format
See also infer-capture(1). See also infer-capture(1).
@ -571,6 +562,14 @@ OPTIONS
(default: cf) (default: cf)
See also infer-analyze(1). See also infer-analyze(1).
--nullsafe
Activates: [EXPERIMENTAL] Nullable type checker (incomplete: use
--eradicate for now) (Conversely: --no-nullsafe) See also infer-analyze(1).
--nullsafe-only
Activates: Enable --nullsafe and disable all other checkers
(Conversely: --no-nullsafe-only) See also infer-analyze(1).
--only-show --only-show
Activates: Show the list of reports and exit (Conversely: Activates: Show the list of reports and exit (Conversely:
--no-only-show) See also infer-explore(1). --no-only-show) See also infer-explore(1).

@ -588,7 +588,6 @@ and analyzer =
and ( annotation_reachability and ( annotation_reachability
, biabduction , biabduction
, bufferoverrun , bufferoverrun
, check_nullable
, class_loads , class_loads
, cost , cost
, crashcontext , crashcontext
@ -599,6 +598,7 @@ and ( annotation_reachability
, litho , litho
, liveness , liveness
, loop_hoisting , loop_hoisting
, nullsafe
, ownership , ownership
, printf_args , printf_args
, pulse , pulse
@ -630,9 +630,6 @@ and ( annotation_reachability
mk_checker ~long:"biabduction" ~default:true mk_checker ~long:"biabduction" ~default:true
"the separation logic based bi-abduction analysis using the checkers framework" "the separation logic based bi-abduction analysis using the checkers framework"
and bufferoverrun = mk_checker ~long:"bufferoverrun" "the buffer overrun analysis" and bufferoverrun = mk_checker ~long:"bufferoverrun" "the buffer overrun analysis"
and check_nullable =
mk_checker ~long:"check-nullable"
"checks that values annotated with nullable are always checked for null before dereference"
and class_loads = mk_checker ~long:"class-loads" ~default:false "Java class loading analysis" and class_loads = mk_checker ~long:"class-loads" ~default:false "Java class loading analysis"
and cost = mk_checker ~long:"cost" ~default:false "checker for performance cost analysis" and cost = mk_checker ~long:"cost" ~default:false "checker for performance cost analysis"
and crashcontext = and crashcontext =
@ -652,6 +649,9 @@ and ( annotation_reachability
and liveness = and liveness =
mk_checker ~long:"liveness" ~default:true "the detection of dead stores and unused variables" mk_checker ~long:"liveness" ~default:true "the detection of dead stores and unused variables"
and loop_hoisting = mk_checker ~long:"loop-hoisting" ~default:false "checker for loop-hoisting" and loop_hoisting = mk_checker ~long:"loop-hoisting" ~default:false "checker for loop-hoisting"
and nullsafe =
mk_checker ~long:"nullsafe" ~deprecated:["-check-nullable"]
"[EXPERIMENTAL] Nullable type checker (incomplete: use --eradicate for now)"
and ownership = mk_checker ~long:"ownership" ~default:true "the detection of C++ lifetime bugs" and ownership = mk_checker ~long:"ownership" ~default:true "the detection of C++ lifetime bugs"
and printf_args = and printf_args =
mk_checker ~long:"printf-args" ~default:true mk_checker ~long:"printf-args" ~default:true
@ -715,7 +715,6 @@ and ( annotation_reachability
( annotation_reachability ( annotation_reachability
, biabduction , biabduction
, bufferoverrun , bufferoverrun
, check_nullable
, class_loads , class_loads
, cost , cost
, crashcontext , crashcontext
@ -726,6 +725,7 @@ and ( annotation_reachability
, litho , litho
, liveness , liveness
, loop_hoisting , loop_hoisting
, nullsafe
, ownership , ownership
, printf_args , printf_args
, pulse , pulse
@ -2531,7 +2531,7 @@ and capture_blacklist = !capture_blacklist
and changed_files_index = !changed_files_index and changed_files_index = !changed_files_index
and check_nullable = !check_nullable and nullsafe = !nullsafe
and check_version = !check_version and check_version = !check_version

@ -268,7 +268,7 @@ val captured_dir : string
val changed_files_index : string option val changed_files_index : string option
val check_nullable : bool val nullsafe : bool
val check_version : string option val check_version : string option

@ -34,7 +34,7 @@ let all_checkers =
; active= Config.annotation_reachability ; active= Config.annotation_reachability
; callbacks= [(Procedure AnnotationReachability.checker, Language.Java)] } ; callbacks= [(Procedure AnnotationReachability.checker, Language.Java)] }
; { name= "nullable checks" ; { name= "nullable checks"
; active= Config.check_nullable ; active= Config.nullsafe
; callbacks= ; callbacks=
[ (Procedure NullabilityCheck.checker, Language.Clang) [ (Procedure NullabilityCheck.checker, Language.Clang)
; (Procedure NullabilityCheck.checker, Language.Java) ] } ; (Procedure NullabilityCheck.checker, Language.Java) ] }

@ -45,8 +45,8 @@ depend:
cd .. && \ cd .. && \
ocamldep -native \ ocamldep -native \
-I IR -I absint -I atd -I backend -I base -I biabduction -I bufferoverrun -I checkers \ -I IR -I absint -I atd -I backend -I base -I biabduction -I bufferoverrun -I checkers \
-I clang -I concurrency -I nullsafe -I facebook -I integration -I istd \ -I clang -I concurrency -I facebook -I integration -I istd -I java \
-I java -I labs -I quandary -I unit -I unit/clang -I deadcode \ -I labs -I nullsafe -I quandary -I unit -I unit/clang -I deadcode \
$(ml_src_files) > deadcode/.depend $(ml_src_files) > deadcode/.depend
# circular dependency... not sure how to fix properly # circular dependency... not sure how to fix properly

@ -19,9 +19,9 @@ let source_dirs =
; "bufferoverrun" ; "bufferoverrun"
; "checkers" ; "checkers"
; "concurrency" ; "concurrency"
; "nullsafe"
; "integration" ; "integration"
; "labs" ; "labs"
; "nullsafe"
; "quandary" ; "quandary"
; "unit" ] ) ; "unit" ] )

@ -7,7 +7,7 @@
TESTS_DIR = ../../.. TESTS_DIR = ../../..
CLANG_OPTIONS = -c -x c++ -std=c++14 CLANG_OPTIONS = -c -x c++ -std=c++14
INFER_OPTIONS = --no-default-checkers --biabduction --check-nullable --project-root $(TESTS_DIR) INFER_OPTIONS = --no-default-checkers --biabduction --nullsafe --project-root $(TESTS_DIR)
INFERPRINT_OPTIONS = --issues-tests INFERPRINT_OPTIONS = --issues-tests
SOURCES = $(wildcard *.cpp) SOURCES = $(wildcard *.cpp)

@ -7,7 +7,7 @@ TESTS_DIR = ../../..
# see explanations in cpp/errors/Makefile for the custom isystem # see explanations in cpp/errors/Makefile for the custom isystem
CLANG_OPTIONS = -x c++ -std=c++11 -nostdinc++ -isystem$(ROOT_DIR) -isystem$(CLANG_INCLUDES)/c++/v1/ -c CLANG_OPTIONS = -x c++ -std=c++11 -nostdinc++ -isystem$(ROOT_DIR) -isystem$(CLANG_INCLUDES)/c++/v1/ -c
INFER_OPTIONS = --biabduction --suggest-nullable --check-nullable --debug-exceptions --project-root $(TESTS_DIR) INFER_OPTIONS = --biabduction --suggest-nullable --nullsafe --debug-exceptions --project-root $(TESTS_DIR)
INFERPRINT_OPTIONS = --issues-tests INFERPRINT_OPTIONS = --issues-tests
SOURCES = $(wildcard *.cpp) SOURCES = $(wildcard *.cpp)

@ -8,7 +8,7 @@ TESTS_DIR = ../../..
INFER_OPTIONS = \ INFER_OPTIONS = \
--debug-exceptions --no-default-checkers \ --debug-exceptions --no-default-checkers \
--annotation-reachability --fragment-retains-view --immutable-cast --printf-args --quandary \ --annotation-reachability --fragment-retains-view --immutable-cast --printf-args --quandary \
--suggest-nullable --check-nullable --racerd \ --suggest-nullable --nullsafe --racerd \
INFERPRINT_OPTIONS = --issues-tests INFERPRINT_OPTIONS = --issues-tests
SOURCES = $(wildcard *.java) $(wildcard $(TESTS_DIR)/external/library/*.java) SOURCES = $(wildcard *.java) $(wildcard $(TESTS_DIR)/external/library/*.java)

@ -6,7 +6,7 @@
TESTS_DIR = ../../.. TESTS_DIR = ../../..
CLANG_OPTIONS = -c $(OBJC_CLANG_OPTIONS) CLANG_OPTIONS = -c $(OBJC_CLANG_OPTIONS)
INFER_OPTIONS = --debug-exceptions --no-default-checkers --suggest-nullable --check-nullable --project-root $(TESTS_DIR) INFER_OPTIONS = --debug-exceptions --no-default-checkers --suggest-nullable --nullsafe --project-root $(TESTS_DIR)
INFERPRINT_OPTIONS = --issues-tests INFERPRINT_OPTIONS = --issues-tests
SOURCES = $(wildcard *.m) SOURCES = $(wildcard *.m)

@ -6,7 +6,7 @@
TESTS_DIR = ../../.. TESTS_DIR = ../../..
CLANG_OPTIONS = -c $(OBJCPP_CLANG_OPTIONS) CLANG_OPTIONS = -c $(OBJCPP_CLANG_OPTIONS)
INFER_OPTIONS = --debug-exceptions --no-default-checkers --suggest-nullable --check-nullable --project-root $(TESTS_DIR) INFER_OPTIONS = --debug-exceptions --no-default-checkers --suggest-nullable --nullsafe --project-root $(TESTS_DIR)
INFERPRINT_OPTIONS = --issues-tests INFERPRINT_OPTIONS = --issues-tests
SOURCES = $(wildcard *.mm) SOURCES = $(wildcard *.mm)

Loading…
Cancel
Save