licence_audit/report
Types
pub type Counts {
Counts(
total: Int,
allowed: Int,
denied: Int,
unknown: Int,
excepted: Int,
skipped: Int,
)
}
Constructors
-
Counts( total: Int, allowed: Int, denied: Int, unknown: Int, excepted: Int, skipped: Int, )
pub type Row {
Row(
package: String,
version: String,
licences: List(String),
status: Status,
scope: manifest.Scope,
path: List(String),
)
}
Constructors
-
Row( package: String, version: String, licences: List(String), status: Status, scope: manifest.Scope, path: List(String), )
pub type Status {
NotChecked
Checked(policy.AuditStatus)
Reviewed(List(#(exception.Finding, exception.Decision)))
Failed(String)
Skipped(source: String)
}
Constructors
-
NotChecked -
Checked(policy.AuditStatus) -
Reviewed(List(#(exception.Finding, exception.Decision))) -
Failed(String) -
Skipped(source: String)
Values
pub fn counts(rows: List(Row), summary: Summary) -> Counts
Count each locked package name once. Unaccepted deny findings take priority over unknown findings; only fully accepted findings count as excepted. Unchecked or unavailable metadata counts as unknown, never as allowed.
pub fn decisions(status: Status) -> List(exception.Decision)
pub fn filter_failing_trees(rows: List(Row)) -> List(Row)
Keep only rows that belong to a dependency tree containing at least one
policy or metadata-fetch failure, or a matched exception. Used by check
to focus output on trees that need attention.
pub fn format(
rows: List(Row),
summary: Summary,
mode: Mode,
palette: color.Palette,
) -> String
pub fn format_findings(
rows: List(Row),
palette: color.Palette,
) -> String
Repeat each package with an unaccepted finding or metadata error once, without tree context. Reuse the report’s licence and finding formatting.
pub fn format_with_counts(
rows: List(Row),
summary: Summary,
counts: Counts,
mode: Mode,
palette: color.Palette,
) -> String
Render selected trees with counts computed from the full in-scope report.
pub fn is_failure(status: Status) -> Bool