From 22013a007b53e8328045d367937a4e97064ded46 Mon Sep 17 00:00:00 2001 From: jrm Date: Mon, 11 Jan 2016 21:51:19 -0800 Subject: [PATCH] Buck integration: Infer should always use the javac out directory when running the analysis from the javac commands Summary: public In the case of Buck, the integration works by using the out directory of javac in order to store the analysis artifacts in the jar file. Making buck call: infer -o infer_out -- javac -d classes_out ... instead of every javac command is having no effect and is the same as Buck running: infer -- javac -d classes_out ... Reviewed By: sblackshear Differential Revision: D2822642 fb-gh-sync-id: b13e067 --- infer/lib/python/BuckAnalyze | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/infer/lib/python/BuckAnalyze b/infer/lib/python/BuckAnalyze index db4f2373b..3783e8159 100755 --- a/infer/lib/python/BuckAnalyze +++ b/infer/lib/python/BuckAnalyze @@ -79,9 +79,6 @@ def prepare_build(args): if args.debug_exceptions: infer_options += ['--debug-exceptions', '--no-filtering'] - if args.infer_out is not None: - infer_options += ['--out', args.infer_out] - # Create a temporary directory as a cache for jar files. infer_cache_dir = os.path.join(args.infer_out, 'cache') if not os.path.isdir(infer_cache_dir): @@ -112,7 +109,7 @@ def prepare_build(args): dir='.') as infer_script: logging.info('Creating %s' % infer_script.name) infer_script.file.write( - (INFER_SCRIPT.format(sys.executable, infer)).encode()) + INFER_SCRIPT.format(sys.executable, infer).encode()) st = os.stat(infer_script.name) os.chmod(infer_script.name, st.st_mode | stat.S_IEXEC)