From 431b5c6ede6496555ef433dd47cd429a3143c9e2 Mon Sep 17 00:00:00 2001 From: Dulma Churchill Date: Wed, 5 Jul 2017 08:20:08 -0700 Subject: [PATCH] [linters] Disable filtering by path in debug or no-filtering mode Reviewed By: ryanrhee Differential Revision: D5369250 fbshipit-source-id: 88e5289 --- infer/src/clang/cFrontend_errors.ml | 4 +++- infer/tests/codetoanalyze/objc/linters-for-test-only/Makefile | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/infer/src/clang/cFrontend_errors.ml b/infer/src/clang/cFrontend_errors.ml index e7e9564f6..e395923dc 100644 --- a/infer/src/clang/cFrontend_errors.ml +++ b/infer/src/clang/cFrontend_errors.ml @@ -52,7 +52,9 @@ let filter_parsed_linters_by_path parsed_linters source_file = let filter_parsed_linters parsed_linters source_file = let linters = filter_parsed_linters_developer parsed_linters in - filter_parsed_linters_by_path linters source_file + if (Config.debug_mode || not Config.filtering) then + linters (* do not filter by path if in debug or no filtering mode *) + else filter_parsed_linters_by_path linters source_file let pp_linters fmt linters = let pp_linter fmt {issue_desc={name}} = diff --git a/infer/tests/codetoanalyze/objc/linters-for-test-only/Makefile b/infer/tests/codetoanalyze/objc/linters-for-test-only/Makefile index d5f76c19b..334e80131 100644 --- a/infer/tests/codetoanalyze/objc/linters-for-test-only/Makefile +++ b/infer/tests/codetoanalyze/objc/linters-for-test-only/Makefile @@ -9,7 +9,7 @@ TESTS_DIR = ../../.. ANALYZER = linters CLANG_OPTIONS = -fobjc-arc -c -INFER_OPTIONS = --cxx --linters-def-file linters_example.al --no-filtering --debug-exceptions --project-root $(TESTS_DIR) --no-failures-allowed +INFER_OPTIONS = --cxx --linters-def-file linters_example.al --project-root $(TESTS_DIR) --no-failures-allowed INFERPRINT_OPTIONS = --issues-tests SOURCES = \