[infer][build] enable the OCaml compiler unused value declaration warning

Summary: This help when refactoring and removing code

Reviewed By: jvillard

Differential Revision: D5515933

fbshipit-source-id: 4de50fa
master
Jeremy Dubreil 7 years ago committed by Facebook Github Bot
parent c6ee53de50
commit 7680c83f45

@ -24,7 +24,7 @@ ATDGEN_SUFFIXES = _t.ml _t.mli _j.ml _j.mli
GENERATED_OCAML_SOURCES_GLOB = <*{clang_plugin/*,backend/jsonbug_*,checkers/stacktree_*}>
OCAML_FATAL_WARNINGS = +3+5+6+8+10+11+12+18+19+20+21+23+26+29+27+33+34+35+37+38+39+50+52+57
OCAML_FATAL_WARNINGS = +3+5+6+8+10+11+12+18+19+20+21+23+26+29+27+32+33+34+35+37+38+39+50+52+57
# options for ocamlbuild
# Notice that use-ocamlfind is used here to avoid a linker bug in ocamlbuild when using -tag thread
@ -38,7 +38,7 @@ OCAMLBUILD_OPTIONS = \
-cflags -principal \
-cflags -strict-formats \
-cflags -strict-sequence \
-cflags -w,$(OCAML_FATAL_WARNINGS)-4-9-32-40-41-42-45-48 \
-cflags -w,$(OCAML_FATAL_WARNINGS)-4-9-40-41-42-45-48 \
-tag-line "$(GENERATED_OCAML_SOURCES_GLOB): warn(-27-32-34-35-39)" \
-tag-line "not $(GENERATED_OCAML_SOURCES_GLOB) and <*/{,*/}*.{ml,re}{,i}>: package(ppx_compare)" \
-tag-line "not $(GENERATED_OCAML_SOURCES_GLOB) and not <*{base/IList,base/IStd}.*>: open(IStd)" \

@ -1914,6 +1914,8 @@ and debug_exceptions = !debug_exceptions
and debug_mode = !debug
and default_checkers = !default_checkers
and default_linters = !default_linters
and dependency_mode = !dependencies

@ -105,6 +105,8 @@ val relative_cpp_models_dir : string
val csl_analysis : bool
val default_checkers : bool
val default_failure_name : string
val default_in_zip_results_dir : string

@ -181,10 +181,6 @@ module Bound = struct
let of_int : int -> t = fun n -> Linear (n, SymLinear.empty)
let zero = of_int 0
let one = of_int 1
let minus_one = of_int (-1)
let _255 = of_int 255

@ -1174,7 +1174,7 @@ let report_thread_safety_violation tenv pdesc ~make_description ~conflicts acces
let trace_of_pname = trace_of_pname access pdesc in
Option.iter ~f:report_one_path (PathDomain.get_reportable_sink_path access ~trace_of_pname)
let report_unannotated_interface_violation tenv pdesc access reported_pname =
let _report_unannotated_interface_violation tenv pdesc access reported_pname =
match reported_pname with
| Typ.Procname.Java java_pname
-> let class_name = Typ.Procname.java_get_class_name java_pname in

@ -248,8 +248,6 @@ module AnnotationSpec = struct
(* The default sanitizer does not sanitize anything *)
let default_sanitizer _ _ = false
(* The default report function does not report anything *)
let default_report _ _ = ()
end
module StandardAnnotationSpec = struct

@ -510,18 +510,6 @@ let mode_of_build_command build_cmd =
| BAnt | BBuck | BGradle | BNdk | BXcode as build_system
-> PythonCapture (build_system, build_cmd)
let get_mode () =
match Config.generated_classes with
| _ when Config.maven
-> (* infer is pretending to be javac in the Maven integration *)
let build_args = match Array.to_list Sys.argv with _ :: args -> args | [] -> [] in
Javac (Javac.Javac, "javac", build_args)
| Some path
-> assert_supported_mode `Java "Buck genrule" ;
BuckGenrule path
| None
-> mode_of_build_command (List.rev Config.rest)
let mode_from_command_line =
( lazy
( match Config.generated_classes with

@ -33,8 +33,6 @@ module MockTrace = Trace.Make (struct
if String.is_prefix ~prefix:"SINK" (Typ.Procname.to_string pname) then
Some (CallSite.make pname Location.dummy, IntSet.singleton 0)
else None
let indexes _ = IntSet.empty
end)
let should_report _ _ = false

Loading…
Cancel
Save