Reference configs

astral-sh/uv: workspace inheritance, and its 4 exceptions

uv's crates take their lints, edition and license from the workspace, a convention kept by hand. Three rules check every crate manifest; on the run they flagged 4 crates, all deliberate exceptions that an exclude list would record. This config was written to test alint; uv doesn't use alint.

What alint found

.alint.yml
- id: uv-crate-inherits-workspace-lints
  kind: for_each_dir
  select: "crates/uv-*"
  when_iter: 'iter.has_file("Cargo.toml")'
  require:
    - kind: file_content_matches
      paths: "{path}/Cargo.toml"
      pattern: '(?m)^\[lints\]\s+workspace\s*=\s*true'
  level: warning

⚠︎ warning uv-crate-inherits-workspace-lints

The 3 inheritance rules flagged 4 crates, all on purpose: uv-trampoline sits outside the workspace, uv-performance-memory-allocator skips the workspace lints, and uv-pep440 and uv-pep508 carry their own license.

.alint.yml
extends:
  - alint://bundled/oss-baseline@v1
  - alint://bundled/ci/github-actions@v1

ℹ︎ info oss-codeowners-exists

There's no CODEOWNERS file, and no code of conduct in the repository itself; Astral's organization-wide one lives in its .github repository.

The bundled GitHub Actions rules (alint 0.16.1, on the workflows as of 7 May 2026) flag 15 of the 26 workflows for having no name:, check-release.yml for declaring no permissions and release.yml for granting contents: write at the workflow level.

The config

crates/ holds 68 crates. The config checks the workspace and crate manifests, the generated references that cargo dev generate-all writes, and the windows crate version shared by the workspace and uv-trampoline. Ruff, cargo fmt and Prettier run from command_idempotent rules. It extends eight bundled rulesets, from oss-baseline to monorepo/cargo-workspace.

.alint.yml
- id: uv-trampoline-windows-version-consistent
  kind: cross_file_value_equals
  source:
    file: Cargo.lock
    extract: { toml: "$.package[?(@.name=='windows')].version" }
  targets:
    - file: crates/uv-trampoline/Cargo.lock
      extract: { toml: "$.package[?(@.name=='windows')].version" }
  normalize: trim
  level: error

uv-trampoline has its own lockfile. This rule keeps its windows crate at the version the workspace lockfile pins.

.alint.yml
- id: uv-no-direct-std-fs-imports
  kind: import_gate
  paths: "crates/uv-*/src/**/*.rs"
  language: rust
  forbid: '^(std|tokio)::fs(::|$)'
  allow:
    - 'crates/uv-fs/**'
    - 'crates/uv-dev/**'
    - 'crates/uv-trampoline/**'
  level: warning

uv routes file access through the fs-err wrappers. Clippy bans the calls; this rule bans the imports of std::fs and tokio::fs.

What stays outside alint

Builds, tests and releases stay in CI:

  • cargo publish --dry-run and runtime tests such as check_system_python.py;
  • code generation with cargo dev generate-*, which the config checks but doesn't replace;
  • the contents of built wheels and archives. alint has no rule kind that looks inside an archive;
  • the mkdocs documentation build.