On this page
Project checks registered on the strictcli check system, including version consistency, lock staleness, and changelog validation.
#rlsbl.checks
#rlsbl.checks
Project checks registered on the strictcli check system.
Each check is registered via @app.error_check("name") or @app.warn_check("name") and receives (ctx, reporter) where ctx is a :class:~rlsbl.context.ProjectContext (or its :class:~rlsbl.check_context.WorkspaceCheckContext subclass) and reporter is an ErrorReporter or WarnReporter.
Check functions accumulate problems via reporter.error(text) / reporter.warn(text) and finalize with reporter.passed(msg), reporter.skipped(reason), or reporter.found(summary).
#targets_for_check
def targets_for_check(check_name: str) -> frozenset[str]Return the targets a target-specific check applies to.
CHECK_TARGETS is the one place a check's target scope is written down, and a check that needs to skip for an inapplicable project reads it from here rather than repeating the target names in its own body. Raises for a check that is universal or workspace-only -- asking those for a target set is a bug, not a question with an empty answer.
#check_scope_skip_reason
def check_scope_skip_reason(check_name: str, target_names) -> str | NoneReturn a skip reason when target_names misses this check's scope.
None means the check applies. The message names the targets the check does support, which is the matrix's answer rather than a sentence restating it.
#get_feature_matrix
def get_feature_matrix() -> dict[str, dict[str, str]]Build a feature matrix mapping check names to per-target support.
Returns {check_name: {target: "yes"|"no"|"n/a"|"all"|"workspace"}} where:
"all"means the check is universal (works for any target)"workspace"means the check requires a monorepo workspace"yes"means the target is explicitly supported"n/a"means the check is deliberately excluded (toolchain handles it)"no"means the target is not supported
#generate_feature_matrix_data
def generate_feature_matrix_data() -> tuple[list[str], list[list[str]]]Generate raw data for the check-vs-target feature support matrix.
Only includes checks that have target-specific behavior (not universal or workspace-only), since those are the interesting rows.
Returns (headers, rows) where headers is ["Check", col1, ...] and each row is [check_name, cell1, ...].
#UnselectedReleasable
A check that answers for one project was run at a workspace root.
Raised from the check impl rather than reported through the reporter, because the refusal has to be an ERROR for every check that earns it and a warn-severity check's reporter cannot mint one. The runner turns a raised exception into that check's own error-severity failure, which is what the ruling asks for: an error result, never a silent skip.
#_repository_scoped_check_names
def _repository_scoped_check_names()Check names that answer for the REPOSITORY, not for one project.
Derived from the tags in rlsbl's own data/checks.toml rather than listed here, so a check added to the family joins the set by carrying the tag: a prepush-tagged check is run by the pre-push hook, which runs at the repository root of every workspace, and refusing there would block every monorepo push.
#_unselected_refusal
def _unselected_refusal(names)The one-line refusal a project-scoped check raises at a workspace root.
#_guard_project_scope
def _guard_project_scope(name, impl, repository_scoped)Wrap one check impl with the workspace-root refusal.
The marker is set by the check-context factory and cleared by the scope adapter for workspace-scoped checks, so what reaches an impl already says whether this position can answer for it.
#_ScopeGuardedApp
Registration proxy that guards every check impl it registers.
Every check rlsbl registers goes through one of the two decorators, so this is the single place the workspace-root refusal is applied -- no check body repeats it, and a check added later gets it by being registered.
#error_check
def error_check(self, name)#warn_check
def warn_check(self, name)#register_checks
def register_checks(app)Register all project checks on app.
Silently returns if the check system is not enabled (i.e. no .strictcli/checks.toml was found at import time -- this happens when rlsbl is imported from a working directory that is not the rlsbl source tree, e.g. a user's project directory).