Scoria.WarningBaseline (scoria v0.1.0)

Copy Markdown View Source

Parses .planning/WARNING-BASELINE.md accepted warning debt rows for executable expiry enforcement.

Expiry uses UTC calendar dates (YYYY-MM-DD). A row is valid through the end of its expiry day; it fails when the check date is strictly after the expiry date.

Summary

Functions

Returns rows with non-blank owner and expiry.

Returns accepted rows whose expiry date is before the check date.

Returns rows in the Accepted section with blank owner or expiry.

Loads and parses accepted warning debt rows from the baseline markdown file.

Types

t()

@type t() :: %{file: Path.t(), date: Date.t(), rows: [Scoria.WarningBaseline.Row.t()]}

Functions

accepted_rows(map)

@spec accepted_rows(t()) :: [Scoria.WarningBaseline.Row.t()]

Returns rows with non-blank owner and expiry.

expired_rows(map)

@spec expired_rows(t()) :: [Scoria.WarningBaseline.Row.t()]

Returns accepted rows whose expiry date is before the check date.

invalid_rows(map)

@spec invalid_rows(t()) :: [Scoria.WarningBaseline.Row.t()]

Returns rows in the Accepted section with blank owner or expiry.

load(opts \\ [])

@spec load(keyword()) :: t()

Loads and parses accepted warning debt rows from the baseline markdown file.

Options:

  • :file - path to baseline markdown (default .planning/WARNING-BASELINE.md)
  • :date - check date for expiry comparison (default Date.utc_today/0)