Cargo.Scanner (LowEndInsight v0.9.1)

Copy Markdown View Source

Scanner scans for Cargo/Rust dependencies to run analysis on.

Summary

Functions

analyze_dependencies: Run LEI analysis on a list of dependencies. Returns list of analysis reports.

get_repo_url: Given a crate name and source info, determine the repository URL. For crates.io packages, queries the API. For git sources, uses the URL directly.

scan: takes in project types map with cargo paths and returns the dependencies mapped to their analysis and the number of dependencies.

Functions

analyze_dependencies(deps)

@spec analyze_dependencies([{atom(), map()}]) :: [map()]

analyze_dependencies: Run LEI analysis on a list of dependencies. Returns list of analysis reports.

get_repo_url(name, arg2)

@spec get_repo_url(String.t(), term()) :: String.t() | nil

get_repo_url: Given a crate name and source info, determine the repository URL. For crates.io packages, queries the API. For git sources, uses the URL directly.

scan(cargo?, arg2)

@spec scan(boolean(), map()) :: {[any()], non_neg_integer()}

scan: takes in project types map with cargo paths and returns the dependencies mapped to their analysis and the number of dependencies.