Skip to content
rlsbl.checks
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

python
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

python
def check_scope_skip_reason(check_name: str, target_names) -> str | None

Return 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

python
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

python
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

python
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

python
def _unselected_refusal(names)

The one-line refusal a project-scoped check raises at a workspace root.

#_guard_project_scope

python
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

python
def error_check(self, name)

#warn_check

python
def warn_check(self, name)

#register_checks

python
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).

More tools from this site

  • claudestream Drive Claude Code from Python: run it as a subprocess and read its output as typed events, with async and sync sessions, sandbox policies, and tools you define in Python
  • claudewheel A TUI Claude Code Launcher that lets you have more than one profile, manage sessions lifecycle, pick the exact CC version, model to use (even older unlisted ones), pick which GitHub account to use, etc.
  • dirstat Fast, single-binary directory statistics CLI: every file under a tree grouped by format, with counts, sizes, and lines of code, as a colored terminal table or as JSON
  • fastware A batteries-included ASGI framework: msgspec JSON, a managed Granian server, dependency injection, SSE, WebSockets, auth, and a test client
  • go-toml-edit Zero-dep TOML editing library for Go with comment preservation
  • howmuchleft The fastest Claude Code statusline: context window, 5-hour, and weekly limit usage as three customizable gradient bars, rendering in about 6 ms
  • orxtra
  • pgdesign
  • predraw Declarative rendering pipeline: describe a scene in JSON and get SVG, PNG and WebP out, with light and dark style tokens, reusable components and text converted to path outlines
  • reposummary Turn a git repository's history into a Markdown journal: pick a time window or revision range and get a readable digest of what changed, optionally narrated by an LLM
  • safegit git wrapper CLI that gives each commit its own temporary index and retries ref updates on conflict, so concurrent agents share one repository
  • saferm Command-line replacement for rm that archives every deletion with a mandatory reason and the context it ran in, so deleted files can be listed, inspected and restored
  • selfdoc Static Site Generator that builds a project's documentation site directly from its source code, so the docs can never drift from the code they describe, with SEO/AEO, first-class blog, search, and cross-project linking built in
  • strictcli
  • stricttest An always-on test-isolation floor: a pytest plugin and a Go env-hygiene module that make a test suite structurally unable to reach real credentials, the real HOME, the network, or the development repository.
  • wesktop A Python framework that turns an ASGI web app into a desktop application, serving it from a local Granian server and displaying it in a native OS window via pywebview
Search