glcov/ffi

The small Erlang interface used by glcov.

Everything here is exercised through the CLI, but keeping it in one module makes the boundary easy to audit.

Values

pub fn add_code_paths(paths: List(String)) -> Nil
pub fn beam_functions(beam: String) -> List(#(String, Int, Int))
pub fn beam_sources(
  ebin: String,
) -> List(#(String, String, String))
pub fn capture(
  program: String,
  arguments: List(String),
  cwd: String,
) -> #(Int, String)
pub fn cover_analyse(
  modules: List(String),
) -> Result(List(#(String, List(#(Int, Bool)))), String)
pub fn cover_analyse_functions(
  modules: List(String),
) -> Result(List(#(String, List(#(String, Int, Int)))), String)
pub fn cover_compile(
  beam_paths: List(String),
) -> List(#(String, String))
pub fn cover_start() -> Result(Nil, String)
pub fn cover_stop() -> Nil
pub fn delete_file(path: String) -> Nil
pub fn ensure_app_started(app: String) -> Result(Nil, String)
pub fn eprintln(message: String) -> Nil
pub fn file_exists(path: String) -> Bool
pub fn find_ebins(root: String) -> List(String)
pub fn find_project_root() -> String
pub fn get_cwd() -> String
pub fn halt(code: Int) -> Nil
pub fn is_dir(path: String) -> Bool
pub fn is_erlang() -> Bool
pub fn otp_release() -> String
pub fn plain_args() -> List(String)
pub fn profile_tests(
  root: String,
  color: Bool,
  mode: String,
) -> Result(
  #(Int, Int, List(#(String, String, Int, Int, Int, Int))),
  String,
)
pub fn read_file(path: String) -> Result(String, String)
pub fn run(
  program: String,
  arguments: List(String),
  cwd: String,
) -> Int
pub fn run_tests(root: String, color: Bool) -> Int
pub fn set_cwd(path: String) -> Result(Nil, String)
pub fn which(program: String) -> Result(String, String)
pub fn write_file(
  path: String,
  contents: String,
) -> Result(Nil, String)
✨ Search Document