registry_paths_resolve
A manifest file enumerates path entries; each must resolve to an on-disk artefact. extract pulls the entry list via a structured query (toml / json / yaml / xml / dotenv / properties / ini / hcl RFC 9535 JSONPath), a physical-line list (lines, optional comment prefix; LF, CRLF, and lone CR are recognized), or a regex capture (regex, group 1). expect (any / file / dir) and must_contain constrain the resolved kind; exclude_query subtracts entries; entries_are_globs expands each entry as a glob. A structured query that selects non-string JSON values fails with a type/count diagnostic rather than silently dropping them.
Options
Section titled "Options"| Option | Type | Required | Default | Description |
|---|---|---|---|---|
base | string | null | Resolve entries relative to: registry_dir (default), lint_root, or an explicit path. | |
entries_are_globs | boolean | false | Expand each extracted entry as a glob rather than treating it as a single literal path; a glob that matches nothing is a violation. | |
exclude_query | string | null | A structured query selecting entries to subtract from the extracted list before resolution is checked. | |
expect | one of any | file | dir | Constrain the kind each entry must resolve to on disk: any (default), file, or dir. | ||
extract | extract spec | yes | Exactly one of: toml/json/yaml/xml/dotenv/properties/ini/hcl (RFC 9535 JSONPath string), lines (object; optional comment prefix, default #), regex (string; capture group 1 is the path). | |
must_contain | string | null | When an entry resolves to a directory, that directory must contain this named child (e.g. Cargo.toml), else the entry is a violation. | |
orphans | object { space } | Enable the reverse-completeness check. Findings use the rule's top-level level; omit this option to disable the check. | ||
source | string | yes | The manifest/registry file (path, or a glob to run once per matching manifest) that enumerates the path entries. |
Plus the common level, id, and when fields. This rule analyses the whole repository, so it takes no paths or expect_matches. This table is generated from the JSON Schema; option types and defaults are authoritative.
Example
Section titled "Example"A declared workspace member that does not exist
Section titled "A declared workspace member that does not exist"The rule fires on this repository:
- Cargo.toml
✗ error workspace-members-resolve
Cargo.toml: entry "crates/cli" does not resolve to a directory on disk related: declared target: crates/cli
- crates/
- crates/core/
- crates/core/Cargo.toml✓
[workspace]members = ["crates/core" , "crates/cli" ][package]name = "core"With this .alint.yml:
version: 1rules: - id: workspace-members-resolve kind: registry_paths_resolve source: Cargo.toml extract: { toml: "$.workspace.members[*]" } expect: dir must_contain: Cargo.toml level: erroralint check reports:
--- Cargo.toml ----------------------------------------------------------------- x error workspace-members-resolve Cargo.toml: entry "crates/cli" does not resolve to a directory on disk related: declared target: crates/cli
Summary (1 violation): x 1 error 0 passing * 1 failingEvery declared workspace member resolves on disk
Section titled "Every declared workspace member resolves on disk"This repository is compliant:
- Cargo.toml✓
- crates/
- crates/cli/
- crates/cli/Cargo.toml✓
- crates/core/
- crates/core/Cargo.toml✓
[workspace]members = ["crates/core" , "crates/cli" ][package]name = "cli"[package]name = "core"With this .alint.yml:
version: 1rules: - id: workspace-members-resolve kind: registry_paths_resolve source: Cargo.toml extract: { toml: "$.workspace.members[*]" } expect: dir must_contain: Cargo.toml level: erroralint check reports:
v All 1 rule(s) passed.