From 39c00d557eaa3d7e6f2621fabfaedcaf6ff6f026 Mon Sep 17 00:00:00 2001 From: Nikos Gorogiannis Date: Fri, 12 Feb 2021 01:23:55 -0800 Subject: [PATCH] [infer] change filter semantics to included or not excluded Summary: As per title. Reviewed By: ezgicicek Differential Revision: D26340077 fbshipit-source-id: 3fffc9db9 --- infer/src/IR/inferconfig.ml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/infer/src/IR/inferconfig.ml b/infer/src/IR/inferconfig.ml index 10d38b7be..314af2397 100644 --- a/infer/src/IR/inferconfig.ml +++ b/infer/src/IR/inferconfig.ml @@ -331,8 +331,7 @@ let load_filters () = let filters_from_inferconfig inferconfig : filters = let path_filter = let whitelist_filter : path_filter = - if List.is_empty inferconfig.whitelist then default_path_filter - else is_matching (List.map ~f:Str.regexp inferconfig.whitelist) + is_matching (List.map ~f:Str.regexp inferconfig.whitelist) in let blacklist_filter : path_filter = is_matching (List.map ~f:Str.regexp inferconfig.blacklist) @@ -346,8 +345,8 @@ let filters_from_inferconfig inferconfig : filters = function | source_file -> whitelist_filter source_file - && (not (blacklist_filter source_file)) - && not (blacklist_files_containing_filter source_file) + || (not (blacklist_filter source_file)) + && not (blacklist_files_containing_filter source_file) in let error_filter = function | error_name ->