Skip to main content

sarj-repo-lint

sarj-repo-lint measures pull-request review size without executing repository code. Its repository rules are available for review but remain disabled until individually approved and explicitly activated by a consumer.

Run it

Use the current release without installing it:

uvx --from sarj-repo-lint repo-lint pull-request size . --base origin/main

For a reproducible repository dependency, let uv record the resolved version:

uv tool install sarj-repo-lint
repo-lint pull-request size . --base origin/main

Upgrade with uv tool upgrade sarj-repo-lint. Automation should pin the package version or the GitHub Action's full commit SHA.

GitHub Action

The Action measures size only. It enables no repository lint rules and needs no inputs on a pull_request event.

name: Pull-request size

on:
  pull_request:

permissions:
  contents: read

jobs:
  size:
    runs-on: ubuntu-latest
    timeout-minutes: 10
    steps:
      - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
        with:
          fetch-depth: 0
          persist-credentials: false
      - uses: sarj-ai/sarj-repo-lint@<full-commit-sha> # v0.7.0

The Action emits counted, excluded, and total line counts plus canonical JSON. Tests are recognized across Python, JavaScript/TypeScript, Go, JVM, Android, Xcode/Swift, .NET, Ruby, and Bats conventions. Mark generated or machine-owned artifacts in the trusted base revision:

path/to/generated/** pr-size-excluded

Thresholds, labels, comments, and approval requirements remain consumer policy. Use pull_request, never pull_request_target; this metric is not a security gate.

Live GitHub evidence

Live governance checks are explicit and read-only. Supply a repository whose token can read metadata, branch protection, rulesets, and Actions settings:

export SARJ_REPO_LINT_GITHUB_TOKEN=...
repo-lint check . \
  --github-repository owner/repository \
  --require-github-evidence \
  --policy sarj \
  --format json

Without SARJ_REPO_LINT_GITHUB_TOKEN, the CLI can reuse an authenticated gh session. Live delivery checks require the selected revision to match the default-branch head.

Safety model

  • Repository contents come from one exact Git tree.
  • Workflow YAML and API descriptions are parsed as inert data.
  • GitHub access is read-only and credentials never come from inspected configuration.
  • Missing required evidence produces an inconclusive result rather than a false pass.
  • The linter has no autofix or repository mutation mode.

Repositories with production, preview, and development branches can declare and verify continuous hotfix propagation. See Delivery and CI/CD policy for the complete evidence model.

Development

uv sync --locked
uv run pytest
uv run ruff check .
uv run basedpyright
uvx --no-config --isolated --python 3.14 \
  --from sarj-standards-bootstrap==1.0.3 \
  sarj-standards check --trust-repository-code

Build the same wheel and source distribution used by publishing:

uv build --no-sources

Releases are reconcilable. The protected workflow independently repairs a missing PyPI publication or GitHub Release from the same verified source revision.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sarj_repo_lint-0.7.0.tar.gz (113.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sarj_repo_lint-0.7.0-py3-none-any.whl (130.5 kB view details)

Uploaded Python 3

File details

Details for the file sarj_repo_lint-0.7.0.tar.gz.

File metadata

  • Download URL: sarj_repo_lint-0.7.0.tar.gz
  • Upload date:
  • Size: 113.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for sarj_repo_lint-0.7.0.tar.gz
Algorithm Hash digest
SHA256 7462b8be601c783c0f0fc1f04703ab4ad9f157e5111cb008ed9000221fd4f486
MD5 ca8a49c3546732ce9b8f94eb1c3218a7
BLAKE2b-256 da84b480eab45fe8af36cf3e7e6b72d6dde6faa26569384713ac55921d8e066e

See more details on using hashes here.

Provenance

The following attestation bundles were made for sarj_repo_lint-0.7.0.tar.gz:

Publisher: publish.yml on sarj-ai/sarj-repo-lint

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file sarj_repo_lint-0.7.0-py3-none-any.whl.

File metadata

  • Download URL: sarj_repo_lint-0.7.0-py3-none-any.whl
  • Upload date:
  • Size: 130.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for sarj_repo_lint-0.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 de6e08aa2fcc471e063694f240519db16c9512e23c369c28a43b380e3fa5eced
MD5 efd6cf7ca6c7989e94a0d1ed97cd04cd
BLAKE2b-256 0f30f9808a6169a35b7e27fd47e9c467a652125d109f7144f7bec8cfab0072e4

See more details on using hashes here.

Provenance

The following attestation bundles were made for sarj_repo_lint-0.7.0-py3-none-any.whl:

Publisher: publish.yml on sarj-ai/sarj-repo-lint

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page