Module Integration.Driver

entry points for top-level functionalities such as capture under various build systems, analysis, and reporting

type mode =
  1. | Analyze
  2. | Ant of {
    1. prog : string;
    2. args : string list;
    }
  3. | BuckClangFlavor of {
    1. build_cmd : string list;
    }
  4. | BuckCompilationDB of {
    1. deps : IBase.BuckMode.clang_compilation_db_deps;
    2. prog : string;
    3. args : string list;
    }
  5. | BuckErlang of {
    1. prog : string;
    2. args : string list;
    }
  6. | BuckGenrule of {
    1. prog : string;
    }
  7. | BuckJavaFlavor of {
    1. build_cmd : string list;
    }
  8. | BxlClang of {
    1. build_cmd : string list;
    }
  9. | BxlJava of {
    1. build_cmd : string list;
    }
  10. | Clang of {
    1. compiler : Clang.compiler;
    2. prog : string;
    3. args : string list;
    }
  11. | ClangCompilationDB of {
    1. db_files : [ `Escaped of string | `Raw of string ] list;
    }
  12. | Gradle of {
    1. prog : string;
    2. args : string list;
    }
  13. | Javac of {
    1. compiler : Javac.compiler;
    2. prog : string;
    3. args : string list;
    }
  14. | Kotlinc of {
    1. prog : string;
    2. args : string list;
    }
  15. | JsonSIL of {
    1. cfg_json : string;
    2. tenv_json : string;
    }
  16. | Maven of {
    1. prog : string;
    2. args : string list;
    }
  17. | NdkBuild of {
    1. build_cmd : string list;
    }
  18. | Python of {
    1. prog : string;
    2. args : string list;
    }
  19. | PythonBytecode of {
    1. files : string list;
    }
  20. | Rebar3 of {
    1. args : string list;
    }
  21. | Erlc of {
    1. args : string list;
    }
  22. | Hackc of {
    1. prog : string;
    2. args : string list;
    }
  23. | Textual of {
    1. textualfiles : string list;
    }
  24. | XcodeBuild of {
    1. prog : string;
    2. args : string list;
    }
  25. | XcodeXcpretty of {
    1. prog : string;
    2. args : string list;
    }

based on the build_system and options passed to infer, we run in different driver modes

val is_analyze_mode : mode -> bool
val is_compatible_with_textual_generation : mode -> bool
val mode_from_command_line : mode IStdlib.IStd.Lazy.t

driver mode computed from the command-line arguments and settings in Config

val run_prologue : mode -> unit

prepare the environment for running the given mode

val capture : changed_files:IBase.SourceFile.Set.t option -> mode -> unit

run the capture for the given mode

val analyze_and_report : changed_files:IBase.SourceFile.Set.t option -> mode -> unit

run the analysis for the given mode

val report : unit -> unit
val run_epilogue : unit -> unit

cleanup infer-out/ for Buck, generate stats, and generally post-process the results of a run