diff --git a/infer/src/base/Config.ml b/infer/src/base/Config.ml index 10b73a7fc..8c31fd776 100644 --- a/infer/src/base/Config.ml +++ b/infer/src/base/Config.ml @@ -705,6 +705,11 @@ and annotation_reachability_custom_pairs = Example format: for custom annotations com.my.annotation.{Source1,Source2,Sink1} { "sources" : ["Source1", "Source2"], "sink" : "Sink1" }|} +and append_buck_flavors = + CLOpt.mk_string_list ~long:"append-buck-flavors" + ~in_help:CLOpt.([(Capture, manual_buck_flavors)]) + "Additional Buck flavors to append to targets discovered by the $(b,--buck-compilation-database) option." + and array_level = CLOpt.mk_int ~deprecated:["arraylevel"] ~long:"array-level" ~default:0 ~meta:"int" {|Level of treating the array indexing and pointer arithmetic: @@ -1868,6 +1873,8 @@ and annotation_reachability = !annotation_reachability and annotation_reachability_custom_pairs = !annotation_reachability_custom_pairs +and append_buck_flavors = !append_buck_flavors + and array_level = !array_level and ast_file = !ast_file diff --git a/infer/src/base/Config.mli b/infer/src/base/Config.mli index 7c0adab9e..8c764d87b 100644 --- a/infer/src/base/Config.mli +++ b/infer/src/base/Config.mli @@ -74,6 +74,8 @@ val anonymous_block_num_sep : string val anonymous_block_prefix : string +val append_buck_flavors : string list + val assign : string val attributes_dir_name : string diff --git a/infer/src/integration/Buck.ml b/infer/src/integration/Buck.ml index 296078f15..de9fad74e 100644 --- a/infer/src/integration/Buck.ml +++ b/infer/src/integration/Buck.ml @@ -82,7 +82,7 @@ let call_buck_query_for_dependencies targets = "*** command failed:@\n*** %s@\n*** %s@." buck_query_cmd (Unix.Exit_or_signal.to_string_hum status) | Ok () - -> output + -> List.map ~f:(fun name -> string_of_target {name; flavors= Config.append_buck_flavors}) output let get_dependency_targets args = let targets, no_targets = List.partition_tf ~f:is_target_string args in