Navigation Menu

Skip to content

Commit

Permalink
[ConfigImpact] Log if strict mode enabled or not (fix)
Browse files Browse the repository at this point in the history
Reviewed By: ezgicicek

Differential Revision: D30574637

fbshipit-source-id: f09ee60f4
  • Loading branch information
skcho authored and facebook-github-bot committed Aug 27, 2021
1 parent 3ce84b3 commit f1a54e7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
2 changes: 2 additions & 0 deletions infer/src/backend/InferAnalyze.ml
Expand Up @@ -143,6 +143,8 @@ let tasks_generator_builder_for sources =


let analyze source_files_to_analyze =
if Config.is_checker_enabled ConfigImpactAnalysis then
L.debug Analysis Quiet "Config impact strict mode: %b@." ConfigImpactAnalysis.strict_mode ;
if Int.equal Config.jobs 1 then (
let target_files =
List.rev_map (Lazy.force source_files_to_analyze) ~f:(fun sf -> TaskSchedulerTypes.File sf)
Expand Down
19 changes: 7 additions & 12 deletions infer/src/cost/ConfigImpactAnalysis.ml
Expand Up @@ -7,25 +7,20 @@

open! IStd
module F = Format
module L = Logging
module ConfigName = FbGKInteraction.ConfigName

let is_in_strict_mode_paths file =
SourceFile.is_matching Config.config_impact_strict_mode_paths file


let strict_mode =
let enabled =
Config.config_impact_strict_mode
||
match SourceFile.read_config_changed_files () with
| None ->
not (List.is_empty Config.config_impact_strict_mode_paths)
| Some changed_files ->
SourceFile.Set.exists is_in_strict_mode_paths changed_files
in
L.debug Analysis Quiet "config impact strict mode: %b@." enabled ;
enabled
Config.config_impact_strict_mode
||
match SourceFile.read_config_changed_files () with
| None ->
not (List.is_empty Config.config_impact_strict_mode_paths)
| Some changed_files ->
SourceFile.Set.exists is_in_strict_mode_paths changed_files


module Branch = struct
Expand Down

0 comments on commit f1a54e7

Please sign in to comment.