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