Rust lint tooling for repository policy enforcement, AST-sensitive boundary analysis, and portability checks.
This repository currently ships these primary crates:
sc-lint- top-level CLI crate and canonical machine-contract surface
sc-lint-directives- shared parsing/types for
#[sc_lint(...)]directives
- shared parsing/types for
sc-lint-attributes- proc-macro crate that provides the
#[sc_lint(...)]attribute namespace
- proc-macro crate that provides the
sc-lint-schema- shared findings/report schema used across analyzer crates
sc-lint-boundary- CLI and library for
syn-based analysis, findings output, and graph export
- CLI and library for
sc-lint-portability- portability analyzer crate
sc-lint-runtime- runtime/concurrency analyzer crate
The workspace version is managed from the root Cargo.toml via version.workspace = true in each crate.
The primary supported Homebrew install path is:
brew install randlee/tap/sc-lintThat formula is intended to install the released end-user toolset together:
sc-lintsc-lint-boundarysc-lint-portabilitysc-lint-runtime
The older randlee/tap/sc-lint-boundary formula may remain as a legacy
compatibility surface, but it is not the normal user install path.
The repo exposes its lint surface through just lint.
Default CI-gated checks:
fmtcargo fmt --all --check
clippycargo clippy --workspace --all-targets -- -D warnings
denycargo-denyadvisories, bans, licenses, and sources checks
shearcargo-shearunused-dependency and empty/unlinked file policy checks
version- workspace version alignment and internal path dependency version pinning
- optional release wiring and packaging checks when configured
manifests- Cargo manifest policy:
- required
[workspace.package]inheritance fields - internal path dependency version consistency
- required
- Cargo manifest policy:
spell- codespell content checks
pytests- Python unit tests for the repo-local lint runner infrastructure
Available but intentionally manual/advisory:
modulescargo modules dependencies --acyclic- internal module dependency cycle detection per workspace crate
sc-boundarysc-lint lint sc-boundary- preliminary
syn-based architectural linting and boundary analysis
sc-portabilitysc-lint lint sc-portability- preliminary portability analysis
sc-runtimesc-lint lint sc-runtime- std runtime/concurrency analysis
Fast local subset:
just lint fastfmtversionmanifestsspellpytests
sc-lint-boundary is the main shipped analyzer today.
Current implemented rule families:
SCB-CYCLE-001- multi-owner architectural cycles
SCB-CYCLE-002- type/method self-loop classification
SCB-CYCLE-003- trait-impl self-loop classification
SCB-BOUNDARY-001boundary.internal_onlyvisibility violation
SCB-BOUNDARY-002boundary.internal_onlyexternal reference violation
SCB-BOUNDARY-003boundary.forbid_external_implsviolation
sc-lint-portability owns the shipped portability rule family.
Current implemented rule families:
PORT-001- hardcoded Unix-only absolute paths in test code
PORT-002dirs::home_dir()without configured override handling
PORT-003std::env::set_var()in test code
PORT-004- ungated
std::os::uniximports in production code
- ungated
PORT-005#[cfg_attr(not(unix), allow(dead_code))]portability suppressors
Supported outputs:
- findings:
- text
- JSON
- graph export:
- JSON
- Turtle
Example commands:
just lint
just lint fast
just lint sc-boundary
just lint sc-portability
cargo run -p sc-lint-boundary -- analyze --root . --format text
cargo run -p sc-lint-portability -- analyze --root . --format text
cargo run -p sc-lint-runtime -- analyze --root . --format text
cargo run -p sc-lint-boundary -- export-graph --root . --format turtleThe repo-local lint runner currently uses:
.just/lint-config.toml
Current live config knobs include:
- portability override env configuration
cargo-sheardowngrade tables for allowed empty/unlinked files
Startup prompt injection for team-lead is configured in:
.atm.toml
For a repository change, the complete agent/developer contract is exactly:
just lint
just testjust lint and just test are complete aggregate gates. just setup checks
the root model's product compatibility before a manual setup/repair flow.
GitHub Actions invokes these same commands on Linux, macOS, and Windows.
The installed operator manual is available offline through sc-lint docs and
is sourced from docs-bundle/. The canonical consumer
setup is docs-bundle/just-setup.md.
Detailed design and planning material lives under:
docs/sc-lint/README.mdcrates/sc-lint-boundary/README.mdcrates/sc-lint-portability/README.mdcrates/sc-lint-runtime/README.mdcrates/sc-lint-schema/README.mdcrates/sc-lint-directives/README.mdcrates/sc-lint-attributes/README.mddocs/sc-lint-boundary/requirements.mddocs/sc-lint-boundary/graph-schema.mddocs/sc-lint-boundary/boundary-enforcement-model.mddocs/sc-lint-boundary/boundary-toml-migration.md