[cleanup] Do not create captured folders when only linting

Summary: These folders are left empty when linting, so better not create them.

Reviewed By: jvillard

Differential Revision: D5921418

fbshipit-source-id: f6efc4f
master
Dulma Churchill 8 years ago committed by Facebook Github Bot
parent 652af47da7
commit de162c86ab

@ -34,7 +34,7 @@ let init_global_state_for_capture_and_linters source_file =
L.(debug Capture Medium) "Processing %s" (Filename.basename (SourceFile.to_abs_path source_file)) ;
if Config.developer_mode then register_perf_stats_report source_file ;
Config.curr_language := Config.Clang ;
DB.Results_dir.init source_file ;
if Config.clang_frontend_do_capture then DB.Results_dir.init source_file ;
CFrontend_config.reset_global_state ()
let run_clang_frontend ast_source =
@ -87,7 +87,9 @@ let run_clang_frontend ast_source =
if Config.clang_frontend_do_lint then
CFrontend_checkers_main.do_frontend_checks trans_unit_ctx ast_decl ;
if Config.clang_frontend_do_capture then CFrontend.do_source_file trans_unit_ctx ast_decl ;
L.(debug Capture Medium) "End translation AST file %a... OK!@\n" pp_ast_filename ast_source ;
L.(debug Capture Medium)
"End %s of AST file %a... OK!@\n" Config.clang_frontend_action_string pp_ast_filename
ast_source ;
print_elapsed ()
let run_and_validate_clang_frontend ast_source =

@ -164,7 +164,7 @@ let clean_results_dir () =
let check_captured_empty mode =
let clean_command_opt = clean_compilation_command mode in
if Utils.directory_is_empty Config.captured_dir then (
if Config.clang_frontend_do_capture && Utils.directory_is_empty Config.captured_dir then (
( match clean_command_opt with
| Some clean_command
-> L.user_warning "@\nNothing to compile. Try running `%s` first.@." clean_command

Loading…
Cancel
Save