Reference configs

tokio-rs/tokio: conventions its CI doesn't check

Tokio has no check scripts; its CI assumes the repository follows its conventions. This config checks them, from publish = false on the 5 internal crates to the minimum Rust version in step with CI. On the May tree, every one it checks held. This config was written to test alint; Tokio doesn't use alint.

What alint found

.alint.yml
- id: tokio-internal-crate-not-publishable
  kind: toml_path_equals
  paths:
    include:
      - "benches/Cargo.toml"
      - "examples/Cargo.toml"
      - "stress-test/Cargo.toml"
      - "tests-build/Cargo.toml"
      - "tests-integration/Cargo.toml"
  path: "$.package.publish"
  equals: false
  level: warning

✓ passed tokio-internal-crate-not-publishable

All 5 internal crates set publish = false, and the other conventions held too: licenses, editions, workspace lints, the [patch.crates-io] entries and the minimum Rust version.

The bundled GitHub Actions rules (alint 0.16.1, on the workflows as of 7 May 2026) flag 172 action references that use a tag or branch, such as actions/checkout@v6, instead of a commit, and uring-kernel-version-test.yml, which declares no permissions.

The config

The workspace has 5 published crates and 5 internal ones. The config checks the license and publish settings, that the crates inherit the workspace lints, the deny config, the [patch.crates-io] entries and the integration-test binaries. It keeps the minimum Rust version in step with CI, and runs the same cargo tools as CI from command rules.

.alint.yml
- id: tokio-msrv-coherence
  kind: cross_file_value_equals
  source:
    file: "tokio/Cargo.toml"
    extract: { toml: "$.package['rust-version']" }
  targets:
    - file: "tokio-util/Cargo.toml"
      extract: { toml: "$.package['rust-version']" }
    - file: "tokio-test/Cargo.toml"
      extract: { toml: "$.package['rust-version']" }
    - file: "tokio-stream/Cargo.toml"
      extract: { toml: "$.package['rust-version']" }
    - file: "tokio-macros/Cargo.toml"
      extract: { toml: "$.package['rust-version']" }
    - file: ".github/workflows/ci.yml"
      extract: { regex: "rust_min:\\s*'([0-9]+\\.[0-9]+)'" }
  level: error

The minimum Rust version is set in each of the 5 published crates and as rust_min in ci.yml, whose comment lists the files to update with it by hand. The rule checks that all six agree.

What stays outside alint

What compiles or runs the code stays in CI, and so do two file checks:

  • Clippy, rustdoc and the semver checks, which compile the code; alint only runs them;
  • the test matrix, the loom and Miri runs, and the io_uring test, which builds a Linux kernel;
  • the dictionary checks: no rule kind compares the count on the first line of spellcheck.dic with the words below it, and the config's sort rule can't mark where the words start;
  • the check that the two READMEs match. The config's rule for it compares a hash of one README with the other's text, so it fails even when they match;
  • the check that tokio-util depends on the same major version of Tokio as the workspace. The config's rule for it matches several versions in tokio/Cargo.toml and stops with an error.