rlsbl v0.113.0 /rlsbl.checks.project
On this page

Project checks (tag: project) validating version, name, license, and description consistency, config schema, and scaffold conflicts.

#rlsbl.checks.project

#rlsbl.checks.project

Project checks (tag: project) validating version, name, license, and description consistency, config schema, and scaffold conflicts.

Checks: lock, version-consistency, name-consistency, license-consistency, description-consistency, private-hook-stale, config-schema, license-file, publish-mode-workflow, npm-private-mismatch, target-version-readable, dunder-version-missing, selfdoc-version-drift, scaffold-conflicts, cross-repo-path-sources, stricttest-floor.

#_launcher_target_subdir_from_config

python
def _launcher_target_subdir_from_config(config, launcher_entry)

Resolve a launcher pipeline's linked target directory from config.

#_launcher_manifest_missing_fields

python
def _launcher_manifest_missing_fields(root, subdir, launcher_entry)

Return the shim-critical manifest fields missing from a launcher target.

Only reports when the manifest exists (an absent manifest is a separate scaffold-time hard error). For npm postinstall mode: bin, scripts.postinstall, files. For npm first-run mode: bin, files (no postinstall -- install does zero network I/O). For pypi: project.scripts.

#find_conflicted_scaffold_files

python
def find_conflicted_scaffold_files(project_root)

Return (relpath, first_conflict_line) tuples for scaffold files with unresolved git merge conflict markers, sorted by path.

Scans three file sets (skipping files that don't exist):

  • every file listed in .rlsbl/managed-files.json (the

scaffold-managed registry; missing or malformed registry is skipped)

  • all files under .github/workflows/
  • all files under .rlsbl/ (recursively)

A file is conflicted when it contains a line starting with '<<<<<<< ' AND a line starting with '>>>>>>> '. Requiring both avoids false positives on bare '=======' lines (e.g. setext heading underlines). first_conflict_line is the 1-based line number of the first '<<<<<<< ' marker in the file.

Shared by the scaffold-conflicts check and the pre-mutation guard in rlsbl release run.

#find_cross_repo_path_sources

python
def find_cross_repo_path_sources(project_root, boundary_root=None)

Return (package, declared_path, resolved_path) tuples for [tool.uv.sources] entries in project_root/pyproject.toml whose path resolves outside boundary_root (defaults to project_root).

Relative paths are resolved against the pyproject.toml's directory, matching uv's resolution rule. workspace = true sources and in-repo path sources are legal and never reported. Returns an empty list when pyproject.toml is missing, unparseable, or has no sources table.

A non-string path value (malformed TOML) is reported as an offender whose third element is an "invalid path value" message naming the source and file, so consumers fail the check instead of crashing.

Shared by the cross-repo-path-sources check and the pre-mutation guard in rlsbl release run.

#_get_releasable_version_for_project

python
def _get_releasable_version_for_project(ctx)

Return the releasable version for the project in ctx, or None.

Returns a version string when ALL of the following hold:

  • The project is inside a monorepo (ctx.workspace_root is not None)
  • The workspace uses explicit releasable mode ([[releasables]] present)
  • The current project has releasable = "<name>" (belongs to a releasable)
  • The releasable's version file exists and is non-empty

Returns None otherwise (implicit mode, non-releasable project, missing version file, or not in a monorepo). Callers should fall through to the standard per-target consistency check when None is returned.

#_virtual_root_skip_reason

python
def _virtual_root_skip_reason(ctx)

Return a skip reason string when ctx.project_root is a virtual uv workspace root (has [tool.uv.workspace] but no [project] table), else None.

#register_project_checks

python
def register_project_checks(app)

Register project-tag checks on app.

Search