diff --git a/infer/lib/python/inferlib/bucklib.py b/infer/lib/python/inferlib/bucklib.py index 20def5d7e..9d1a77946 100644 --- a/infer/lib/python/inferlib/bucklib.py +++ b/infer/lib/python/inferlib/bucklib.py @@ -106,7 +106,7 @@ def get_normalized_targets(targets): # this expands the targets passed on the command line, then filters away # targets that are not Java/Android. you need to change this if you # care about something other than Java/Android - TARGET_TYPES = "kind('android_library|java_library', deps('%s'))" + TARGET_TYPES = "kind('^(android|java)_library$', deps('%s'))" BUCK_GET_JAVA_TARGETS = ['buck', 'query', TARGET_TYPES] buck_cmd = BUCK_GET_JAVA_TARGETS + targets diff --git a/infer/src/integration/Buck.ml b/infer/src/integration/Buck.ml index b118d98b0..1e05fc2c8 100644 --- a/infer/src/integration/Buck.ml +++ b/infer/src/integration/Buck.ml @@ -132,8 +132,8 @@ let parameters_with_argument = let get_accepted_buck_kinds_pattern () = - if Option.is_some Config.buck_compilation_database then "(apple|cxx)_(binary|library|test)" - else "(apple|cxx)_(binary|library)" + if Option.is_some Config.buck_compilation_database then "^(apple|cxx)_(binary|library|test)$" + else "^(apple|cxx)_(binary|library)$" let max_command_line_length = 50