[checkers] declare --resource-leak with the other checkers

Summary:
This generates `--resource-leak-only` automatically, and make the other
checkers' `-only` option work as expected with respect to `--resource-leak` too
(eg, `--resource-leak --biabduction-only` disables resource leak).

Reviewed By: jeremydubreil

Differential Revision: D6051134

fbshipit-source-id: 2d4a2ba
master
Jules Villard 7 years ago committed by Facebook Github Bot
parent 06a51869df
commit 3790ca5487

@ -604,6 +604,7 @@ and ( annotation_reachability
, printf_args
, quandary
, repeated_calls
, resource_leak
, siof
, threadsafety
, suggest_nullable ) =
@ -643,6 +644,7 @@ and ( annotation_reachability
"the detection of mismatch between the Java printf format strings and the argument types For, example, this checker will warn about the type error in `printf(\"Hello %d\", \"world\")`"
and repeated_calls = mk_checker ~long:"repeated-calls" "check for repeated calls"
and quandary = mk_checker ~long:"quandary" ~default:true "the quandary taint analysis"
and resource_leak = mk_checker ~long:"resource-leak" ""
and siof =
mk_checker ~long:"siof" ~default:true
"the Static Initialization Order Fiasco analysis (C++ only)"
@ -687,6 +689,7 @@ and ( annotation_reachability
, printf_args
, quandary
, repeated_calls
, resource_leak
, siof
, threadsafety
, suggest_nullable )
@ -1489,9 +1492,6 @@ and report_previous =
~in_help:CLOpt.([(ReportDiff, manual_generic)])
"Report of the base revision to use for comparison"
and resource_leak =
CLOpt.mk_bool ~long:"resource-leak" ~default:false "the resource leak analysis (experimental)"
and rest =
CLOpt.mk_rest_actions ~in_help:CLOpt.([(Capture, manual_generic); (Run, manual_generic)])
"Stop argument processing, use remaining arguments as a build command" ~usage:exe_usage

@ -8,7 +8,7 @@
TESTS_DIR = ../../..
ANALYZER = checkers
INFER_OPTIONS = --debug-exceptions --no-default-checkers --resource-leak
INFER_OPTIONS = --resource-leak-only --debug-exceptions
INFERPRINT_OPTIONS = --issues-tests
SOURCES = $(wildcard *.java)

Loading…
Cancel
Save