sc-lint
Rust lint tooling for repository policy enforcement, AST-sensitive boundary analysis, and portability checks.
Workspace
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.
Homebrew
The primary supported Homebrew install path is:
That 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.
Current Lint Surface
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
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
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:
Config
The 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
Development
Core local commands:
The current GitHub Actions sequence mirrors the local workflow:
- format
- clippy
just lint- workspace tests
Docs
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/requirements.mddocs/sc-lint/graph-schema.mddocs/sc-lint/boundary-enforcement-model.mddocs/sc-lint/boundary-toml-migration.md