rlsbl v0.92.0 /rlsbl.checks.scope
On this page

Scope adapter for the strictcli check system.

#rlsbl.checks.scope

#rlsbl.checks.scope

Scope adapter for the strictcli check system.

Interprets colon-separated scope tokens to pre-filter the check context before the check function runs. Registered via app.set_scope_adapter().

Tokens:

  • workspace -- requires WorkspaceCheckContext
  • non_dev_only -- filter projects to exclude dev-only
  • non_dev_node -- filter projects to exclude dev_node
  • library -- filter projects to only library projects
  • releasable -- filter projects to only releasable projects
  • push -- requires push_stdin is not None

#scope_adapter

python
def scope_adapter(ctx, scope_string)

Interpret scope_string and return a filtered context or a CheckResult.

Each colon-separated token is processed left-to-right. If a token produces a CheckResult (skip/fail), processing stops and that result is returned. Otherwise, the token transforms the context (e.g. by filtering ctx.projects).

Unknown tokens are silently ignored (pass through).

#_apply_token

python
def _apply_token(ctx, token)

Apply a single scope token to ctx.

Returns either a new context (filtered copy) or a CheckResult.