From 62be37f163aa4f28e32042910e0cb3f538dd3d0a Mon Sep 17 00:00:00 2001 From: Jeremy Dubreil Date: Sun, 7 May 2017 19:10:55 -0700 Subject: [PATCH] [infer] parse the classpath information from the javac command line Summary: Pass the classpath infromation from the javac command line option file to allow the dection of errors accros Buck targets Reviewed By: sblackshear Differential Revision: D5018329 fbshipit-source-id: cf13198 --- infer/src/base/CommandLineOption.ml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/infer/src/base/CommandLineOption.ml b/infer/src/base/CommandLineOption.ml index 83369fb7b..b74c6e973 100644 --- a/infer/src/base/CommandLineOption.ml +++ b/infer/src/base/CommandLineOption.ml @@ -777,9 +777,6 @@ let args_env_var = "INFER_ARGS" let extra_env_args = ref [] -let extend_env_args args = - extra_env_args := List.rev_append args !extra_env_args - let extend_env_args args = extra_env_args := List.rev_append args !extra_env_args @@ -792,8 +789,9 @@ let parse_args ~usage ?parse_all action args0 = then (* for now, we only need to parse -d. we could parse more if we wanted to, but we would risk incurring the wrath of ARGUMENT_LIST_TOO_LONG *) - let should_parse = - String.is_prefix ~prefix:"-" in + let should_parse = function + | "-d" | "-cp" | "-classpath" -> true + | _ -> false in let fname = String.slice arg 1 (String.length arg) in match In_channel.read_lines fname with | lines ->